forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Updating Material Design Fonts
Jason Simmons edited this page Mar 28, 2016
·
1 revision
This page describes the process for updating the material design icons:
- Use git to clone https://github.com/google/material-design-icons and https://github.com/google/fonts
- Create a fonts.zip file to upload to Google Storage:
STAGING=/tmp/fonts_staging
mkdir $STAGING
cp material-design-icons/iconfont/{MaterialIcons-Regular.ttf,codepoints} $STAGING
cp material-design-icons/LICENSE $STAGING/MaterialIcons_LICENSE
cp fonts/apache/roboto/*.ttf $STAGING
cp fonts/apache/roboto/LICENSE.txt $STAGING/Roboto_LICENSE.txt
cp fonts/apache/robotocondensed/*.ttf $STAGING
cp fonts/apache/robotocondensed/LICENSE.txt $STAGING/RobotoCondensed_LICENSE.txt
zip -j fonts.zip $STAGING/*
- Upload fonts.zip to Google Storage:
- Determine the sha1sum of
fonts.zip. By convention, we store the fonts at a location based on the sha1sum of the fonts.zip file, which you can determine as follows:sha1sum fonts.zip gsutil cp fonts.zip gs://flutter_infra/flutter/fonts/<sha1>/fonts.zip- Update flutter.git to refer to the new fonts:
- Update
bin/cache/material_fonts.versionto reference the location of the new fonts.zip. - Update
packages/flutter/lib/src/material/icons.dartto reference the code point for any new icons. Thecodepointsfile that you included infonts.zipdescribes the code points that exist in that version of the font. Ideally we would have a script to automagically generateicons.dartfrom thecodepointsfile, but for now we're just doing it by hand. (Note: you can diff the newcodepointsfile with the old one to see what's changed.)
