[sword-devel] BPBible 0.3
Chris Little
chrislit at crosswire.org
Sat Jun 7 01:03:00 MST 2008
DM Smith wrote:
> On Jun 6, 2008, at 7:13 PM, Ben Morgan wrote:
>>
>> Just a question - do you think that the GUI controls, such as text
>> boxes and lists and what not (everything but the actual text of the
>> module), should be able to have a different font from the actual
>> text? Currently under Windows at least, they would have a different
>> font - arial I think is the default for the html, while it uses the
>> default windows font for the GUI controls (probably verdana or
>> something).
>
> As Peter and I worked on translating BibleDesktop into Farsi we
> discovered many things about fonts and internationalization. The core
> lesson is:
>
> Fonts should be able to be tied to a language for the text that is
> being displayed. While it may be nice to have fonts set per module, it
> is not necessary. When a text consists of multiple languages, each
> piece should be clearly marked (as with xml's xml:lang attribute).
>
> (Actually, it really should be set at the level of "script" but I
> don't know of any formalization of scripts that we could use. (Such as
> ISO-639 for languages). I'm not sure that even if such a notion
> existed whether we could make it understandable to users.)
ISO 15924 (or even BCP 47) as Jonathan suggests is the standard you're
looking for. OSIS allows both xml:lang and script, with the
understanding that the latter contain an ISO 15924 code. The definition
of xml:lang has changed a little since we wrote OSIS, so script is
basically unnecessary now. xml:lang holds a BCP 47 tag, which can
contain language, script, & locale subtags.
See http://en.wikipedia.org/wiki/BCP_47 or just google BCP 46 or its two
RFCs: 4646 and 4647.
In assigning fonts throughout a text that isn't nicely tagged with
script attributes, ICU can help you by identifying the script to which
each character belongs (according to its ISO 15924 designation). I don't
know whether Java itself provides anything similar.
--Chris
More information about the sword-devel
mailing list