Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shallow_flash should update the ttf fonts in /system/fonts/hidden #314

Open
jankeromnes opened this issue Nov 13, 2014 · 10 comments
Open

shallow_flash should update the ttf fonts in /system/fonts/hidden #314

jankeromnes opened this issue Nov 13, 2014 · 10 comments

Comments

@jankeromnes
Copy link

(re-posted from https://bugzilla.mozilla.org/show_bug.cgi?id=1090812)

When there is a mismatch for gaia-icons.ttf between what's in a application's zip file and in /system/fonts/hidden, there is a very visible glitch when loading some apps (notably Messages and Contacts) while the font is loading from the application's zip instead of the system.

We should push the right version of the ttf file when shallow flashing too. It should be possible by unzipping one of the apps that use it and push it to the right place. Any cleaner solution is welcome :)

Likely the same for the keyboard font too.
@jankeromnes
Copy link
Author

(Bug originally filed by @julienw and @Cwiiis, @autonome and @nth10sd were cc/ed.)

@askeing
Copy link
Owner

askeing commented Nov 14, 2014

The gaia.zip compress the files under gaia/profile/, and b2g.xxx.tar.gz compress the files under b2g/.
Base on these two files, we try to do the same thing with make reset-gaia and ./flash.sh gecko.

IMO, changing the fonts under /system/fonts/ (which are parts of base image) when flashing gaia is very obscure.
(AFAIK, make reset-gaia do not change the /system/fonts/. Will co-work with @cctuan to make sure the real behavior.)

I think there are two solutions we can choose:

  1. Write a new tool for updating the gaia-icons.ttf and Keyboard-Symbols.ttf. (ex: write the update_system_fonts.sh for Bug 1032874.)
  2. Modify the behavior of make reset-gaia to update fonts, add the gaia-icons.ttf and Keyboard-Symbols.ttfto gaia.zip. Then modify the tool to update fonts when flashing gaia.

@askeing
Copy link
Owner

askeing commented Nov 14, 2014

Update:
The Keyboard-Symbols.ttf and gaia-icons.ttf in Gaia (master).

~/workspace/gaia$ find . -name "*.ttf"
./tv_apps/smart-settings/style/fonts/gaia-icons.ttf
./shared/style/keyboard_symbols/Keyboard-Symbols.ttf
./shared/elements/gaia-icons/fonts/gaia-icons.ttf
./apps/camera/bower_components/gaia-icons/fonts/gaia-icons.ttf
./apps/music/bower_components/gaia-icons/fonts/gaia-icons.ttf

@julienw
Copy link

julienw commented Nov 14, 2014

The source ttf is the one in shared/elements that's then copied in all applications.
If the file in /system is different than the file in the apps, then Gecko loads the file from the app directory when the app requests it. Otherwise Gecko uses the cached, already loaded, file.

Same happens for Keyboard-Symbols except it's used by the Keyboard app only, as far as I understand.

@askeing
Copy link
Owner

askeing commented Nov 14, 2014

After have the discussion with @cctuan (:gduan), we file a bug [1] to RelEng to add these two fonts into gaia.zip.
Then we can modify the tool to push these two files into /system/fonts/hidden/

[1] Bug 1098966

@julienw
Copy link

julienw commented Nov 15, 2014

Wondering if we could not have a more generic way to shallow flash other gonk bits :)

see my comment in the aforementioned bug

@zapion
Copy link
Contributor

zapion commented Nov 16, 2014

Agree. Once more stuff packed, e.g. b2g-info or other tools, we'll add them to flash list.

@askeing
Copy link
Owner

askeing commented Nov 18, 2014

@zapion IMO, adding b2g-info into gaia.zip is a little bit weird?

@zapion
Copy link
Contributor

zapion commented Nov 18, 2014

I mean to flash more gonk related stuff

@julienw
Copy link

julienw commented Nov 18, 2014

@askeing, see my comment in https://bugzilla.mozilla.org/show_bug.cgi?id=1098966#c1, it's clearer than what's been said here :) b2g-info would likely be in another place than gaia.zip for sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants