I'm using a Java-based application (XMLmind) on MsWindows XP SP2,
which is relevant, because the support for rendering Bengali Unicode
was fixed in SP2. However, I'm unable to get the fix to be used by
this Java app.
Specifically, I want the app to use a particular font, the Vrinda.ttf
font, for Unicode Bengali (but not for other regions of Unicode).
Can't seem to make it work.
I've been advised to edit the fontconfig file, using the instructions
The instructions seem (to me) a bit unclear; apparently Java looks for
a file with a name like 'fontconfig.properties' (there are no
fontconfig.XP.properties files, etc. on my PC). I don't have such a
file, only the compiled version, but I also have the source for that
compiled version, namely fontconfig.properties.src. If I'm
understanding the instructions correctly, you just copy that
fontconfig.properties.src file to fontconfig.properties, and edit the
latter; I guess Java then reads the fontconfig.properties file at
startup rather than the fontconfig.properties.bfc file, which
presumably means starting takes fractionally longer. If on the other
hand I need to compile my modified fontconfig.properties file, that
probably explains my lack of results--but I don't know how to compile
I'm also not certain what I have to do to make Java re-load the
fontconfig.properties file. I'm assuming that if I shut down XMLmind,
and re-start it, that Java also shuts down and re-starts, and in re-
starting it reads in the modified fontconfig.properties file.
(Actually, I just checked that with the Windows Task Manager, and
indeed Java is shutting down when I close XMLmind. Whether Java is
reading in my munged fontconfig.properties file, I can't tell.)
Assuming I've guessed right thus far, I made the following changes to
the fontconfig.properties file, following the existing code for
--Added a line at the top of the 'Component Font Mappings':
--Modifed the UTF-8 Search Sequence line to include Bengali:
--Added a line at the top of the 'Font File Names':
(The vrinda.ttf file is indeed in my Windows/fonts directory.)
This has no effect; XMLmind is still not using the Vrinda font to
render UTF-8 Bengali text.
A couple things occur to me. How does Java know what to do with the
string 'bengali'? Does it in fact know that this refers to the
Unicode range U+0980 to U+09FF? Does Java actually read the
fontconfig.properties file, i.e. is fontconfig.properties.src the
correct format, or do I need to compile this file? If so, how? Or is
it perhaps the case that XMLmind overrides what Java thinks it's
supposed to do for rendering Bengali text? (The XMLmind people are
the ones who told me to mung the fontconfig.properties file, so I
don't think this is the case; but how could I test it, i.e. how can I
get raw Java to render some Bengali text for me?)
CASL/ U MD
|All times are GMT. The time now is 08:27 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.