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_textheight (const char* s);
13 ; /* Calculate the height of the text in pixels according to the current text
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::TOP
41 ldy #TGI_VECTORFONT::BOTTOM
43 adc (ptr1),y ; Total font height is top + bottom
47 sta ptr1+1 ; Save base height in ptr1
50 ldx _tgi_textscaleh+1 ; Get scale factor ...
51 jmp tgi_imulround ; ... and return scaled result