Discussion in 'Java' started by, Mar 15, 2007.

  1. Guest

    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 '' (there are no 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 If I'm
    understanding the instructions correctly, you just copy that file to, and edit the
    latter; I guess Java then reads the file at
    startup rather than the file, which
    presumably means starting takes fractionally longer. If on the other
    hand I need to compile my modified 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 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 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 file, I can't tell.)

    Assuming I've guessed right thus far, I made the following changes to
    the 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 file, i.e. is 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 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?)


    Mike Maxwell
    CASL/ U MD
    , Mar 15, 2007
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page