Last Comment Bug 843592 - Indic fonts are not available in B2G
: Indic fonts are not available in B2G
Status: RESOLVED FIXED
:
Product: Firefox OS
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: -- normal (vote)
: 1.3 Sprint 3 - 10/25
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on: 915655
Blocks: 944656 842592 906273 919988
  Show dependency treegraph
 
Reported: 2013-02-21 07:11 PST by Aniruddha Adhikary [:tuxboy]
Modified: 2014-06-08 01:57 PDT (History)
20 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
koi+
fixed


Attachments
Link to proposed patch (44 bytes, text/x-github-pull-request)
2013-02-22 09:31 PST, Aniruddha Adhikary [:tuxboy]
no flags Details | Review | Splinter Review
Add noto-fonts to base-jb.xml manifest (828 bytes, patch)
2013-09-23 19:00 PDT, Michael Wu [:mwu]
jfkthame: review-
Details | Diff | Splinter Review
Lohit fonts pull request (44 bytes, text/x-github-pull-request)
2013-10-06 18:17 PDT, Jonathan Kew (:jfkthame)
mwu.code: review+
Details | Review | Splinter Review

Description Aniruddha Adhikary [:tuxboy] 2013-02-21 07:11:39 PST
User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17

Steps to reproduce:

Tried to display text written in UTF-8 Bangla (Indic language).


Actual results:

UTF-8 Indic text did not render properly.


Expected results:

UTF-8 text should have rendered properly.
Comment 1 Axel Hecht [:Pike] 2013-02-21 07:16:29 PST
The repo where we store our fonts is at https://github.com/mozilla-b2g/moztt, fyi.
Comment 2 Aniruddha Adhikary [:tuxboy] 2013-02-21 07:45:49 PST
Sent the first ever pull request to the moztt repo! (:D)

https://github.com/mozilla-b2g/moztt/pull/1
Comment 3 Jonathan Kew (:jfkthame) 2013-02-21 08:03:07 PST
Excellent, that's just what I was going to suggest we should do. :)

BTW, the Lohit fonts are distributed under the Open Font License. Do we need to go through some kind of license review/approval process in order to include these?

