Este é o site histórico da documentação 4D. As documentações estão sendo movidas progressivamente para developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
VP Object to font
|
VP Object to font ( fontObj ) -> Resultado | ||||||||
Parâmetro | Tipo | Descrição | ||||||
fontObj | Objeto |
![]() |
objeto Fonte | |||||
Resultado | Texto |
![]() |
abreviatura da fonte | |||||
O comando VP Object to font devolve uma string abreviada de fonte de objFonte.
Em objFonte, passe um objeto que contenha as propriedades da fonte. As propriedades abaixo são compatíveis:
Propriedade | Tipo | Descrição | Valores possíveis | Obrigatório |
family | texto | Especifica a fonte. | toda familia de fontes padrão ou genérica. Ex. "Arial", "Helvetica", "serif", "arial,sans-serif" | Sim |
size | texto | Define o tamanho da fonte. a altura de linha pode ser agregada ao tamanho de fonte: tamanho de fonte/altura de linha: Ex "15pt/20pt" | um número com uma das unidades abaixo: "em", "ex", "%", "px", "cm", "mm", "in", "pt", "pc", "ch", "rem", "vh", "vw", "vmin", "vmax" ou uma das seguintes: vk font size large, vk font size larger, vk font size x large, vk font size xx large, vk font size small, vk font size smaller, vk font size x small, vk font size xx small | Sim |
style | texto | estilo de fonte. | vk font style italic,vk font style oblique | Não |
variant | texto | Especifica a fonte em maiúsculas pequenas. | vk font variant small caps | Não |
weight | texto | Define a grossura da fonte. | vk font weight 100, vk font weight 200, vk font weight 300, vk font weight 400, vk font weight 500, vk font weight 600, vk font weight 700, vk font weight 800, vk font weight 900, vk font weight bold, vk font weight bolder, vk font weight lighter | Não |
Este objeto pode ser criada com o comando VP Font to object.
A string abreviada devolvida pode ser atribuida à propriedade "fonte" de uma célula com VP SET CELL STYLE, por exemplo.
$cellStyle:=VP Get cell style($range)
$font:=VP Font to object($cellStyle.font)
$font.style:=vk font style oblique
$font.variant:=vk font variant small caps
$font.weight:=vk font weight bolder
$cellStyle.font:=VP Object to font($font)
//$cellStyle.font contém "bolder oblique small-caps 16pt arial"
Objetos Estilo 4D View Pro e Folhas de Estilo
VP Font to object
VP SET CELL STYLE
VP SET DEFAULT STYLE
Produto: 4D
Tema: Linguagem 4D View Pro
Número
9766
Criado por: 4D v17 R6
4D View Pro ( 4D v19)