Add WOFF2 version of fonts

Modern browsers will use woff2, which has smaller size than woff

Updated the README in the font repository explaining how different
file formats are produced.

Bug: T128291
Change-Id: I81c5380fdbf0ff76142b67cf8fce9db20e8164fa
This commit is contained in:
Santhosh Thottingal
2016-05-09 16:12:10 +05:30
parent 6b8c33e763
commit a2cfd0287f
126 changed files with 73 additions and 7 deletions

View File

@@ -1,4 +1,9 @@
This file describes common fields in font.ini file. Use ';' to add any comments.
This is font repository for Universal Language Selector. These fonts are used by jquery.webfonts
to deliver on demand or based on users preferences. There is a script named "compile-font-repo.php"
to generate the font repository in JavaScript syntax. It reads this font.ini files.
Each folder contains a font.ini file, which is the description about the font. The fields in the font.ini
is described below. Use ';' to add any comments.
languages
---------
@@ -24,8 +29,20 @@ languages, use URLs separated by comma in,
request-url=url1, url2
format.
url
---
Upstream location of font to download.
formats
-------
If there are style variants, font.ini should contain file names for each variants(bold, italic etc). Otherwise,
based on the extension of files, the font compilation script can pick it up.
Preparing font formats
-----------------------
1. From the upstream releases, take the TTF versions.
2. To generate woff format, get https://github.com/googlei18n/sfntly
3. Use https://github.com/google/woff2 to generate woff2 from ttf. This will produce a compressed woff2 file.
Modern browsers support this format.
4. The eot file format is used only by older IE, but it can be generated using sfntly. Make sure to use -mtx flag to get
enhanced compression.