[OpenJDK 2D-Dev] Thoughts about font implementation
roman.kennke at aicas.com
Tue Aug 12 20:34:12 UTC 2008
> Yep, Phil is the one who designed font management code.
I can't wait for Phil to come back and have a look at our redesign of
the FontManager related code :-) (Maybe it's not so bad that I am in
holiday then .. ;-) ). But this one here is not so much about
FontManager but more about the low level Freetype loading stuff. (I
thought that code was from you Igor? I might be wrong though).
> I remember there were some important reasons why callback-based approach
> was introduced
> but can not recall them right now.
At least, using mmapped file/buffers looks much more elegant. And I'm a
great believer in elegant & beautiful code. And honestly, the callback
code does not look very trustworthy (storing JNI_Env in a struct and
hope it is still valid when FreeType calls back? I've shot myself in the
foot too often with such code...).
> From the top of the head i'd sugegst to check impact of such change on
> performance and perceived
> footprint scanning large set of large fonts.
I can do that. Any suggestions on how to do that easily? I'm not sure
how that (FreeType) implementation works, but I know at least one font
implementation that doesn't actually load anything until the
corresponding glyphs are needed (also mmap-based, very handy... this is
the code in Classpath, all Java, all nice :-D ).
> I likely be mistaken here
> but on some platforms
> (Windows) this might have noticeable negative consequences.
Unfortunately, I don't have a Windows box around, and can't setup one
easily. Windows licenses and VS licenses are too costly for my taste.
Also, at work, some people tried to setup a build of OpenJDK on Windows
and failed (or at least, did not succeed after 16 hours of work or so).
But I can at least test on Linux.
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com * Tel: +49-721-663 968-48
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
More information about the 2d-dev