Closed Bug 993353 Opened 10 years ago Closed 10 years ago

[Tarako] Change default Bengali/Devanagari/Tamil fonts to Noto Sans

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3T+, b2g-v1.3 wontfix, b2g-v1.3T fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
blocking-b2g 1.3T+
Tracking Status
b2g-v1.3 --- wontfix
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: lchang, Assigned: seinlin)

References

Details

Attachments

(5 files)

In Bug 987496, we've made a Hindi language input method.  However, the current default Devanagari (the writing system of Hindi language) font in B2G seems to be inaccuracy. Since Hindi/Tamil/Bengali languages are requirements of v1.3T, I propose replace their default fonts with Noto Sans [1], which are default fonts already used in Android 4.4.

[1] http://www.google.com/fonts/specimen/Noto+Sans
Flags: needinfo?(ttsai)
Flags: needinfo?(styang)
Flags: needinfo?(mwu)
We've already switched to Noto for Bengali fonts in bug 967177 - so you should request blocking on that bug for that particular language.
Flags: needinfo?(mwu)
Luke, if you can confirm bug 967177 can resolve this bug, can you please 1.3T? that bug and we can dup this bug over. thanks
Flags: needinfo?(lchang)
Bug 967177 changed the font used for Bengali only, so it doesn't address the issue reported with displaying the Devanagari (Hindi) keyboard.
Yes, bug 967177 has already addressed the Bengali font issue so let's change this title and focus on Devanagari and Tamil. I will also set 1.3T? on bug 967177.
Flags: needinfo?(lchang)
Summary: Change default Bengali/Devanagari/Tamil fonts to Noto Sans (Default fonts on Android 4.4) → Change default Devanagari/Tamil fonts to Noto Sans (Default fonts on Android 4.4)
See Also: → 967177
Attached image Lohit v.s. Noto Sans
It's the difference of some characters between Lohit font and Noto Sans font.
Attached file Pull request for v1.3t
Luke, Can you help me try this patch and give me a feedback? Thanks!
Attachment #8404051 - Flags: feedback?(lchang)
After these fonts are replaced, the size of system.img increases slightly. I think the reason is 3 Lohit fonts were replaced by 6 Noto fonts.

before:    
 99299904 Apr  9 19:57 out/target/product/sp6821a_gonk/system.img
after:
 99500544 Apr  9 23:37 out/target/product/sp6821a_gonk/system.img

Luke, Can you also help me to confirm if we need both of Bold and Regular for each of them? Thanks!
Flags: needinfo?(ttsai)
are we licensed to use this font?
Flags: needinfo?(lchang)
Flags: needinfo?(padamczyk)
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

Flagging Patryk on ui-review? as this is a font issue.
Attachment #8404051 - Flags: ui-review?(padamczyk)
It would be good to provide a before and after screenshot. But overall if we are able to use this font under its existing license, I am okay with it. We are using Android's fonts as a fall back if Fira doesn't support a language already.
Flags: needinfo?(padamczyk) → needinfo?(kli)
ni? Steven to confirm comment 8
Whiteboard: [tarako_only]
Attached image Lohit vs Noto fonts
Patryk, Before and After screenshots are upates. These fonts are under Apache License, version 2.0, I think we can use it.
Flags: needinfo?(kli)
Agree with Kai-Zhen. We've already used two Noto Sans fonts in master branch.
Flags: needinfo?(lchang)
I noticed that we're not using the compressed version of Bengali font in master branch but I guess it is important for Tarako. 

