diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index c63c99a3c5..347c82576d 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -6553,6 +6553,13 @@ declare namespace Highcharts { * @since 5.0.0 */ definition(def: object): ElementObject; + /** + * Utility to return the baseline offset and total line height from the font size. + * + * @param fontSize The current font size to inspect. If not given, the font size will be found from the DOM element. + * @param elem The element to inspect for a current font size. + */ + fontMetrics(fontSize: string, elem: ElementObject): FontMetrics; /** * Add an SVG/VML group. * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. @@ -6615,6 +6622,21 @@ declare namespace Highcharts { text(str: string, x: number, y: number): ElementObject; } + interface FontMetrics { + /** + * The baseline relative to the top of the box. + */ + b: number; + /** + * The font size. + */ + f: number; + /** + * The line height. + */ + h: number; + } + interface Renderer { new (parentNode: HTMLElement, width: number, height: number): RendererObject; }