From: Alan W. I. <ir...@be...> - 2006-01-05 06:56:38
|
On 2006-01-05 15:47+1000 Andrew Roach wrote: > At 10:37 AM 4/01/2006 -0800, you wrote: >> The fundamental issue here is that PLplot and the various fonts have a >> different origin for characters so a transformation has to be applied >> between the two depending on font size. The history here is that Andrew= =20 >> was >> the original author of plfreetype.c, and I assume he got this=20 >> transformation >> done correctly for the windows fonts available to him at that time on hi= s >> DJGPP (or was that MinGW?) platform. > > DJGPP. Gosh, that seems like a long time ago now=85 > >> But that transformation was not >> correct for freefont 2003, and Rafael hacked the code to correct that. > > I think it was more a case of tweaking them to get them to look better th= an=20 > hacking ;-). Well, IIRC some of the freefont 2003 results were out of position by half a character height before Rafael made some corrections to plfreetype.c. Werner, is that the rough size of the mis-positioning you are seeing or is it much larger/smaller? > > The original DJGPP code was adopted from a screensaver I had written usin= g=20 > freetype. I then just took the freetype code and dropped it into the DJGP= P=20 > screen driver. To speed things up in that original screensaver on my Pent= ium=20 > 66 (Gosh, that seems like a long time ago now=85), I made as many code=20 > optimisations as I could, like using integer maths and bit transformation= s=20 > rather than floating point ops. Rafael removed the integer logic and=20 > bit-shifts and replaced it with floating point arithmetic, then changed t= he=20 > transformations to match it. > >> There was no feedback from Andrew about whether those hacks messed up th= e >> transformation for his windows fonts so I assumed until now that it was = a >> solved problem. However, from Werner's report it appears not. > > No, it didn't change anything very much; almost imperceivable changes to = font=20 > sizes and micro-positioning changes is about all, and I think Rafael's=20 > versions were a vast improvement. Andrew, it appears you are happy with the font positioning for the windows fonts you have access to, and I am mostly happy with the positioning of the freefont "2003" fonts on Linux (as is Werner), but Werner appears to have found some other cases where the transformation is not done correctly. Andrew, do you have any idea what might be causing this? For example, does the transformation depend on data that might be stated incorrectly (or be missing entirely) for certain poorly constructed TrueType fonts? Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |