Custom data files and locations»
- Custom data files and locations
- Data folders
- App data folder
- Specific File Information
When you run FontLab, it loads various resources (data files): encodings, codepage definitions, glyph generation recipes, mapping tables, Python scripts etc. FontLab has these data files bundled, but it first looks in additional locations (folders) for data files you may have customized. Only if there are no customized data files, it loads its own bundled resources. See below for the locations of the data folders, in the order in which the apps looks inside them.
The following symbols are used to indicate special locations:
~is your user home folder on macOS, typically
%userprofile%is your user home folder on Windows, typically
Whenever a location is given here, you can copy it, and then:
- in macOS Finder, choose Go > Go to Folder…, paste the location and click Go
- in Windows File Explorer, paste the location into the location text field and press Enter
Local data folder»
The app autosaves the files you have opened (inside the
Autosave subfolder) and the Sketchboard (as
sketchboard.vfc) inside the local data folder, which is located in:
~/Library/Application Support/FontLab/FontLab 7on macOS
%userprofile%\Local Settings\Application Data\Fontlab\FontLab 7on Windows
User data folder»
The user data folder is the main place where you can place customized data files. By default, the location is:
~/Library/Application Support/FontLab/FontLab 7on macOS
%userprofile%\Application Data\Fontlab\FontLab 7on Windows
You can relocate the user data folder using Preferences > General > User data folder. For example, if you work with a team and have a shared drive such as a network drive, Dropbox or Google Drive, all team members can relocate the user data folder to the same shared folder.
When you relocate the user data folder, you need to restart the app. The app does not copy the files from the old location to the new location. You need to copy the files yourself.
Note: By default the user data folder is the same as the local data folder on macOS. When you relocate the user data folder, the app will still autosave into the local data folder. This is a safety precaution: you may point the user data folder to a network drive, and it might become unavailable — but you still want the app to autosave.
The user data folder has the following subfolders:
You can place your customized data files there.
Shared user data folder»
The shared user data folder can be typically found at
~/Library/Application Support/FontLab/ on macOS or
%userprofile%\AppData\Roaming\Fontlab\ on Windows. To use your custom data files in all Fontlab applications, place them in this folder. It has the same structure as the user 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 shared app data folder.
Shared app data folder»
The Shared app data folder can be typically found at
/Library/Application Support/FontLab on macOS or
C:\ProgramData\Fontlab on Windows. This folder may hold files that can be used by our apps: FontLab Studio 5, TransType 4, TypeTool 3, with more to come and by all users. It has the same structure as the FontLab internal folder discussed above. In each respective subfolder, codepage definitions, encoding definitions, glyph-to-Unicode mapping files and other special data files may be stored. If needed you may use these folders for custom files but note that they will be available to all Fontlab Ltd. applications and all users of the computer.
App data folder»
FontLab’s own data files are installed within the FontLab application package on Macintosh, or in the FontLab 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.
/Applications/FontLab 7.app/Contents/Resourceson macOS
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 7\Resources\Data 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 7\Resources\Codepage folder on Windows. These are text files that have the following structure:
%%FONTLAB 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 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 ENCODING: 7; Adobe Symbol Encoding.
%%FONTLAB 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 and spaces 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 ENCODING: 10001; 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 rules rules of generating composite glyphs and auto glyphs from existing glyphs.
Here is a part of the
%%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 an empty cell, FontLab will create a new glyph named
AE but built as a ligature using the
E components as if you had entered the name
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
FontLab 7.app/Contents/Resources on macOS or
\Program Files\FontLab\FontLab 7\Resources\ on Windows. 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. The colon and the database name that follows are optional.
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 > General. If you make any modifications to the file, you must restart FontLab to see your changes being reflected.