Closed Bug 1152420 Opened 10 years ago Closed 10 years ago

Fonts are missing after building.

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: nhirata, Unassigned)

References

Details

1. look in <B2G project folder>/external/moztt 2. compare with the fonts that come with 18D image, (adb shell ls /system/fonts) Expected: fonts match Actual: fonts differ: see https://docs.google.com/spreadsheets/d/1V8hQEFtpgqzAyUH1kXtStIOpUx2nLEnXJ7k7giH4gWM/edit?usp=sharing Missing fonts package : https://bugzilla.mozilla.org/attachment.cgi?id=8589400 Note: this causes bug 1133137 to occur because we are missing a font
This is breaking lots of things and makes QA difficult to do.
blocking-b2g: --- → 2.2?
Hey Julien, what is it breaking, shouldn't there be 1 system default font family and then a fall back? Perhaps the answer here is not to hardcode font names. We should just specify Sans, Serif or Mono and then somewhere else have one listing specifying all the fonts in the OS, in this case it should read something like Fira, Noto, etc...
Patryk, bug 1133137 is an example. I'm not sure if any of the fonts are hardcoded. I wouldn't think they are....
Flags: needinfo?(padamczyk)
We don't hardcode font names, Gecko uses whatever font is installed on the device. The problem here is that _especially_ these fonts are not installed on the device. see also bug 1150449 for screenshots showing the issues.
As Fira evolves many fonts will become redundant, so the Moztt master branch will NOT match older images, and it shouldn't. Eventually we'd love Fira to be the only font. We should never remove a font without making sure there is a replacement for it, which is what happened in bug 1133137, I believe. I believe our OS has some font logic, if it doesn't we should add some. For every language the default font should be Fira Sans, if glyphs are missing then a fallback should be used. ie. In an Arabic language environment, Fira Sans is the default, but since it lacks arabic support then a Naskh typeface will be used. So I still don't understand why upgrading from one release to the next breaks apps as Fira should always be default and a fallback should always be provided for every language. Julien, so why is there a problem? Is the OS missing that type of logic or fonts to cover needed languages were removed from Moztt?
Flags: needinfo?(padamczyk) → needinfo?(felash)
(In reply to Patryk Adamczyk [:patryk] UX from comment #6) > As Fira evolves many fonts will become redundant, so the Moztt master branch > will NOT match older images, and it shouldn't. Eventually we'd love Fira to > be the only font. This seems like a nice goal, I agree. If Fira ends up being the only font with all needed glyphs, eventually we might want to split Fira in separate fonts so that the whole Fira is not in memory if we only need a part of it. I know this is something Web developers do especially to reduce the size and download, but for us it would be only a loading and memory issue. I don't know how important this is or us though. But that's out of the scope for this bug. > We should never remove a font without making sure there is a replacement for > it, which is what happened in bug 1133137, I believe. I don't really know if we ever had the "correct" (read: the UI flavor) arabic font in moztt. Do you know where the fonts came from in the v188 and v18D base build? > > I believe our OS has some font logic, if it doesn't we should add some. For > every language the default font should be Fira Sans, if glyphs are missing > then a fallback should be used. > > ie. In an Arabic language environment, Fira Sans is the default, but since > it lacks arabic support then a Naskh typeface will be used. I don't know how it's configured in Firefox OS, but as far as I know Gecko has different font preferences for different character types (search for "font" in a "about:config" page in Firefox). Of course they could all be configured the same, like you said, and likely they are currently, given we switch automtically to the UI font when it's available (which means we don't hardcode the setting to the non-UI font). I think the fallback mechanism tries to find a font with the closest size characteristics. NI Jonathan so that he can add some more information if necessary. > > So I still don't understand why upgrading from one release to the next > breaks apps as Fira should always be default and a fallback should always be > provided for every language. > > Julien, so why is there a problem? Is the OS missing that type of logic or > fonts to cover needed languages were removed from Moztt? I think the correct font (the "UI" font) to cover arabic have never been part of MozTT. Probably whoever added the fonts thought the "non-UI" font was enough because the characters were showing up correctly. I don't know why the UI font is part of the base build though.
Flags: needinfo?(padamczyk)
Flags: needinfo?(jfkthame)
Flags: needinfo?(felash)
We have a list of preferred fonts to use for every language, there seems to be about 5 different font families: https://wiki.mozilla.org/L10n:B2G/Fonts If Arky can double check the above L10n list and give us a list of which font families we need to include, then we can diff that against: https://github.com/mozilla-b2g/moztt/ Then we can get Pavel to remove all the unnecessary fonts and keep our repo updated. As far as Fira goes, yes we will split it if we do a CJK and other none latin based languages.
Flags: needinfo?(padamczyk) → needinfo?(hitmanarky)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #0) > 1. look in <B2G project folder>/external/moztt > 2. compare with the fonts that come with 18D image, (adb shell ls > /system/fonts) > This in and of itself is *not* a problem. We have a bunch of fonts in moztt, but we don't use all of them. We usually import whole font packages and then select the fonts we actually want through fonts.mk. The set of fonts that are in moztt is not actually the set we want installed.
This bug was filed due to a misunderstanding of how moztt and the build system works. If there are fonts in moztt that need to be installed, please file specific bugs for those cases.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
blocking-b2g: 2.2? → ---
(In reply to Michael Wu [:mwu] from comment #10) > This bug was filed due to a misunderstanding of how moztt and the build > system works. If there are fonts in moztt that need to be installed, please > file specific bugs for those cases. ...or if there are fonts that should be installed, but are not currently present in moztt. (E.g. the "UI" variant for Arabic.) It's *really* confusing when fonts apparently end up on the device from multiple unrelated sources.
Flags: needinfo?(jfkthame)
Sorry Michael, I think there is actually an issue. There are fonts in v18D that are _not_ in moztt. And that we need. Is it supposed to happen?
Flags: needinfo?(mwu)
Downstream vendors can add fonts. It just so happens that CAF adds fonts that you want. They're not part of any set we've officially ship, though. If you want to depend on them, figure out which ones you want and file a bug.
Flags: needinfo?(mwu)
OK, in bug 1150449 we'll soon have the final decision over which font we want for arabic.
Thanks for the clarification, mwu. Sorry to cause confusion. Can I get a clarification between which font.mk? I found two : ./external/moztt/fonts.mk ./frameworks/base/data/fonts/fonts.mk
Looking at the files, I think I answered my own question. Looks like both.
fonts.mk is pulled in from generic_no_telephony.mk - https://github.com/mozilla-b2g/platform_build/blob/b2g-5.1.0_r1/target/product/generic_no_telephony.mk . We removed the import for frameworks/base/data/fonts/fonts.mk and replaced it with external/moztt/fonts.mk.
Clearing ni.
Flags: needinfo?(hitmanarky)
You need to log in before you can comment on or make changes to this bug.