maxwell at umiacs.umd.edu wrote:
> We're having trouble getting XMLmind to correctly display text in the
> Bengali script.  If I set the default san-serif font for the entire
> document to Vrinda in the Options menu, the text in question displays
> correctly.  But Vrinda is a reasonably ugly font for Latin script text
> (and it doesn't do IPA, which we also need), so I'd rather use Arial
> Unicode MS for English, and Vrinda only for Bengali (Unicode) text.
> 
> I tried to do this by first tagging Bengali text as <phrase
> lang="ben">...</phrase>, and then adding the following to the relevant
> .css:
> 
>    phrase[lang="ben"]
>    {
>        font-family: Vrinda;
>    }
> 
> However, the result is that text tagged as above shows up as square boxes,
> meaning (I presume) that whatever font is being used for that text does
> not have Bengali Unicode characters.
> 
> I verified that the css is selecting the correct text by adding "color:
> blue;" to the above instruction.  Then I get blue boxes :-(.
> 
> My guess is that XMLmind (or Java) does not recognize the Vrinda font as a
> "font-family".  But it seems like it should, since (1) examples of the use
> of css elsewhere seem to include names of individual fonts, not just
> families of fonts (e.g.
> http://www.w3schools.com/css/pr_font_font-family.asp), 

Basically XMLmind XML Editor only supports the serif, sans-serif and
monospaced *logical* fonts.

XMLmind XML Editor considers a well-known font like Arial to be an alias
of sans-serif. That's it.

Vrinda is not a well-known font and therefore, as a fallback, is
considered to be an alias of serif.

This is documented. See the "font-family" table row in
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/restrict.html

Please note that XMLmind has never claimed to be CSS compliant. Excerpts
of http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/index.html:

---
XMLmind XML Editor (XXE for short) supports a *subset* of CSS2 and a few
CSS3 features.

The role of the CSS style sheet in XXE is to make the XML document easy
to read (get rid of the tree view, no visible tags, etc) and to make its
structure (chapter, section, list, list item, etc) easy to understand.

This is very different from the role of CSS style sheets in Web
browsers, for which the CSS standard has been designed.
---




> and (2) XMLmind is
> happy if I choose the Vrinda font in its Options | View dialog.

The Options dialog, View section allows to specify something like: ``Do
not use Java's SansSerif font (which may be used to render the whole
Unicode Basic Multilingual Plane), instead use Verdana which I find nicer''.

The consequence of doing this is that Verdana cannot be used to render
the whole Unicode Basic Multilingual Plane. But for some users, this is
not a problem.




> I've tried variations, such as double-quoting "Vrinda", adding ".ttf",
> using lower case, etc., all to no avail.  (BTW, I believe Vrinda is a font
> that ships with Windows XP SP2.  It would of course be nice to have a more
> generic solution, but I don't know of one, and in any case all our work is
> being done on PCs.)
> 
> How can I get XMLmind to recognize the Vrinda font in the context of a .css?
> 

You simply cannot do that, in our opinion for very good reasons, see
below, but you may consider this to be a limitation of XMLmind XML
Editor if you want.

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

I don't understand why this is not already the case. All this should
work fine out of the box. May be on the Mac or with latest Java[tm]
runtime, this is the case.


Reply via email to