Este es el sitio web histórico de la documentación de 4D. La documentación se está trasladando progresivamente a developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
VP Object to font
|
VP Object to font ( objFuente ) -> Resultado | ||||||||
Parámetro | Tipo | Descripción | ||||||
objFuente | Objeto |
![]() |
Objeto fuente | |||||
Resultado | Texto |
![]() |
Fuente abreviada | |||||
El comando VP Object to font devuelve una cadena abreviada de fuente de objFuente.
En objFuente, pase un objeto que contenga las propiedades de la fuente. Las siguientes propiedades son soportadas:
Propiedad | Tipo | Descripción | Valores posibles | Obligatorio |
family | texto | Especifica la fuente. | toda familia de fuentes estándar o genérica. Ej. "Arial", "Helvetica", "serif", "arial,sans-serif" | Sí |
size | texto | Define el tamaño de la fuente. El alto de línea se puede agregar al tamaño de fuente: tamaño de fuente/alto de línea: Ej "15pt/20pt" | un número con una de las siguientes unidades: "em", "ex", "%", "px", "cm", "mm", "in", "pt", "pc", "ch", "rem", "vh", "vw", "vmin", "vmax" o uno de los siguientes: 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 | Sí |
style | texto | El estilo de la fuente. | vk font style italic,vk font style oblique | No |
variant | texto | Especifica la fuente en mayúsculas pequeñas. | vk font variant small caps | No |
weight | texto | Define el grosor de la fuente. | 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 | No |
Este objeto se puede crear con el comando VP Font to object.
La cadena abreviada devuelta se puede asignar a la propiedad "fuente" de una celda con VP SET CELL STYLE, por 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 contiena "bolder oblique small-caps 16pt arial"
Objetos estilo y hojas de estilo 4D View Pro
VP Font to object
VP SET CELL STYLE
VP SET DEFAULT STYLE
Producto: 4D
Tema: Lenguaje 4D View Pro
Número
9766
Creado por: 4D v17 R6
4D View Pro ( 4D v19)