The tool applies a 'diet' to a .ttf font. The diet consists of two steps:- https://github.com/twardoch/ttfdiet- It 'blanks' all glyphs that, in the 'cmap' table, represent precomposed Unicode characters (such as U+00E1, LATIN SMALL LETTER A WITH ACUTE), i.e. it removes all contours and components for those glyphs from the 'glyf' table (note: the tool cannot process the 'CFF' table).
- It adds a 'GSUB' lookup that substitutes every glyph that represents a precomposed Unicode character with a sequence of glyphs that represent the Unicode canonical decomposition of that precomposed character, and adds the lookup to the 'ccmp' feature.
The typical size reduction of a multilingual font is 5–10%.
Comments
Is it able to replace a standard pair with a contextual lookup? For example, replacing with Or, actually, since there is likely already a T a pair and the contextual lookup will be cumulative, does it know to calculate the difference?: [Obviously, at the level of TTF, the script is working directly with the compiled tables, not .fea syntax as I have represented.]
Karsten's Answer: Kerning pairs that involve a glyph whose outline got deleted will be removed too. Caveat: Only PairPos Format 1 subtables (those that usually hold "exception kerning") are processed by the tool while PairPos Format 2 subtables ("class kerning") are not, yet.
Environments may include:
* Adobe InDesign CC 2014, Paragraph Composer
* Adobe InDesign CC 2014, World-Ready Paragraph Composer
* Adobe Illustrator CC 2014, Paragraph Composer
* Adobe Illustrator CC 2014, World-Ready Paragraph Composer
* Adobe Photoshop CC 2014
* TextEdit, Pages, Keynote on Mac OS X 10.10
* Notepad, WordPad on Windows 8.1
* Google Chrome
* Mozilla Firefox
* Internet Explorer 11 on Windows 8.1
* Safari on Mac OS X 10.10
* Microsoft Word, PowerPoint 2013 on Windows 8.1
* Microsoft Word, PowerPoint 2011 on Mac OS X 10.10
* CorelDRAW! X6 on Windows 8.1
* Affinity Designer on Mac OS X 10.10
* OpenOffice, LibreOffice
* Mellel
* QuarkXPress
as well as these apps on older OSes, older versions of the above apps, and other apps that use OpenType Layout.
John — I don’t quite understand this. Without leaving the blank mapped glyphs as targets, how can you have the {ccmp}? Won’t the tests just yield .notdefs?
Or are you asking Adam to run tests to see which (if any) applications attempt to apply Unicode normalization to the input when precomposed glyphs are absent from the font?