processFontSize
[ Function ]
public static processFontSize(
element: JQuery | Element[] | NodeListOf<Element> | HTMLCollectionOf<Element> | Element | undefined,
valueNew: number | null | undefined,
unitNew: TcHmi.DimensionUnit = 'px'
): void;
Sets the font size for one or more HTML or SVG elements. Please note that a percentage unit is not relative to the size of the parent element but to the font size of the parent element.
Parameter
Name | Type | Description |
---|---|---|
element Info: Type Element supported from version 1.10 | JQuery, Element[], NodeListOf<Element>, HTMLCollectionOf<Element>, Element, undefined |
|
valueNew | Numerical value for the font size. | |
unitNew | Unit for the font size (if not provided, then 'px' applies) |
Return value
Type | Description |
---|---|
void | No return value |
Available from 1.8 |
Sample - JavaScript
var newElem = $('<div class="testdiv"></div>');
TcHmi.StyleProvider.processFontSize(newElem,
42,
'px'
);