documentationfor yFiles for HTML 3.0.0.3

Usages of Font

Properties

fontin LabelStyleGets or sets the typeface to use for the label.
fontin MarkupLabelStyleGets or sets the typeface to use for the label.
fontin WebGLLabelStyleGets the font for the label.

Method Return Values

createCopy (string?, number?, FontStyle?, 'normal' | 'bold' | 'light' | 'bolder' | 'lighter' | 'inherit' | string?, number?, TextDecorations?)in FontCreates a copy with the values of this instance or optionally the explicitly specified values.
from (Font)in FontCreates a Font instance from the given font-like object by performing automatic type conversion.

Method Parameters

LabelStyle ()in LabelStyle
MarkupLabelStyle ()in MarkupLabelStyleCreates a new instance using an ILabelStyleRenderer implementation as renderer.
addText (SVGGElement | SVGTextElement, string, Font, Size?, TextWrapping?, TextMeasurePolicy?, boolean?, GeneralPath?)in TextRenderSupportAdd the text content to the provided SVG text element.
invalidateTextMeasurementCache (Font?)in TextRenderSupportResets the cache that stores for a Font which actual TextMeasurePolicy is used if AUTOMATIC is set.
measureText (string, Font, Size?, TextWrapping?, TextMeasurePolicy?)in TextRenderSupportCalculates the width and height required to render the provided text using the provided Font, taking text-wrapping into account.
from (Font)in FontCreates a Font instance from the given font-like object by performing automatic type conversion.
WebGLLabelStyle (Font?, Color?, Color?, WebGLStroke?, HorizontalTextAlignment?, Insets?, WebGLLabelShape?, WebGLEffect?, number?, WebGLTextureRendering?, TextWrapping?, TextWrappingShape?, number?, VerticalTextAlignment?)in WebGLLabelStyleCreates a new label style that is rendered with WebGL2.