2 ; Ullrich von Bassewitz, 2009-10-30
6 .include "tgi-kernel.inc"
7 .include "tgi-vectorfont.inc"
8 .include "zeropage.inc"
11 ;-----------------------------------------------------------------------------
12 ; unsigned __fastcall__ tgi_gettextheight (const char* s);
13 ; /* Calculate the height of the text in pixels according to the current text
18 .proc _tgi_gettextheight
21 bne @L2 ; Jump if vector font
23 ; Return the height for the bitmap font
29 ; Return the height for the vector font
31 @L2: lda _tgi_vectorfont
34 beq @L1 ; Return zero if no font
39 ldy #TGI_VECTORFONT::HEIGHT
40 lda (ptr1),y ; Get height of font
44 sta ptr1+1 ; Save base height in ptr1
47 ldx _tgi_textscaleh+1 ; Get scale factor ...
48 jmp tgi_imulround ; ... and return scaled result