b2dLoadTTF

Loads a TrueType/OpenType font (.ttf/.otf) at a given pixel height. Takes path (path to the font file) and pixelHeight (the size to render glyphs at, in pixels). Returns a font handle (positive integer for success, 0 for failure).

2D Overlay

Parameters & Returns

Parameters

path String
pixelHeight Int

Returns

Int

Quick Summary

Loads a TrueType/OpenType font (.ttf/.otf) at a given pixel height. Takes path (path to the font file) and pixelHeight (the size to render glyphs at, in pixels). Returns a font handle (positive integer for success, 0 for failure).

Technical Exegesis...

Loads a TrueType/OpenType font and returns a normal font handle - the same kind of handle b2dLoadFont returns, so every text function (b2dDrawText, b2dDrawTextEx, b2dGetStringWidth, b2dGetStringHeight, b2dGetFontWidth, b2dGetFontHeight, b2dFreeFont) works with it.

Example

Example.bam
; No example implemented yet