Merge commit 'bbc9221' into master am: d4aea7c865 am: d66cd7275a am: 90e121df27 am: 9e1ecbca64 am: ccb3219886 am: ca3f521449 am: 2ce18b7c4a am: 06d7d9f007 am: 84e59f094e am: 4a6d4ae2f6 am: 1f84dc796f am: 06d185e1fc am: 645381723c am: 81c126c6c5 am: c3008dfeee  -s ours am: a17637041a
am: 54ff5bf084

Change-Id: Ia442c1c2c9888dc6951c293c288ae32bb723b366
tree: 6ed4ef2a30d824744395f5e775cfcc0f411ccebc
  1. Android.bp
  2. COPYING.android
  3. CleanSpec.mk
  4. MODULE_LICENSE_APACHE2
  5. NOTICE
  6. README.android
  7. README.md
  8. cpp/
README.md

What is sfntly?

sfntly is pronounced “esfontlee”.

sfntly is a Java and C++ library for using, editing, and creating sfnt container based fonts (e.g. OpenType, TrueType). This library was initially created by Google's Font Team and the C++ port was done by the Chrome team. It has been made open source.

The basic features of sfntly are the reading, editing, and writing of an sfnt container font. Fonts that use an sfnt container include OpenType, TrueType, AAT/GX, and Graphite. sfntly isn‘t itself a tool that is usable by an end user - it is a library that allows software developers to build tools that manipulate fonts in ways that haven’t been easily accessible to most developers. The sfntly library is available in Java with a partial C++ port. However, we have included some font tools that are built on top of sfntly: a font subsetter, font dumper, a font linter, some compression utilities.

The uses of sfntly are really anything that you can think of that involves reading and/or editing fonts. Right now, the Java version is the core library used to power Google's Web Fonts project. There it is used for all font manipulation - to read font data, to pull apart fonts, and to then reassemble them before they are streamed out to a user. Portions of the font that are not needed - specific glyph ranges or features - are stripped using sfntly to minimize the size of the streamed font. The C++ port is used somewhat similarly within Chrome to subset fonts for insertion into a PDF for viewing or printing. Though the features stripped in the font are different in Chrome than in Web Fonts because the end use is different.

Using sfntly you can read and extract any of the tables in a font. The tables are the individual data structures within the font for each of the features and functionality: glyph outlines, character maps, kerning, meta data, etc. If you look over the OpenType and TrueType specs, you will see a number of categories of tables. sfntly currently supports all of the required tables, the TrueType outline tables, bitmap glyph tables, and a couple of the other miscellaneous tables. This level of support provides for many of the needs developers have related to the informational reading of font data. It also covers a lot of the editing needs.

To get started with sfntly: clone the repository and follow the quickstart.txt guide in the Java directory

have fun

Stuart Gill - sfntly Architect and Lead Developer