Custom data files and locations»
- Custom data files and locations
- FontLab internal data folder
- Custom Locations
- Specific File Information
FontLab VI uses several data files such as encoding, codepage definitions, glyph generation recipes, mapping tables, Python macros etc.
FontLab internal data folder»
FontLab’s own data files are installed within the FontLab VI application package on Macintosh, or in the FontLab VI folder where the .exe file was installed. The folder is named “Resources” and includes “Data”, “Codepage”, “Encoding” and “Python” subfolders. FontLab allows you to override its default data files in these subfolders with your own custom data, in a different location. The original FontLab files are preserved, but your files take precedence. Note that this means that if you have a custom file for some purpose, and update to a newer FontLab build, you will still be getting the effect of your custom file — even if the file provided by FontLab is newer or more extensive.
FontLab VI looks for custom data files in three places:
FontLab VI user data folder»
The FontLab VI user data folder can be typically found at
Macintosh HD/Users/Your_Name/Library/Application Support/FontLab/FontLab VI on macOS or
C:\Users\Your_Name\AppData\Roaming\Fontlab\FontLab VI on Windows. To use your custom data files in FontLab VI only, place them in this folder. This folder has the same structure as the FontLab internal folder discussed above, and can store any files customized by the user. Any file placed in the correct location within this folder will override the corresponding file placed in Fontlab shared data folder and in shared user data folder.
Specific File Information»
Here are all the files we expect you might want to customize, and how they work. Some are single files where you would edit a copy of the original. Others are sets of files, so you can add more files as you like.
Unicode Ranges (uranges.dat)»
The default Unicode ranges definition file is located in the app/Resources/data folder on the Macintosh or in the FontLab VIResourcesData folder on Windows. This is a single file called “uranges.dat.” To view or edit this file, open it in a text editor. In the file, you will see text similar to this:
%FONTLAB UNICODE RANGES % Build 2007-05-26. Based on the Unicode Standard version 5.0. 0x0000,0x007F,0000 C0 Controls and Basic Latin 0x0000,0x001F, C0 controls 0x0020,0x007F, ASCII 0x0080,0x00FF,0080 C1 Controls and Latin-1 Supplement 0x00A0,0x00FF, ISO 8859-1 (aka Latin1) 0x0100,0x017F,0100 Latin Extended-A 0x0180,0x024F,0180 Latin Extended-B ...
The first line of this file
%%FONTLAB UNICODE RANGES is an identification line. It should not be changed, else FontLab will no longer accept this file as a valid Unicode range definition file.
From the third line onwards, the strings have the same structure:
<first index of the range>,<last index>,<range’s name>
Note that there is a single space before the name of a range (like C0 Controls and Basic Latin above), but five spaces before the name of a subrange (like C0 Controls and ASCII above).
Put your custom ranges.dat file to User Data Folder/Data folder.
Custom Codepage Definitions (.cpg)»
The default codepage definition files (with the extension “.cpg”) are located in the app/Resources/codepage folder on the Macintosh or in the FontLab VIResourcesCodepage folder on Windows. These are text files that have the following structure:
%FONTLAB STUDIO CODEPAGE: 0xFFFF; MS Windows 1251 Cyrillic %GROUP:MS Windows %UN2/UN2 0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003
The first line of this file is an identification line that is used to set the codepage name and tell FontLab that this file is a properly composed codepage definition file. This line must start with the text
%%FONTLAB STUDIO CODEPAGE: 0xFFFF;, followed by the name of the codepage.
The second line identifies a codepage group name. This group name will become the submenu title in the Codepage popup menu.
There is no space after the ‘:’ character.
All other strings starting with ‘%’ are comments, and are not interpreted by FontLab.
The lines that follow all have the same syntax:
<code> <Unicode codepoint>
The first number is the code of the character and should be in the 0-255 range. The second number is the Unicode codepoint of the character and should be in the 0-65535 (0-FFFFh) range. Both integer numbers can be in decimal or hex form, starting with “0x.” The special Unicode codepoint 0xFFFF is used to define codes that are not mapped to any character.
Put the .cpg file in the User Data Folder/Codepage folder and restart FontLab to see the codepage in the Codepage selection popup menu.
Encoding Files (.enc)»
Encodings tables, which can be stored in text files and edited in any text editor, are a useful mechanism to filter and view your glyphs in different arrangements of your choice. You can have a font with a large number of glyphs, each with a unique assigned name, and then supply several encoding tables allowing you to view the selected glyphset at the top of the Font window. There is no restrictions for the number of glyphs you can put in an encoding.
To create a custom encoding file:
Copy the .enc file located in the app/Resources/Encoding/T1 non-Western folder to use as the basis for your new encoding file.
Open the copied file in any text editor (Macintosh TextEdit will do) and then edit it, following the same structure that you find in the original file.
Change the name of the encoding and the encoding index in the first line of the file. The first line should have the following structure:
%%FONTLAB STUDIO ENCODING: 7; Adobe Symbol Encoding.
%%FONTLAB STUDIO ENCODING:is the prefix of the file used to detect properly made encoding files and must not be changed. Note the space between ‘:’ and the encoding index.
7is the index of the encoding vector. You must not change the encoding vector indexes of any of the encoding vectors or they will become unusable. If you make your own encodings the indexes of your files should not be used in any of the other files. The actual value of the index is not important, so you can assign indexes like 1001 or 10001.
The last part of the first line,
Adobe Symbol Encoding, is the name of the encoding vector. It starts at the first non-space character after ‘;’. Pick a name on your own and type it there e.g. “A Glyph Definition Encoding” – use plain English letters, digits or simple punctuation such as [ ] ( ) but avoid too many special characters in the encoding name. Do not use ampersand (&).
Change the name of the group in the second line of the file:
%%GROUP:My Custom Encodings. The group name will become the submenu title in the Encoding popup menu. Note that there is no space after the ‘:’ character. We recommend using your foundry name or your personal name in the encoding group name.
Edit the contents of the encoding table, e.g.:
%%FONTLAB STUDIO ENCODING: 1001; A Glyph Definition Encoding %%GROUP:My Custom Encodings A.smcp A.titl A.swsh A.subs
Save this encoding file with a different file name but be sure to use the .enc file extension. Put the .enc file in the User Data Folder/Encoding folder. Restart FontLab to see the new encoding will appear in the Encoding selection popup menu.
Glyph Generating Rules (alias.dat)»
FontLab uses a single alias.dat file, located in the Resources/Data folder. This is the text file that defines the decomposition of common composite glyphs and rules of generating new glyphs with existing components/elements.
Here is a part of the alias.dat file:
%FONTLAB ALIASES AE A_E AEacute AE+~acute.case AEacute AE+acutecomb AEacute AE+acute AEacute.smcp AE.smcp+~acute.smcp Aacute A+~acute.case
As you can see, every line of the file contains either the real name of the composite glyph followed (with a single space as the separator) by the decomposition name:
Or the real name of the composite glyph followed (with a single space as the separator)by a glyph generation recipe:
This means that when you request the glyph named “AE” in the Generate Glyphs dialog box or when you generate glyphs by double-clicking on an empty cell, FontLab will create a new glyph named “AE” but built as a ligature using the “A” and “E” components as if you had entered the name “A_E”.
You can modify this table to include glyph names you often need to create. Put the modified file in the User Data Folder/Data folder.
Glyph Name to Unicode Mapping Rules (standard.nam)»
The database that links Unicode codepoints and glyph names is a simple single text file, standard.nam, located in the app/Resources folder. The file has the following structure:
%FONTLAB NAMETABLE[: Database_name] 0x0020 !visiblespace 0x0020 space 0x0021 exclam 0x0022 quotedbl 0x0023 numbersign 0x0024 dollar
The first line of this file is a signature that is used to show that this file is a properly defined database file. This line may contain the database name.
The lines that follow the signature have a very simple structure:
<Unicode codepoint> <name>
The Unicode codepoint may be in decimal or hex (started with ‘0x’) form. The name should not have any spaces, and are case sensitive.
One Unicode codepoint may have multiple names, and multiple Unicode codepoints may be given the same glyph name. In such cases, FontLab behaves as follows:
If the glyph name is preceded with a ‘!’, it means that Unicode may be generated from the name, but the marked name will not be generated from that Unicode. This allows FontLab to generate the best Unicode value for a poor glyph name; several glyph names can all generate the same Unicode, but the one that is not preceded by a ‘!’ will be the glyph name that FontLab picks for that Unicode. This is necessary when none of the glyph’s names is included in the list of standard names supported by Adobe (Adobe Glyph List). If you make use of this in your own customization, for any given Unicode value, be sure to always have one and only one glyph name that is not preceded by a ‘!’.
The default mapping file, standard.nam, can be changed using Preferences > Font Window > Unicode-Name mapping. If you make any modifications to the file, you must restart FontLab to see your changes being reflected.