Since Bug 987582 has already been landed in 1.3T, we may need file another bug to compress Noto Sans Bengali font after Bug 967177 is uplifted. Otherwise, I suggest we can replace all the necessary fonts of these three languages (including Bengali, just as the original title and Kai-Zhen's patch) at once in this bug and cancel the "1.3T+" flag in Bug 967177 as we don't need that anymore.

Joe, how do you think?
Flags: needinfo?(jcheng)
(In reply to Luke Chang [:lchang] from comment #14)
> Otherwise, I suggest we can replace all the necessary fonts of these three
> languages (including Bengali, just as the original title and Kai-Zhen's
> patch) at once in this bug

It's base on this bug will only be patched in v1.3t branch.
(In reply to Kai-Zhen Li from comment #7)
> After these fonts are replaced, the size of system.img increases slightly. I
> think the reason is 3 Lohit fonts were replaced by 6 Noto fonts.
> 
> before:    
>  99299904 Apr  9 19:57 out/target/product/sp6821a_gonk/system.img
> after:
>  99500544 Apr  9 23:37 out/target/product/sp6821a_gonk/system.img
> 
> Luke, Can you also help me to confirm if we need both of Bold and Regular
> for each of them? Thanks!

In general, using Bold-specific font will be much more beautiful than using system-simulated one but I'm not sure how the bold font works on FxOS.

Arvin, could you help confirm that? Thanks.
Flags: needinfo?(arvin.zhang)
Dear Luke,

Frankly speaking, I've no idea about how the bold font works on FxOS as well. However, the current most important thing should be to ensure function well of IME and we could try to further optimize later. How do you think?
Flags: needinfo?(arvin.zhang)
Actually, IME functions won't be affected no matter the Bold-version fonts exist or not. However, I propose leaving both of Regular and Bold since the increase of size seems acceptable.
triage: 1.3T+, this is also partner request
blocking-b2g: 1.3T? → 1.3T+
Flags: needinfo?(jcheng)
Sorry for changing the title again. Let's replace the fonts of three languages on v1.3t.
Summary: Change default Devanagari/Tamil fonts to Noto Sans (Default fonts on Android 4.4) → [Tarako] Change default Bengali/Devanagari/Tamil fonts to Noto Sans
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

Kai-Zhen, I think this patch can meet the partner's need. Thank you.
Attachment #8404051 - Flags: feedback?(lchang) → feedback+
Kai-Zhen already has a patch.
Assignee: nobody → kli
Status: NEW → ASSIGNED
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

Michael, Can you help me review this? Thanks!
Attachment #8404051 - Flags: review?(mwu)
Patryk, Just a soft remind that I already attached the screenshot files. Thanks!
Flags: needinfo?(padamczyk)
Johnathan, I'm just wondering, do we need changes to all.js to pick up those changed fonts, or does this work through the magic "I'll use any font I can, and this is the only one that claims to work"?
Great ship it. The Noto fonts are much thicker and easier to read.
Flags: needinfo?(padamczyk)
(In reply to Axel Hecht [:Pike] from comment #25)
> Johnathan, I'm just wondering, do we need changes to all.js to pick up those
> changed fonts, or does this work through the magic "I'll use any font I can,
> and this is the only one that claims to work"?

They should "just work", thanks to the usual fallback behavior.

Providing appropriate font prefs in all.js would be good in principle, although I'm not sure much text would actually hit those, depending on language tagging, etc.

Also, for better fallback efficiency, we really should provide a B2G version of gfxAndroidPlatform::GetCommonFallbackFonts. This currently tries the Droid Sans Devanagari and Tamil font families for the respective scripts, and those aren't present on B2G.
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

This looks good, but can you provide a PR against master?
Attachment #8404051 - Flags: review?(mwu)
Component: General → Gaia
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

Re-requesting the review from mwu, AFAICT, this is taking the Noto content from master and uplifting it to 1.3T. Thus, no PR against master required.
Attachment #8404051 - Flags: review?(mwu)
(In reply to Axel Hecht [:Pike] from comment #29)
> Comment on attachment 8404051 [details] [review]
> Replaced Bengali/Devanagari/Tamil by Noto fonts.
> 
> Re-requesting the review from mwu, AFAICT, this is taking the Noto content
> from master and uplifting it to 1.3T. Thus, no PR against master required.

And please use .woff file for shrink ROM size.
(In reply to Axel Hecht [:Pike] from comment #29)
> Comment on attachment 8404051 [details] [review]
> Replaced Bengali/Devanagari/Tamil by Noto fonts.
> 
> Re-requesting the review from mwu, AFAICT, this is taking the Noto content
> from master and uplifting it to 1.3T. Thus, no PR against master required.

Nope - this also switches from Devanagari and Tami to the Noto fonts.
Attachment #8404051 - Flags: review?(mwu)
(In reply to Michael Wu [:mwu] from comment #31)
> 
> Nope - this also switches from Devanagari and Tami to the Noto fonts.

Michael, yes, we are requested to use Noto fonts not only for Bengali but also Devanagari and Tamil. I'll send PR to master later.
Michael, this is for master branch. As Bengali is already with Noto, I only replaced Devanagari and Tamil. BTW, I think base of v1.3t is different from master, so we'll still need to use PR 38 for v1.3t.
Attachment #8405834 - Flags: review?(mwu)
(In reply to James Zhang from comment #30)
> 
> And please use .woff file for shrink ROM size.

James, both .ttf and .woff are included. By default .woff will be used in v1.3t.
Joe, patch from this bug will also be merged into master, I'll clear tarako_only in Whiteboard.
Whiteboard: [tarako_only]
Patryk, per comment 26, I think it is positive for ui-review, would you mind update ui-review flag in attachment? Thanks!
Flags: needinfo?(padamczyk)
Comment on attachment 8405834 [details] [review]
Pull request for master

Thanks.
Attachment #8405834 - Flags: review?(mwu) → review+
Comment on attachment 8404051 [details] [review]
Pull request for v1.3t

I think comment 26 is enough. Go ahead and land on master and 1.3t. Also set the status-b2g-v1.3T flag on bug 967177 when you land on 1.3t since this PR is also a backport of that.
Attachment #8404051 - Flags: ui-review?(padamczyk)
Flags: needinfo?(padamczyk)
Attachment #8404051 - Attachment description: Replaced Bengali/Devanagari/Tamil by Noto fonts. → Pull request for v1.3t
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/moztt/commit/ce95d372e6d285725b96490afdaaf489ad8f9ca9
v1.3t:  https://github.com/mozilla-b2g/moztt/commit/21717069ed0ed7d9337ab9ae0d01c4dfaa757aad

Not sure if there's any desire to get this on v1.4 or not. Please nominate it for approval if yes.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-b2g-v1.4: --- → ?
Flags: needinfo?(kli)
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.5 S1 (9may)
Attached file Pull request for v.14
I think it will be better to get them on v1.4.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: no
Testing completed (on m-c, etc.): yes
Risk to taking this patch (and alternatives if risky): no
String or IDL/UUID changes made by this patch: no
Attachment #8405963 - Flags: approval-mozilla-aurora?
Flags: needinfo?(kli)
That PR is really messy. Can you cherry pick the commit on master and fix it up to work? 1.4 doesn't have compressed font support, so you'd have to adjust the fonts.mk part to apply.
(In reply to Michael Wu [:mwu] from comment #41)
> That PR is really messy. Can you cherry pick the commit on master and fix it
> up to work? 1.4 doesn't have compressed font support, so you'd have to
> adjust the fonts.mk part to apply.

OK, if 1.4 is not going to support woff, I'll update PR to replace Bengali/Devanagari/Tamil simply by Noto fonts.
(In reply to Michael Wu [:mwu] from comment #41)
> That PR is really messy. Can you cherry pick the commit on master and fix it
> up to work? 1.4 doesn't have compressed font support, so you'd have to
> adjust the fonts.mk part to apply.

Michael, PR for 1.4 is updated. Could you approve it?
Flags: needinfo?(mwu)
License is clear, need no ni from styang.
Flags: needinfo?(styang)
(In reply to Kai-Zhen Li from comment #43)
> Michael, PR for 1.4 is updated. Could you approve it?

Looks good. The important part is approval-mozilla-aurora though, which I can't give.
Flags: needinfo?(mwu)
Michael, Thanks! Let's wait the right person to approve it.
(In reply to Kai-Zhen Li from comment #40)
> Created attachment 8405963 [details] [review]
> Pull request for v.14
> 
> I think it will be better to get them on v1.4.
> 
> [Approval Request Comment]
> Bug caused by (feature/regressing bug #): 
> User impact if declined: no
> Testing completed (on m-c, etc.): yes
> Risk to taking this patch (and alternatives if risky): no
> String or IDL/UUID changes made by this patch: no

Can you please follow the guidelines https://wiki.mozilla.org/Release_Management/Uplift_rules#Guidelines_on_approval_comments and give more details on the request here.

At this point in the cycle, we've stopped granting approvals for changes to 1.4/aurora unless absolutely critical. So may be the details you provide might help us decided if this is going to be a huge win with very low risk to the overall code-base
Flags: needinfo?(kli)
Bhavana, Thanks!  Comment is updated as below.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Hindi language input method
User impact if declined: Some script of these languages, Bengali/Devanagari/Tamil, won't render properly
Testing completed (on m-c, etc.): Manual test on v1.3t
Risk to taking this patch (and alternatives if risky): low because these fonts are from aosp kk
String or IDL/UUID changes made by this patch: none
Flags: needinfo?(kli)
Attachment #8405963 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Need to be landed on v1.4. Thanks!
Keywords: checkin-needed
No longer blocks: punjabi-keyboard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: