b2dGetStringHeight

Returns the exact height of rendered text string in pixels. Takes text (string to measure, any UTF-8 text), font (font handle from b2dLoadFont, positive integer). Returns the exact height of rendered text string in pixels.

2D Overlay

Parameters & Returns

Parameters

text String
font Int

Returns

Int

Quick Summary

Returns the exact height of rendered text string in pixels. Takes text (string to measure, any UTF-8 text), font (font handle from b2dLoadFont, positive integer). Returns the exact height of rendered text string in pixels.

Technical Exegesis...

Returns the exact height of rendered text string in pixels. Takes text (string to measure, any UTF-8 text), font (font handle from b2dLoadFont, positive integer). Returns integer height (vertical space required for text in pixels, 0 if invalid font). Calculates precise rendering height based on actual characters in string (considers ascenders and descenders).

Example

Example.bam
; No example implemented yet