See also https://fedorahosted.org/lohit/.
Comment 4 Aniruddha Adhikary [:tuxboy] 2013-02-21 08:17:37 PST
No, it is Okay to continue according to Wikipedia.
Comment 5 Michael Wu [:mwu] 2013-02-21 08:28:33 PST
Patryk, what do you think?
Comment 6 Jonathan Kew (:jfkthame) 2013-02-21 08:46:08 PST
(In reply to Aniruddha Adhikary from comment #4)
> No, it is Okay to continue according to Wikipedia.

I don't think Wikipedia is the final authority on Mozilla licensing policy. :)

http://www.mozilla.org/MPL/license-policy.html

"If you are planning to import new Third Party Code into a Mozilla repository or a Mozilla product, always consult licensing@mozilla.org first."
Comment 7 Aniruddha Adhikary [:tuxboy] 2013-02-21 08:47:50 PST
Should I send a mail there? I think you guys should check it!
Comment 8 Gervase Markham [:gerv] 2013-02-21 08:54:53 PST
OFL is OK - we have some OFLed fonts already. We need to make sure this code gets covered by the scan which generates the licensing page, so a copy of its OFL gets in. (The OFL text is font-specific <sigh>).

Gerv
Comment 9 Jonathan Kew (:jfkthame) 2013-02-21 08:59:24 PST
Thanks, Gerv - yes, I didn't expect OFL to be a problem as such, but wasn't sure what mechanisms might be involved to make sure any needed documentation is handled properly.
Comment 10 Aniruddha Adhikary [:tuxboy] 2013-02-21 09:04:04 PST
I have included the license text in OFL.txt in my latest commit to the pull request. (Also included the COPYRIGHT file attached with the tar archive)
Comment 11 Aniruddha Adhikary [:tuxboy] 2013-02-22 09:31:09 PST
Created attachment 717177 [details] [review]
Link to proposed patch
Comment 12 Patryk Adamczyk [:patryk] UX 2013-02-23 11:08:20 PST
(In reply to Michael Wu [:mwu] from comment #5)
> Patryk, what do you think?

Sorry for the late reply. But yes at this point since we're not release to these markets please us open fonts as substitutes.
Comment 13 Aniruddha Adhikary [:tuxboy] 2013-02-26 21:07:44 PST
Guys, according to TechChrunch (http://techcrunch.com/2013/02/24/firefox-os-smartphones-marketplace/) , B2G phones are coming to Bangladesh pretty soon via Telenor (known as GrameenPhone locally), shouldn't we add such support soon?
Comment 14 Aniruddha Adhikary [:tuxboy] 2013-04-22 09:24:33 PDT
I am still alive! Since these are all open fonts, I think they can be used in B2G. Waiting for the bug to progress.
Comment 15 Michael Wu [:mwu] 2013-04-30 17:25:52 PDT
FWIW we actually have Indic fonts enabled for a number of devices coming up, but it's Android's set of Indic fonts, which isn't the full set being proposed here. See https://android.googlesource.com/platform/external/lohit-fonts/+/ics-plus-aosp for that set.
Comment 16 Axel Hecht [:Pike] 2013-05-01 00:35:23 PDT
I recall coming across a bug that asked to rip out the fonts we picked up from android, but I had no idea how to find that right now. Do you know if that's still a topic?

Also, does "number of devices coming up" tie to a version number of fx os, or is that some independent switch that partners may flip in one direction or the other?
Comment 17 Michael Wu [:mwu] 2013-05-01 09:16:49 PDT
(In reply to Axel Hecht [:Pike] from comment #16)
> I recall coming across a bug that asked to rip out the fonts we picked up
> from android, but I had no idea how to find that right now. Do you know if
> that's still a topic?
> 

https://bugzilla.mozilla.org/show_bug.cgi?id=834244

Not all Android fonts were removed. The work for that is complete, though more fonts will be up for being removed once more things are supported in Feura Sans.

> Also, does "number of devices coming up" tie to a version number of fx os,
> or is that some independent switch that partners may flip in one direction
> or the other?

It related to whether our partners include the lohit font repo in their manifest. All 1.0 and 1.1 devices I know of will have them turned on.
Comment 18 Enzam 2013-05-20 09:22:49 PDT
Any update on this? I can't see bangla on keon with latest update
Comment 19 Soumya Deb [:Debloper] 2013-05-22 04:58:38 PDT
(In reply to Patryk Adamczyk [:patryk] UX from comment #12)
> ... But yes at this point since we're not release to
> these markets please us open fonts as substitutes.

I can vaguely understand the statement, and then find it wrong.

Any particular blocker for this patch to be committed?
Practical, theoritical, philosophical?
Comment 20 Rudy Lu [:rudyl] (inactive after 2015/7/3) 2013-09-08 23:22:50 PDT
I cannot see most of the characters when using Unagi (m-c)
http://en.wikipedia.org/wiki/Hindi#Sample_text

It that is the case, Michael, can you help on this?

--
I was using the build from (this is for Mozilla internal only)
https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-central-unagi-eng/
Comment 21 arky [:arky] 2013-09-09 18:12:26 PDT
(In reply to Rudy Lu [:rudyl] from comment #20)
> I cannot see most of the characters when using Unagi (m-c)
> http://en.wikipedia.org/wiki/Hindi#Sample_text
> 
> It that is the case, Michael, can you help on this?
> 
> --
> I was using the build from (this is for Mozilla internal only)
> https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-central-
> unagi-eng/


Download the noto hinted fonts and compress them: 
https://code.google.com/p/noto/downloads/detail?name=NotoFonts-hinted-2013-04-11.zip&can=2&q=

Connect your b2g device to the PC.

Mount the partition
adb shell mount -o remount,rw /system 
 
Copy the font files 
adb push ../hinted/ /system/fonts/ 

Reboot!
Comment 22 arky [:arky] 2013-09-09 18:19:48 PDT
Sorry, Typo in my last comment. I mean to say un-compress/unzip the fonts
Comment 23 arky [:arky] 2013-09-09 18:21:03 PDT
Hindi Sample text on Peak with noto hinted fonts
https://twitter.com/playingwithsid/status/377239544443047936/photo/1
Comment 24 Michael Wu [:mwu] 2013-09-12 06:50:00 PDT
(In reply to Rudy Lu [:rudyl] from comment #20)
> I cannot see most of the characters when using Unagi (m-c)
> http://en.wikipedia.org/wiki/Hindi#Sample_text
> 
> It that is the case, Michael, can you help on this?
> 

Unagi doesn't count. You'll have to check a commercial build.
Comment 25 Michael Wu [:mwu] 2013-09-23 19:00:10 PDT
Created attachment 808956 [details] [diff] [review]
Add noto-fonts to base-jb.xml manifest

This enables noto fonts on our jb gonk builds. Commercial builds will likely use this regardless of whether we enable it in our builds or not, unless we explicitly decide to do something different and ask our partners to change the defaults.
Comment 26 Michael Wu [:mwu] 2013-09-23 19:01:20 PDT
Here is the noto fonts repo for reference - https://android.googlesource.com/platform/external/noto-fonts/+/master
Comment 27 Jonathan Kew (:jfkthame) 2013-09-24 00:20:51 PDT
(In reply to Michael Wu [:mwu] from comment #26)
> Here is the noto fonts repo for reference -
> https://android.googlesource.com/platform/external/noto-fonts/+/master

This Noto collection seems very incomplete; it only appears to include support for Bengali, Kannada, Malayalam and Telugu at this point, even though the Noto font list at https://code.google.com/p/noto/wiki/FontList also has Hindi and Tamil (as well as various non-Indic scripts...) What's up with this?

If it means many of the scripts in Noto aren't really ready for prime time, maybe we should be bundling the more mature Lohit collection instead. These would also cover other (very major) Indic scripts such as Gujarati, Gurmukhi (Punjabi) and Oriya.
Comment 28 Michael Wu [:mwu] 2013-09-24 09:51:55 PDT
I think Android has always limited its Indic script support to about three - see their Lohit font repo: https://android.googlesource.com/platform/external/lohit-fonts/+/master .

This is the default set of Indic fonts that gets shipped - we'll have to work with our partners if we want to add or switch fonts.
Comment 29 arky [:arky] 2013-09-24 10:04:37 PDT
@jfkthame Noto[1] is supposed to provide high quality fonts. It doesn't offer extensive Indic language coverage as Lohit family. I believe that Noto is supposed to super-cede Lohit in Android.

Suggest we use a noto font when available and otherwise fall back to Lohit.

@mwu Thanks for the patch :)

[1] http://code.google.com/p/noto/wiki/FontList
Comment 30 Axel Hecht [:Pike] 2013-09-24 10:29:24 PDT
I just love to link-drop http://www.thehindubusinessline.com/industry-and-economy/info-tech/samsung-phones-to-support-9-indian-languages/article5018907.ece. There are actually extensive changes on top of Android to make India work, it seems.
Comment 31 Jonathan Kew (:jfkthame) 2013-09-27 07:16:00 PDT
Comment on attachment 808956 [details] [diff] [review]
Add noto-fonts to base-jb.xml manifest

Review of attachment 808956 [details] [diff] [review]:
-----------------------------------------------------------------

Looking again at the external/noto-fonts directory referenced here, I really don't think we should be using it as the basis for what we include in b2g. Instead, we should pull fonts from the canonical repository on code.google.com (e.g. https://code.google.com/p/noto/source/browse/#svn%2Ftrunk%2Fpackages), and then choose which ones to include in the b2g platform. Maybe the best way to do this is to copy the latest font files into the moztt repo, if we can't directly reference the Google Code sources here.
Comment 32 Michael Wu [:mwu] 2013-09-27 08:03:13 PDT
Yeah, if you want the latest noto fonts, we'll have to do it ourselves in moztt, and make sure people aren't using the noto repo.
Comment 33 Axel Hecht [:Pike] 2013-10-04 12:40:30 PDT
MAK says to ask Jamil about the noto fonts.
Comment 34 Jonathan Kew (:jfkthame) 2013-10-06 18:17:23 PDT
Created attachment 814015 [details] [review]
Lohit fonts pull request

Axel tells me a number of Indian users have spoken in favor of using the Lohit fonts. I think we should go ahead and get these into the build, so that people can begin to try them out; we may also want to add Noto fonts, and make some test builds for comparison and review purposes, but at this point the Lohit set provides more complete coverage for the major Indian languages.
Comment 35 Michael Wu [:mwu] 2013-10-06 21:14:17 PDT
This looks ok, but now we'll have to ask people to drop Android's Lohit and Noto font sets.

m1, are you ok with dropping lohit-fonts from ICS manifests and noto-fonts from JB manifests?
Comment 36 Michael Wu [:mwu] 2013-10-06 21:15:59 PDT
Alternately, the product makefiles can be modified to not pull in those particular fonts, but dropping repos from the manifest seems simpler to me if it's a valid option.
Comment 37 Michael Wu [:mwu] 2013-10-10 10:45:20 PDT
Comment on attachment 814015 [details] [review]
Lohit fonts pull request

This looks fine to me, but we'll need to coordinate this with m1 before landing.
Comment 38 Michael Vines [:m1] [:evilmachines] 2013-10-10 13:58:01 PDT
Weird, I swear I commented on this bug days ago.   

> m1, are you ok with dropping lohit-fonts from ICS manifests and noto-fonts from JB manifests?

Yep.
Comment 39 Axel Hecht [:Pike] 2013-10-14 04:00:49 PDT
Requesting koi as this blocks Bangla, which is on our list for 1.2.

Also, it looks like this patch is ready to land?
Comment 41 Preeti Raghunath(:Preeti) 2013-10-16 13:45:29 PDT
Just to confirm, this bug is not needed in 1.2. Please confirm.
Comment 42 Axel Hecht [:Pike] 2013-10-16 13:47:57 PDT
(In reply to Axel Hecht [:Pike] from comment #39)
> Requesting koi as this blocks Bangla, which is on our list for 1.2.
> 
> Also, it looks like this patch is ready to land?

Why do you ask again, preeti?
Comment 43 Ryan VanderMeulen [:RyanVM] 2013-11-05 12:48:37 PST
John, can you assist with this uplift please? :)
Comment 44 John Ford [:jhford] CET/CEST Berlin Time 2013-11-07 12:30:52 PST
v1.2: 7b195cfef5c7eb2bfae401d5b8f892129be8cb9e

Note You need to log in before you can comment on or make changes to this bug.