Closed Bug 441110 Opened 16 years ago Closed 15 years ago

Add Tibetan to: Options-> Content -> Fonts & Colors -> Advanced > Fonts For

Categories

(Firefox :: General, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: chris.fynn, Assigned: smontagu)

References

Details

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

Please include an option for Tibetan (and Dzongkha) Languages under:
Options-> Content -> Fonts & Colors -> Advanced > Fonts For ...

IE 7 has the option to select fonts for Tibetan  

Ability to select fonts for Myanmar (Burmese), Lao, Thanna, Yi, Mongolian and several other languages is also missing from Firefox.  


Tibetan Script is supported by Linux (KDE & GNOME), Windows Vista, and Mac OSX 10.5.



 

Reproducible: Always
Attached image PNG illustration
Languages for which fonts can be selected. Right: Firefox 3,  Left: IE 7
Pleas add Dzongkha [dz] too!
yes, Dzongkha could be useful, please add.
Can you suggest good default fonts for Tibetan on Windows and OSX?
For Windows, Microsoft Himalaya is included with the OS in Vista and later versions and should probably be the default. Not sure about OSX; Mac needs its own incompatible font type rather than OpenType... On other systems either Tibetan Machine Uni or Jomolhari would be a good default, or just default to Sans,etc. and let the underlying font system choose a fallback.
On OS versions before Windows Vista and OS X 10.5, can we render Tibetan correctly with an appropriate font? I'm a little hesitant to fix this and bug 462100 if we are going to be displaying mis-rendered text. Maybe the solution is to document somewhere that correct rendering is conditional on OS support.
Blocks: 462100
With an up-to-date version of Tibetan Machine Uni font, Windows 2k and later can display Tibetan correctly with no software upgrades. For other fonts which use more advanced OpenType tables, upgrading USP10.DLL is necessary.

Regardless, doubts about whether Tibetan will be displayed correctly are not a reason to skip fixing this bug; in fact, for users with old USP10.DLL, it's even more important to be able to specify the font that will be used for Tibetan so that they can select one which works on their OS.

Also note that the very-common "Arial Unicode MS" font contains highly broken, incorrect glyphs for Tibetan. Short of deleting that font, fixing this bug is necessary to prevent Arial Unicode MS from getting used.
Mac OS X Leopard has built in Tibetan Unicode fonts: Kailasa and Kokonor.  These are smart AAT fonts and already work well in Firefox 3.  I would suggest Kailasa as the default on the Mac, as it is a bit more readable at smaller sizes.
Very happy to see movement on this! 

Yes document somewhere that correct rendering for complex scripts is conditional on OS support and having fonts installed. That is not a reason to hold off since the situation is even worse if users can't specify specific fonts for Tibetan and Dzongkha

If using AAT fonts then Tibetan script will render on earlier versions of OSX if fonts are installed.

If Uniscribe is used as the rendering engine on Windows then on Win 2K & XP USP10.DLL needs to be upgraded to a version that supports Tibetan script. (If MS Office apps are installed on the system then the USP10.DLL in that installation can be used to replace the one in \WINDOWS\System32\ to enable additional complex script support.)   

Fonts:

Kailasa is a nice font and fine for Mac OSX for Tibetan an Dzongkha. 


"Microsoft Himalaya" ships with Vista - but is not very nice font and visually the glyphs look particularly small compared to those of other scripts at any given point size  (< half the apparent size of the Kailasa font on the Mac!). There is also afaik no legal way for users to get "Microsoft Himalaya" unless they are using Vista. 

"Jomolhari" & "Tibetan Machine Uni" are good FOSS alternatives for "Microsoft Himalaya" - and they render at an apparent size much closer to that of the Apple font. Jomolhari supports *both* Unicode and GB/T20524-2006 - a Chinese national standard for encoding Tibetan script.

(Declaration of interest: I am the sole developer of the Jomolhari font and have done extensive work on the Tibetan Machine Uni font.)

As Rich points out, MS Arial Unicode produces a particularly horrendous and broken rendering of Tibetan script. It should not be used as a fallback font for Tibetan.

