|
From: Arjen M. <arj...@wl...> - 2005-01-24 08:09:14
|
Rafael Laboissiere wrote: > > * Alan W. Irwin <ir...@be...> [2005-01-22 21:31]: > > > + There are still problems with vertical alignment of characters. See > > example 6 line 100 where the characters move up or down depending on whether > > they have an ascender, descender or neither. > > No idea where this come from, but it is not really a showstopper. If I find > inspiration, I will take a look. > > > + Rafael's recent changes did help the vertical alignment of full-scale > > labels, but for smaller plots (e.g., the 4 subplots of example 1) the > > vertical > > alignment of labels is still off. > > You have an eagle's eye! The labels are verically misaligned by only one > pixel. Integer truncation is the root of the problem. The characters have > 12 pixels and the exact computation of vertical shift is around 5.93. > However an integer shift operation (>> 6) yields 5 instead. > > I do not know yet how I will cope with this. The code in plfreetype.c is > unfortunately heavily based on such integer truncation operations. > Maybe we should use the "fuzzy" algorithms that were developed years ago for this kind of things. I have got the code (Fortran) and it can be easily converted to C. These algorithms come from the APL community and are meant to help with such operations in a consistent way. No idea if it will work, though - that will require experimentation. Regards, Arjen |