| 4D v15 R3FONT LIST | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v15 R3
 FONT LIST 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FONT LIST ( fonts {; listType | *} ) | ||||||||
| Parameter | Type | Description | ||||||
| fonts | Text array |   | Array of font names | |||||
| listType | * | Longint, Operator |   | Font type list to return or * to return font names under OS X | |||||
The FONT LIST command populates the string or text array fonts with the names of the fonts available on your system.
The listType parameter lets you designate the type of font list you want to get. To do so, you can pass one of the following constants in the listType parameter, available in the "Font Type List" theme:
| Constant | Type | Value | Comment | 
| Favorite fonts | Longint | 1 | fonts contains the list of favorite fonts. - Under Windows: list of active font family names. - Under OS X: list of font family names found in the control panel, entitled "Favorites" in English, "Favoris" in French, "Favoriten" in German, and so on . This collection may be blank if the user has not added any favorite fonts. | 
| Recent fonts | Longint | 2 | fonts contains the list of recent fonts (the ones used during the 4D session). This list is used in particular by multi-style text areas. | 
| System fonts | Longint | 0 | fonts contains the list of all the system fonts. Default option when listType is omitted. | 
Under OS X, when you pass the optional * parameter, the command populates the fonts  array with the names of the fonts themselves, and not with the names of the font families. The default operation simplifies programmed management of rich text  areas, which use font families. If you pass the * parameter, font names, for example, "Arial bold", "Arial  italic", "Arial narrow italic," are  returned instead of families, such as "Arial", "Arial black" or "Arial narrow".
Under Windows, the * parameter has no effect. The command still returns the font families.
Note: Under OS X, if you use the result of this command with the ST SET ATTRIBUTES, you must not pass the * parameter.
In a form, you want a drop-down list that displays a list of the fonts available on your system. The method of the drop-down list is as follows:
 Case of
    :(Form event=On Load)
       ARRAY TEXT(asFont;0)
       FONT LIST(asFont)
  ` ...
 
 End caseYou want to get a list of recent fonts:
 FONT LIST($arrFonts;Recent fonts)
									_o_Font name
									
									_o_Font number
									
									Font Type List
									
									OBJECT SET FONT
									
									SET RECENT FONTS
									
									ST SET ATTRIBUTES
									
	Product:  4D
	Theme:  System Environment
	Number:  
        460
        
        
        
	
	Created:  4D v6
	Modified:  4D v12.1
	Modified:  4D v14
police
	
	
	
	4D Language Reference ( 4D v15 R3)
	
	4D Language Reference ( 4D v15)
	
	
	4D Language Reference ( 4D v15.4)
	4D Language Reference ( 4D v15.3)
 Add a comment
Add a comment