WR Get stylesheet font

4D - Documentation   Français   English   German   4D Write, Command Theme List   4D Write, Command Alphabetical List   4D Write, Constant Theme List   Back   Previous   Next

version 6.5


WR Get stylesheet font (area; stylesheetNumber) String

ParameterTypeDescription
areaLongint4D Write area
stylesheetNumberLongintStylesheet number
Function resultStringName 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

WR Get font, WR SET STYLESHEET FONT.


4D - Documentation   Français   English   German   4D Write, Command Theme List   4D Write, Command Alphabetical List   4D Write, Constant Theme List   Back   Previous   Next