Saltar para o conteúdo principal
Versão: 20 R5 BETA

VP Object to font

VP Object to font ( fontObj : Object ) : Text

ParâmetroTipoDescrição
fontObjObject->Objecto letra
ResultadosText<-Fonte abreviada

Descrição

The VP Object to font command returns a font shorthand string from fontObj.

In fontObj, pass an object containing the font properties. As propriedades abaixo são compatíveis:

PropriedadeTipoDescriçãoValores possíveisObrigatório
familytextEspecifica o tipo de letra.qualquer família de tipos de letra padrão ou genérica. Ex. Ex. Ex. "Arial", "Helvetica", "serif", "arial,sans-serif"Sim
sizetextDefines the size of the font. The line-height can be added to the font-size: font-size/line-height: Ex: "15pt/20pt"a number with one of the following units:
  • "em", "ex", "%", "px", "cm", "mm", "in", "pt", "pc", "ch", "rem", "vh", "vw", "vmin", "vmax"
  • or one of the following:
  • 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
    styletextO estilo do tipo de letra.
  • vk font style italic
  • vk font style oblique
  • Não
    varianttextEspecifica o tipo de letra em pequenas maiúsculas.
  • vk font variant small caps
  • Não
    weighttextDefine a espessura do tipo de letra.
  • 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

    This object can be created with the VP Font to object command.

    The returned shorthand string can be assigned to the "font" property of a cell with the VP SET CELL STYLE, for example.

    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 contains "bolder oblique small-caps 16pt arial"

    Veja também

    4D View Pro Style Objects and Style Sheets
    VP Font to object
    VP SET CELL STYLE
    VP SET DEFAULT STYLE