Mike Maxwell wrote: > Hussein Shafie wrote: >> The clean solution is to edit the declaration of Java's SansSerif font >> in order to map the Vrinda font to the bengali range of Unicode >> characters (0980?09FF). See >> http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html > > OK, I did this and it still doesn't work. Specifically, here's what I > did to the fontconfig.properties file (the only fontconfig file that is > relevant on my PC, apart from the compiled fontconfig.bfc--but according > to the above page at Sun, fontconfig.properties takes priority over > fontconfig.bfc): > > --Added a line at the top of the 'Component Font Mappings': > allfonts.bengali=Vrinda > > --Modified the Default Search Sequence line to include Bengali > (unclear why this is necessary, but it is): > sequence.allfonts=alphabetic/default,bengali,dingbats,symbol > > --Modified the UTF-8 Search Sequence line to include Bengali (ignore > spurious line break inserted by email): > sequence.allfonts.UTF-8.hi=alphabetic/ > 1252,devanagari,bengali,dingbats,symbol > > --Added a line at the top of the 'Font File Names': > filename.Vrinda=VRINDA.TTF > > (The vrinda.ttf file is indeed present in my Windows/fonts directory.) > > I tested this on a Java applet that someone gave me; without the above > changes, the applet displays Bengali text as boxes. With the above > changes, the applet displays Bengali text correctly. > > Unfortunately, this has no effect on XMLmind; the Bengali characters > continue to display as boxes. > > Another method that was suggested to me is to put the Vrinda.ttf file in > Java's lib/fonts/fallback directory. I tried this as well, but it > likewise has no effect on XMLmind (it does work for the little Java > applet I was given). I am told that this method only works if the app > in question uses Java2D for displaying characters; presumably XMLmind > does not.
Yes. XMLmind XML Editor does not use the convoluted and slow text rendering methods of Java2D. However, saying "this method only works if the appin question uses Java2D" simply cannot be true. See below. > I also confirmed (using Microsoft's procman.exe) that when XMLmind > loads, Java reads both my modified fontconfig.properties file, and the > Vrinda.ttf file in my Windows/fonts directory. > > Where do I go from here? Well, a variant of what you did worked for me. See attached Begali.html and corresponding screen shot in XXE. Notice the Character tool in the screen shot. Here's what I did (without really understanding what I did, I must confess): In jre/lib/: [1] Renamed fontconfig.bfc to fontconfig.bfc.HIDE, just to be sure that Java will take fontconfig.properties. [2] Copied fontconfig.properties.src to fontconfig.properties. [3] Modified fontconfig.properties (using Emacs) as follows (see attachment): ===================================================================== $ diff fontconfig.properties.src fontconfig.properties 15a16 > allfonts.bengali=Vrinda 143c144 < sequence.allfonts=alphabetic/default,dingbats,symbol --- > sequence.allfonts=alphabetic/default,bengali,dingbats,symbol 169c170 < sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,dingbats,symbol --- > sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,bengali,dingbats,symbol 240a242 > filename.Vrinda=VRINDA.TTF ====================================================================== Et voil?! It worked fine. Note that I did all my tests with XXE v3.5.2, Java 1.6 (but I don't see why it wouldn't work with Java 1.5) and Windows XP SP2. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070321/d013782d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Bengali.png Type: image/png Size: 30333 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070321/d013782d/attachment.png -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fontconfig.properties Url: http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070321/d013782d/attachment.bat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fontconfig.properties.src Url: http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070321/d013782d/attachment-0001.bat

