This is a branch of the source repository for Roboto: Google’s signature family of fonts, the default font on Android and Chrome OS, and the recommended font for Google’s visual language, Material Design.
Fontforge is an open source font editor which also has support for Python scripts.
Currently, this script will only generate the fonts but can be expanded later.
Here is a resource link with details on the Python modules Fontforge supports.
- Make sure to have Python 2.7 installed on your system.
- Install Fontforge project on your system.
- Make sure there is an Environment Variable in the
Path
for the folder where theffpython.exe
file is stored.
ffpython.exe .\build.py
The font files will be generated in the build\published
folder.
- Open the
Roboto-GMM-Regular.sfd
in FontForge. - On the File Menu use
View
->Go to
This will bring up a dialog box to enter the Unicode name. exampleuni2220
ClickOk
and it will highlight the empty glyph location. - Double-Click the empty glyph to open the
Glyph Dialog
- Inside the Glyph Dialog Box:
- Choose
File
-->Import
- Set the type of file you wish to import and click
Import
- Make any adjustment needed
- Click
File
-->Save
- Choose
- Make sure to
Save
orSave All
from the main dialog to update the.sfd
file - Please note that saving these files may cause the builds to break if there is a version mismatch
- If this happens, open each .sdf file in
notepadd++
and change the version in the top line from3.2
to3.0
When creating the glyphs make sure to keep in mind the Ascent: 1638
and the Decent: 410
with an overall Em Size: 2048
.
Anytime the .sfd
file is altered, it will change the setting SplineFontDB:
to 3.2
. Please make sure to change this back to: SplineFontDB: 3.0
.
This is needed in order for the build to succeed. You can alter this setting by opening up the .sfd
file in Visual Studio Code.