4D View v14PV Add font |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v14
PV Add font
|
PV Add font ( area ; name ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D View area | |||||
name | String |
![]() |
Font name | |||||
Function result | Longint |
![]() |
Font ID | |||||
The PV Add font command adds a font to the area by its name and returns its ID.
If name already exists, the PV Add font command returns its ID (the number can also be obtained using the PV GET FONT LIST command).
For more information on how fonts associated with a 4D View area work, refer to the section PV Style, Introduction.
This method also works with toggle: it removes a font from the 4D View area or associates it if it has already been removed.
C_STRING(255;$FontName) `Name of font to add/remove from Area
ARRAY LONGINT($FontNumArray;0) `Font numbers array
ARRAY STRING(255;$FontNameArray;0) `Font names array
C_INTEGER($Position) `Position of the font in the number and name arrays
$FontName:="Arial"
PV GET FONT LIST(Area;$FontNumArray;$FontNameArray) `List of available fonts
$Position:=Find in array($FontNameArray;$FontName)
If($Position=-1) `$FontName font is unavailable for the area?
$Position:=Size of array($FontNameArray)+1 `We will add it
INSERT IN ARRAY($FontNameArray;$Position) `Resize...
INSERT IN ARRAY($FontNumArray;$Position) `...arrays
$FontNameArray{$Position}:=$FontName `Assign name of new font
$FontNumArray{$Position}:=PV Add font(Area;$FontName) `Assign font number
Else `$FontName font is already present in the area
PV REMOVE FONT(Area;$FontNumArray{$Position}) `Remove it
End if
Product: 4D View
Theme: PV Style
Number:
15889
Created: 4D View 6.8
PV GET FONT LIST
PV REMOVE FONT
4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D View v14)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)