firefox can not correctly display mongolian (vertical_lr) on android.

RESOLVED WORKSFORME

Status

()

Firefox
Untriaged
RESOLVED WORKSFORME
2 years ago
2 years ago

People

(Reporter: siqinbilige, Unassigned)

Tracking

41 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
Created attachment 8675991 [details]
firefox_android_vertical_lr_mongolian_incorrect.png

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20151014143721

Steps to reproduce:

access : http://www.mongolfont.com/


Actual results:

firefox_android_vertical_lr_mongolian_incorrect.png



Expected results:

firefox_android_vertical_lr_mongolian_correct.png
(Reporter)

Comment 1

2 years ago
Created attachment 8675992 [details]
firefox_android_vertical_lr_mongolian_correct.png
(Reporter)

Comment 2

2 years ago
The glyphs need to rotate 90deg clockwise.
Strange. I can reproduce this with current Nightly on an Android tablet ... but on a FirefoxOS device, it renders fine.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 4

2 years ago
Because of technical reason, the glyphs not upright in mongolian(1800..18AF) and Phags-Pa(A840..A87F) fonts.
It is counterclockwise 90deg.
So, according to http://unicode.org/reports/tr50/ mongolian(1800..18AF) and Phags-Pa(A840..A87F) need to rotate 90deg clockwise.
(Reporter)

Comment 5

2 years ago
in vertical_lr writing mode.
(Reporter)

Comment 6

2 years ago
in both vertical_rl and vertical_lr writing mode.
jdaggett: offhand, I'm mystified why this would fail on Android only, when it appears to work OK everywhere else. Maybe something about how we're using Freetype (though I would have expected that to be the same on b2g)? If you have time to investigate a bit, that'd be really helpful.
Flags: needinfo?(jdaggett)
siqinbilige: I notice the http://www.mongolfont.com/ site is serving different versions of the font: Firefox on OS X gets mnglwhiteaat.ttf, while on Windows it gets mnglwhiteotf.ttf. (Is this a recent change? I don't remember noticing it before.)

Unfortunately, the use of AAT-based webfonts for scripts that require complex shaping -- such as Mongolian -- is not supported by Firefox (or in Chrome, I believe), because the AAT tables are discarded by the OTS sanitizer. (It's too easy for a badly constructed -- or malicious -- AAT font to cause crashes deep within Core Text code...)

Therefore, it would be preferable to serve the OpenType version mnglwhiteotf.ttf to Mac clients, except for Safari. This will give you better results in both Firefox and Chrome.
(Reporter)

Comment 9

2 years ago
Yes, I'm sorry I wasted your time.

Before the harfbuzz implement into the browsers, there is no fine rendering system on android.
So I used turetype font(no GSUB nor morx, but has PUA with unicode) and rendering it to privete code with javascript.
Because the result glyphs are PUA and not mongolian unicode, so the glyphs did not rotate 90deg clockwise.
This is only android issue.

firefox can correctly display mongolian (vertical_lr) on android.
http://www.mongolfont.com/test/firefox/
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME

Updated

2 years ago
Flags: needinfo?(jdaggett)
Aha, that explains things! Thanks for following up here.
You need to log in before you can comment on or make changes to this bug.