B2G-flash-tool
B2G-flash-tool copied to clipboard
shallow_flash should update the ttf fonts in /system/fonts/hidden
(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.
(Bug originally filed by @julienw and @Cwiiis, @autonome and @nth10sd were cc/ed.)
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:
- Write a new tool for updating the
gaia-icons.ttf
andKeyboard-Symbols.ttf
. (ex: write the update_system_fonts.sh for Bug 1032874.) - Modify the behavior of
make reset-gaia
to update fonts, add thegaia-icons.ttf
andKeyboard-Symbols.ttf
to gaia.zip. Then modify the tool to update fonts when flashing gaia.
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
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.
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
Wondering if we could not have a more generic way to shallow flash other gonk bits :)
see my comment in the aforementioned bug
Agree. Once more stuff packed, e.g. b2g-info or other tools, we'll add them to flash list.
@zapion IMO, adding b2g-info
into gaia.zip
is a little bit weird?
I mean to flash more gonk related stuff
@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!