Computers & Writing Systems
What is TypeTuner?
Briefly, TypeTuner can change the default glyphs and behaviors in certain SIL fonts (Charis SIL, Scheherazade, etc.) if the current defaults don't fit your needs. This means that glyphs or language-specific behaviors which you might need but which don't appear to be present could now be available. The desired glyphs do have to be present in the fonts as alternates. TypeTuner will not create new glyphs for you.
TypeTuner's main purpose is to encode alternate glyphs which are in certain specially prepared fonts but which some software can't access. For example, the SIL Roman fonts contain four forms of the capital eng. Only one of them can be encoded as the default, but the other three alternates are in the fonts as unencoded glyphs. Some applications, such as WorldPad and InDesign, can make the unencoded glyphs available. Others, such as Word and Publisher, don't allow the unencoded glyphs to be accessed for now, though we expect they will in the future. In the meantime, TypeTuner has been developed so a user can easily modify certain fonts so that user-chosen alternate glyphs are encoded and become the default glyph for a codepoint.
Also, TypeTuner can change the line spacing either to font designer chosen values or to match a legacy font; it can alter the default feature settings for Graphite-based applications; and it can activate glyph behaviors which would normally only be available for certain languages, such as Vietnamese and Romanian.
TypeTuner allows users to easily modify specially prepared fonts so that different glyphs and smart-font behaviors become active. Ideally the selection of these variations (called font features) would be done in application programs, but many applications don't support that functionality yet. To work around this limitation, TypeTuner allows users to create derivative fonts with their own feature settings based on the needs of a local project or entity.
TypeTuner is not a general purpose font editor — instead it makes controlled changes based on features that are present in a font. Currently only certain SIL fonts are supported.
There are two ways to use TypeTuner. The easiest way for most users is to use TypeTuner Web. Please have a look at this web-based service if you want to use TypeTuner. You can also use TypeTuner as a command line program.
TypeTuner is available as a command line application for MS Windows as part of FontUtils. The first time the program is run, there will be a delay as some files are stored in a temporary location. On subsequent runs, the delay should be gone. TypeTuner can also be used on any system that supports Perl (in the same way that any FontUtil application can). The following assumes you're using the MS Windows app.
Install FontUtils. Your PATH environment variable should be modified by the installer to include TypeTuner (and all the FontUtils). You also need to download and unzip the latest version of the fonts you want to use. Open a command window and change the current directory to match the location of the fonts. To "tune" a font follow these directions.
C:TypeTuner>TypeTuner -x feat_set_CR.xml CharisSILR.ttf
This produces the feat_set_CR.xml file. A section will look like this:
<feature name="Literacy alternates" value="False"> <value name="False"/> <value name="True"/> </feature>
This entry shows that the default feature setting is False. To turn on the Literacy alternates feature, change it to look like this:
<feature name="Literacy alternates" value="True"> <value name="False"/> <value name="True"/> </feature>
The value attribute in the <feature> element has to exactly match the name attribute in the <value> element. Save the file as feat_set_CR_lit.xml.
C:TypeTuner>TypeTuner -n Literacy -o CharisSILR_Lit.ttf feat_set_CR_lit.xml CharisSILR.ttf
This produces CharisSILR_Lit.ttf which has a font name of "Charis SIL Literacy". You can install this font and should see that the 'a' and 'g' characters now display with literacy glyphs. WorldPad, Word, Notepad, etc. should all display literacy glyphs now.
For documentation on the available features in the SIL Roman fonts see: SIL Unicode Roman Fonts: Additional capabilities available via font features. Please note that some features are only supported by Graphite. See the TypeTuner Notes column on the features documentation page.
You can turn on as many features as you wish. If you want to change the "Line spacing" feature to "Imported" see the section on importing line metrics. If you tune one member of a font family, such as Charis, it is advisable to tune all four members, so that all the members will have matching font names. One settings files can be used for all members of a family.
Importing line metrics from a legacy font
The line spacing in a font TypeTuner produces can be set to match the line spacing from another font (typically a legacy font) by using the setmetrics command. Importing line spacing in this way can be useful if there are documents that have been laid out using a legacy font where the font's line spacing was used instead of explicitly setting the line spacing using application settings.
To use the setmetrics command, type the following (replacing the <font_file_name> with the name of a font file whose metrics should be imported). You would do this after creating and editing the feat_set_CR_lit.xml in the above example.
C:TypeTuner>TypeTuner setmetrics <font_file_name> feat_set_CR_lit.xml
This command sets the "Line spacing" feature to "Imported" and adds line metric information from <font_file_name> to the feat_set_CR_lit.xml file (via the <Imported_line_metrics> element). These line metrics will be applied when TypeTuner is run to create the derivative font. If line metric information is already present in the feat_set_CR_lit.xml file, it will be updated. This command can be used after the feat_set_CR_lit.xml file has been edited to specify feature settings.
Things to consider before running TypeTuner
Be aware that when you change the setting for one feature, it may affect another feature. For instance, if you turn on "Tone numbers", any change made to "Hide tone contour staves" will be meaningless and have no visible effect.
Changing "Line spacing" to "Tight" will effect clipping of characters. This setting should only be used if you do not need stacking diacritics.
Some features are only supported by Graphite. Using TypeTuner to activate them will have no effect in non-Graphite applications. Also some features depend on OpenType support. TypeTuner will activate them as fully as possible, but the result in a non-OpenType application may not be the same as the results with OpenType support.
Once a font has been tuned, it can't be tuned again. You have to start over with the original Tuner-ready font. You can extract your settings from a tuned font and then apply those same (or edited) settings to a Tuner-ready font. See the extract command below.
Tips for re-tuning a new font
If you have tuned a font and want to upgrade it, here are some tips. Use the extract command on the older, tuned font to create a file containing all the feature settings, which will be identical to the file used earlier to tune the font. Then generate a new settings file from the new font using the -x switch. Of course, the two settings files must have different names. Compare the two settings files, and edit the new one to match the old one. You should examine the new settings file for any new features or settings. Feature and setting names may also have changed. Once the new settings file has been edited, apply it to the new font.
While the above is the preferred procedure, you can probably apply a feature settings file from an older font (created with the extract command) directly to a newer font. If any feature or setting names have changed, there is a mechanism built-in to newer Tuner-ready fonts to map the old names to new ones. Of course, any new features will have their default settings.
If TypeTuner is used to tighten the line metrics of a font containing a VDMX table (by setting "Line spacing" to "Tight") clipping of base characters can occur in MS Word 2010. The work around is to either strip the VDMX table from the font or use TypeTuner Web (which utilizes fonts that don't contain the VDMX table).
A Note Regarding the Open Font License and TypeTuner
Some SIL fonts, such as Charis SIL and Scheherazade, contain direct TypeTuner support. These fonts are released under the SIL Open Font License (OFL) which allows modifications such as those made by TypeTuner. The OFL prohibits the use of Reserved Font Names, such as "Charis", "Scheherazade" and "SIL", in the name of any font that is derived from an Original Version.
SIL International (the Copyright Holder) grants through this separate written agreement the right to use the Reserved Font Names in any Modified Version of a font created by using TypeTuner as long as the feature information contained in the Original Version is used, unmodified, as the source for TypeTuner feature information, and the resulting font name is not identical to the Original Version font name.
TypeTuner-produced fonts created in this manner are still bound by the terms of the OFL. Specifically, the use of Reserved Font Names is prohibited when making derivatives of a TypeTuner-produced font. Please see the FONTLOG in these fonts for details on this special permission.
TypeTuner is part of FontUtils and is available as a Windows executable and a Perl script.
TypeTuner v1.2 (and later) will work with all current versions of Andika, Charis SIL, Doulos SIL and Gentium Plus. It must be used with version 4.106 or later of those fonts. It also works with Scheherazade and Lateef. TypeTuner v1.0 will not work with version 4.106 or later of the Roman fonts.
TypeTuner depends on two types of XML files to operate. The first one is a file which describes all the features in a font and which indicates how the font should be changed for each feature setting. This file is called the Features file, and it is not normally seen by the user. It's normally added to a font and is what makes a font Tuner-ready. The second XML file is one that the user edits to specify feature settings to apply to a font. This file is called the Settings file. As indicated above, the user normally generates the Settings file from a Tuner-ready font using the -x switch, then edits it and applies it to the font.
Command line syntax
The TypeTuner command line is actually more complex than is indicated above. The full syntax is contained in the usage message which you can get by running the program with no arguments:
TypeTuner ver 1.2 copyright (c) SIL International 2007-2009 see https://scripts.sil.org/TypeTuner usage: TypeTuner -x <xml> <ttf> (create settings xml file from ttf) TypeTuner <xml> <ttf> (apply settings xml file to ttf) or TypeTuner [<switches>] <command> [files, ...] switches: -m specify maximum length of generated font name suffix -n specify font name suffix instead of using generated one -o specify output font.ttf file name commands: createset <font.ttf | feat_all.xml> feat_set.xml setmetrics font_old.ttf feat_set.xml applyset feat_set.xml font.ttf applyset_xml feat_all.xml feat_set.xml font.ttf extract font.ttf feat_set.xml add feat_all.xml font.ttf delete font.ttf
The add command adds the Features file to a font in the Silt table in compressed form and is used to make a font Tuner-ready. It will fail if a Features file is not used (though see the -f switch below). It creates a new font with "_tt" appended to the file name (though see the -o switch).
createset creates the Settings file from the Features file. This works from either a Tuner-ready font or from the Features file.
setmetrics adds line metric data from a given font into the Settings file (though see the -o switch). It also sets the "Line spacing" feature to "Imported" (and adds the "Imported" setting value if it is not present).
applyset applies the Settings file to a Tuner-ready font and creates a new font with "_tt" appended to the name (though see the -o switch).
applyset_xml does the same thing as applyset but uses the Features file without having to embed it in the font (useful during development).
Both the above commands embed the Settings file in compressed form into the new font in its Silt table. The extract command can be used to get a copy of the Settings file for reference later. This is useful if a new version of the Roman fonts are released and the user wants to apply settings from an old font to the new version. It will fail if a proper Settings file isn't embedded in the font (though see the -f switch).
The delete command just removes the Silt table from a font, which is included for completeness. It creates a new font with "_tt" appended to the file name (though see the -o switch).
The font name in a tuned font will have tags for the various feature settings appended to it. If this tag string gets too long, it will be truncated and "XT" appended to indicate that some tags are missing. The version string will always contain the full tag string. The font modification date will also be updated.
The -m switch allows the user to specify the maximum length of the tag string before it is truncated. The TrueType specification states that the maximum length for the font family name is 31 characters. The default for the -m switch will be set based on the length of the original font family name so that the 31 character limit is respected. If the -m switch specifies a value that will cause this limit to be exceeded, a warning will be given.
The -n switch specifies a string to append to the font name in the place where the feature settings tags would go by default. The tags are still included in the version string. If the -n switch causes the length of the font family name to exceed the 31 character limit stated in the TrueType specification, a warning will be given.
The -o switch specifies the output font file name. This overrides the default behavior of using the input file name with "_tt" appended to it. This switch works for commands that produce a new font (applyset, applyset_xml, add, and delete). It also works for the setmetrics command to specify an output Settings file name.
There are three command line switches not listed in the usage message.
For more technical details, see the SIL TypeTuner for Font Designers page.
This version of TypeTuner (v1.0) will work with version 4.104 or 4.102 of the SIL Roman fonts but the version of TypeTuner included with FontUtils is preferred. This download also contains version 4.102 of the Doulos SIL and Charis SIL fonts, which contain a fix for a problem with small caps in InDesign. These fonts are now obsolete. Please use our latest fonts instead.
© 2003-2019 SIL International, all rights reserved, unless otherwise noted elsewhere on this page.