4D v13

WR Get stylesheet font

Home

 
4D Write v13
WR Get stylesheet font

WR Get stylesheet font 


 

WR Get stylesheet font ( area ; stylesheetNumber ) -> Function result 
Parameter Type   Description
area  Longint in 4D Write area
stylesheetNumber  Longint in Stylesheet number
Function result  String in Name of the font, or "" if no font is defined

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

 
PROPERTIES 

Product: 4D
Theme: WR Style Sheet
Number: 89462

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Write 6.5

 
SEE ALSO 

WR Get font
WR SET STYLESHEET FONT