LNXSDK/Kha/Sources/kha/Font.hx
2025-01-22 16:18:30 +01:00

19 lines
494 B
Haxe

package kha;
import haxe.io.Bytes;
extern class Font implements Resource {
function height(fontSize: Int): Float;
function width(fontSize: Int, str: String): Float;
function widthOfCharacters(fontSize: Int, characters: Array<Int>, start: Int, length: Int): Float;
function baseline(fontSize: Int): Float;
function unload(): Void;
// Portability warning, this works only on some platforms but can usually read ttf
static function fromBytes(bytes: Bytes): Font;
}