;
.code
-.proc _tgi_gettextwidth
+.proc _tgi_gettextwidth
ldy _tgi_font
bne @L1 ; Jump if vector font
; Return the width of the string for the bitmap font
- ldy _tgi_charwidth
- sta ptr1
jsr _strlen
- jsr umul8x16r16
- ldy _tgi_textscalew+2 ; Get rounded scale factor
+ ldy _tgi_charwidth+1
sty ptr1
jmp umul8x16r16