WR Get stylesheet font
version 6.5
WR Get stylesheet font (area; stylesheetNumber) String
Parameter | Type | Description | |
area | Longint | 4D Write area | |
stylesheetNumber | Longint | Stylesheet number |
Function result String Name of the font, or "" if no font is defined
Description
The WR Get stylesheet font command returns the name of the font that was assigned to the style sheet whose number was passed in styleSheetNumber in the 4D Write area referenced by area. Style sheet are numbered from top to bottom as shown in the style sheet dialog. If no font is defined for that style sheet, an empty string is returned.
Example
You want to remove the "Font" attribute from each style sheet where it is used, whenever the specified font is not installed in the system:
ARRAY STRING(80;FontsArray)
WR FONTS TO ARRAY(FontsArray)
$StyleSheetNum:=WR Count(Area;wr nb stylesheets)
For ($i;1;$StyleSheetNum)
$Fonts:=WR Get stylesheet font(Area;$i)
If (($Fonts#"") & (Find in array(Area;$Fonts)=0))
WR SET STYLESHEET FONT(Area;$i;"")
End if
End for
See Also