Este é o site histórico da documentação 4D. As documentações estão sendo movidas progressivamente para developer.4d.com

Página Inicial

 
4D v20.6
Font file

Font file 


 

Font file ( fontFamily {; fontStyle} ) -> Resultado 
Parâmetro Tipo   Descrição
fontFamily  Texto in Name of font family
fontStyle  Inteiro longo in Font style: 0=normal (default), 1=bold, 2=italic
Resultado  Objeto, Null in Font file object

The Font file command returns an object describing the font file in your OS corresponding to the fontFamily and, optionally, fontStyle you passed in parameter. 

If the font designated by fontFamily is not installed in the OS, the command returns a Null object. 

The optional fontStyle parameter allows to define a style variation to get. You can pass one or a combination of the following constants from the Font Styles theme (any other value is ignored):

Constant Type Value
Bold Longint 1
Italic Longint 2
Plain Longint 0
 

Exemplo  

You want to make sure the font used in a text area is available on the user system for a correct display:

 C_TEXT($fontName)
 C_LONGINT($fontStyle)
 C_OBJECT($fontFile)
 $fontName:=OBJECT Get font(*;"vText")
 $fontStyle:=OBJECT Get font style(*;"vText")
 $fontFile:=Font file($fontName;$fontStyle)
 If($fontFile=Null)
    ALERT("Defined font is not available, please install: "+$fontName)
 End if



Ver também 

OBJECT SET FONT

 
PROPRIEDADES 

Produto: 4D
Tema: Ambiente de Sistema
Número 1700

This command can be run in preemptive processes

 
CONTEÚDO DA PÁGINA 
 
HISTÓRIA 

Criado por: 4D v18

 
ARTICLE USAGE

Manual de linguagem 4D ( 4D v20)
Manual de linguagem 4D ( 4D v20.1)
Manual de linguagem 4D ( 4D v20.2)
Manual de linguagem 4D ( 4D v20.3)
Manual de linguagem 4D ( 4D v20.4)
Manual de linguagem 4D ( 4D v20.5)
Manual de linguagem 4D ( 4D v20.6)