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 v19
VP Object to font

VP Object to font 


 

VP Object to font ( fontObj ) -> Resultado 
Parâmetro Tipo   Descrição
fontObj  Objeto in objeto Fonte
Resultado  Texto in 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:

PropriedadeTipoDescriçãoValores possíveisObrigatório
familytextoEspecifica a fonte. toda familia de fontes padrão ou genérica. Ex. "Arial", "Helvetica", "serif", "arial,sans-serif"Sim
sizetextoDefine 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 smallSim
styletexto estilo de fonte.  vk font style italic,vk font style obliqueNão
varianttextoEspecifica a fonte em maiúsculas pequenas. vk font variant small capsNão
weighttextoDefine 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 lighterNã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.

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"



Ver também 

Objetos Estilo 4D View Pro e Folhas de Estilo
VP Font to object
VP SET CELL STYLE
VP SET DEFAULT STYLE

 
PROPRIEDADES 

Produto: 4D
Tema: Linguagem 4D View Pro
Número 9766

 
CONTEÚDO DA PÁGINA 
 
HISTÓRIA 

Criado por: 4D v17 R6

 
ARTICLE USAGE

4D View Pro ( 4D v19)