freemint / fvdi

fVDI fork with additional fixes and drivers.
https://fvdi.sourceforge.io
7 stars 6 forks source link

v_gtext horizontal alignment is wrong #31

Closed chrisridd closed 2 years ago

chrisridd commented 2 years ago

It turns out that v_gtext() (and presumably v_ftext()) are supposed to honour the vst_alignment() settings. I never knew this, so I went back to the original DRI VDI doc to verify this. The ST Profibuch is (surprisingly) incorrect.

NVDI uses the alignment settings. I haven't tried an Atari VDI.

FVDI gets centring and right-alignment wrong for bitmap fonts, but is correct for Freetype fonts. In the following screenshot v_gtext() is being passed the coordinates of the red lines where they cross. Right-aligned text is visibly wrong, centred text requires a closer look with a paint program, but is also wrong.

snap022

I suspect this is going wrong somewhere in text.s's lib_v_gtext code, or maybe textlib.c's lib_vqt_extent().

mfro0 commented 2 years ago

fixed with #31 Thank you, Chris!