-  Chris 

A couple of websites in Bhutan with Tibetan script:
<http://www.dzongkha.gov.bt/>
<http://www.library.gov.bt/index-DZ.html>
(English version:
http://www.library.gov.bt/index.html)
Attached patch Patch (obsolete) — Splinter Review
Tryserver builds with this patch are at https://build.mozilla.org/tryserver-builds/2009-03-29_10:10-smontagu@mozilla.com-try-b4ab2182434/
Assignee: nobody → smontagu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Hi,

I don't know anything about Tibetan myself and i am speaking on behalf of my friend, who studied it and who is familiar with the different available fonts.

He recommended me Tibetan Machine Uni. He says that it Tibetan Machine Uni appears correctly on XP. I took a look at it myself and compared it to Jomolhari and we both concluded that Tibetan Machine Uni is better. He used his expertise and i used common sense - it appeared that some letters are not joining correctly.

Both are Free Software - Tibetan Machine Uni is GPL and Jomolhari is OFL.

Since Tibetan Machine Uni is probably better, it should have higher priority.

Hope it helps.
Attached patch Patch v.2 (obsolete) — Splinter Review
From reading previous comments I think that the better rendering with TMU is not because it's better as such, but because Jomolhari requires a later version of Uniscribe. However, that in itself seems like an adequate reason to make TMU higher priority so that things work better out of the box for more users.
Attachment #369921 - Attachment is obsolete: true
Attachment #418820 - Flags: review?(VYV03354)
another factor is that Tibet Machine Uni has a more comprehensive set of glyphs than Jomolhari. This may not affect most users, but it will affect some.
Jomolhari and Tibetan Machine Uni work with the same versions of Uniscribe. Neither work on Win XP without updating Uniscribe.  

Microsoft Himalaya (ships with Windows Vista) renders at a small size compared to both these fonts - and so text can be difficult to read at default size. Also does not work on XP without updating Uniscribe (same as Jomolhari & TMU). 
Does not work on Mac.

On the Mac  Kailasa (ships with OSX 10.5 and above) is a good choice - but it is an AAT font not an OpenType font (don't know whether that is an issue or not)

Tibetan Machine Uni does handle many more combinations than the current version of Jomolhari - but all the additional combinations handled by TMU are rare and do not occur in modern Tibetan or Dzongkha  - This is only an issue when viewing religious texts containing a lot of translitereated Sanskrit with rare combinations.    

An updated version of Jomolhari will shortly be available supporting many more 
of these rare combinations (essentially same as TMU) - in addition this updated version will work on Mac OSX as well as on Windows and Linux - and in Adobe applications.

As well as Unicode, the Jomolhari font also supports GB/T20524-2006 "Tibetan coded character set Extension A"  - a Chinese national character encoding standard for Tibetan. TMU, Microsoft Himalaya etc do not support this encoding.
(In reply to comment #14)
> On the Mac  Kailasa (ships with OSX 10.5 and above) is a good choice - but it
> is an AAT font not an OpenType font (don't know whether that is an issue or
> not)

We have separate defaults for the different platforms, so the intention is to use Kailasa as the default on OS X, and TMU / Jomolhari on others.

(In future, if we have better OpenType support on OS X, we might want to change our defaults there; but that's a separate issue.)

> An updated version of Jomolhari will shortly be available supporting many more 
> of these rare combinations (essentially same as TMU) - in addition this updated
> version will work on Mac OSX as well as on Windows and Linux - and in Adobe
> applications.

Nice! Does this mean it will have both OT and AAT layout tables? Or it will handle Tibetan entirely using the "generic" OT features that OS X currently supports, rather than the script-specific features specified for Uniscribe?

> As well as Unicode, the Jomolhari font also supports GB/T20524-2006 "Tibetan
> coded character set Extension A"  - a Chinese national character encoding
> standard for Tibetan. TMU, Microsoft Himalaya etc do not support this encoding.

While this may be helpful in some environments, I don't think it is relevant here, as Gecko should always be rendering the text via Unicode.
>> An updated version of Jomolhari will shortly be available supporting many 
>> more of these rare combinations (essentially same as TMU) - in addition 
>> this updated version will work on Mac OSX as well as on Windows and Linux - 
>> and in Adobe applications.

> Nice! Does this mean it will have both OT and AAT layout tables? Or it will
> handle Tibetan entirely using the "generic" OT features that OS X currently
> supports, rather than the script-specific features specified for Uniscribe?

It will have a seperate set of lookups using "generic" OT features under the DFLT script tag ~ this enables it to work both under Mac OSX and in Adobe CS3 & CS4 applications. I have already built a version of the existing Jomolhari font with such lookups since two newspapers here in Bhutan wanted to use Jomolhari as their standard font and needed a version that worked in InDesign. They have now been using that font for over six months on both Mac and Windows systems so I know it works well.

Mac & Adobe layout engines apply generic features under the DFLT script tag - Uniscribe ignores them.

 - Chris
>> An updated version of Jomolhari will shortly be available supporting many 
>> more of these rare combinations (essentially same as TMU) - in addition 
>> this updated version will work on Mac OSX as well as on Windows and Linux - 
>> and in Adobe applications.

> Nice! Does this mean it will have both OT and AAT layout tables? Or it will
> handle Tibetan entirely using the "generic" OT features that OS X currently
> supports, rather than the script-specific features specified for Uniscribe?

It will have a seperate set of lookups using "generic" OT features under the DFLT script tag ~ this enables it to work both under Mac OSX and in Adobe CS3 & CS4 applications. I have already built a version of the existing Jomolhari font with such lookups since two newspapers here in Bhutan wanted to use Jomolhari as their standard font and needed a version that worked in InDesign. They have now been using that font for over six months on both Mac and Windows systems so I know it works well.

Mac & Adobe layout engines apply generic features under the DFLT script tag - Uniscribe ignores them.

 - Chris
Comment on attachment 418820 [details] [diff] [review]
Patch v.2

Sorry forgetting to review the patch.
It is no longer applied cleanly. Could you update to trunk?
> patching file gfx/thebes/src/nsUnicodeRange.cpp
> Hunk #1 FAILED at 67.
> 1 out of 1 hunk FAILED -- saving rejects to file gfx/thebes/src/nsUnicodeRange.cpp.rej
Attached patch Merged to trunkSplinter Review
The latest patch isn't working so well on current trunk. Specifically, setting the font for Tibetan from preferences UI has no effect, and the only way to change it is to modify font.name.list.{family}.x-tibt in about:config.

I'm not sure if this is by design, unintentional fall-out from recent changes to font code or a bug in my patch. Jonathan, can you help?
Comment on attachment 429409 [details] [diff] [review]
Merged to trunk

So after more analysis, it seems that the font pref only works on text tagged as lang=bo (or dz), but not with untagged Tibetan text. This seems to be a regression since 3.6, but it also applies to other scripts that I tested, so I'm not going to hold this bug back for it.
Attachment #429409 - Flags: review?(VYV03354)
Comment on attachment 429409 [details] [diff] [review]
Merged to trunk

> but not with untagged Tibetan text. This seems to be a
regression since 3.6, but it also applies to other scripts that I tested
OK, I don't care about the regression. Is a bug already filed?
Attachment #429409 - Flags: review?(VYV03354) → review+
Attachment #418820 - Attachment is obsolete: true
Attachment #418820 - Flags: review?(VYV03354)
http://hg.mozilla.org/mozilla-central/rev/580c63190d26
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
(In reply to comment #21)
> (From update of attachment 429409 [details] [diff] [review])
> So after more analysis, it seems that the font pref only works on text tagged
> as lang=bo (or dz), but not with untagged Tibetan text. This seems to be a
> regression since 3.6, but it also applies to other scripts that I tested,

In a quick experiment with Cyrillic, it seemed to me that 3.5 and 3.6 on OS X showed the same behavior - the font preference applies to text explicitly tagged with language, but not otherwise. (It may differ on other platforms.)

If you're seeing a regression, could you please file a bug with testcases for this? Thanks.
Depends on: 550772
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: