@lightningjs/renderer
Version:
Lightning 3 Renderer
14 lines • 413 B
JavaScript
/**
* Calculate the default line height given normalized font metrics
*
* @remarks
* This method may be used for both the WebTrFontFace and SdfTrFontFace font types.
*
* @param metrics
* @param fontSize
* @returns
*/
export function calcDefaultLineHeight(metrics, fontSize) {
return fontSize * (metrics.ascender - metrics.descender + metrics.lineGap);
}
//# sourceMappingURL=TextRenderingUtils.js.map