VP Object to font
VP Object to font ( fontObj : Object ) : Text
| Parámetros | Tipo | Descripción | ||
|---|---|---|---|---|
| font object | Object | -> | Objeto fuente | |
| Resultado | Text | <- | Fuente abreviada |
Descripción
El comando VP Object to font devuelve una cadena abreviada de fuente a partir de fontObj.
En fontObj, pase un objeto que contenga las propiedades de la fuente. Se soportan las siguientes propiedades:
| Propiedad | Tipo | Descripción | Valores posibles | Obligatorio |
|---|---|---|---|---|
| family | text | Define la fuente. | todo tipo de familia de fuentes estándar o genérica. Ej. "Arial", "Helvetica", "serif", "arial,sans-serif" | Sí |
| size | text | Defines the size of the font. The line-height can be added to the font-size: font-size/line-height: Ex: "15pt/20pt" | un número con una de las siguientes unidades: vk font size grandevk font size grandevk font size x largevk font size xx largevk font size smallvk font size smallervk font size x smallvk font size xx small | Sí |
| style | text | Estilo de fuente. | vk font style italicvk font style oblique | No |
| variant | text | Especifica el tipo de letra en minúsculas. | vk font variant small caps | No |
| weight | text | Define el grosor de la fuente. | vk font weight 100vk font weight 200vk font weight 300vk font weight 400vk font weight 500vk font weight 600vk font weight 700vk font weight 800vk font weight 900vk font weight boldvk font weight boldervk font weight lighter | No |
Este objeto puede crearse con el comando VP Font to object.
La cadena abreviada devuelta puede asignarse a la propiedad "font" de una celda con la función VP SET CELL STYLE, por ejemplo.
Ejemplo
$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"
Ver también
4D View Pro Style Objects and Style Sheets
VP Font to object
VP SET CELL STYLE
VP SET DEFAULT STYLE