diff --git a/docs/AFDKO-Overview.md b/docs/AFDKO-Overview.md index cc4e59b08..7f489bcbb 100644 --- a/docs/AFDKO-Overview.md +++ b/docs/AFDKO-Overview.md @@ -5,11 +5,11 @@ Adobe Font Development Kit for OpenType (AFDKO) Overview # 1. Introduction -This release of the Adobe Font Development Kit for OpenType (AFDKO) contains a set of tools used to make OpenType fonts by adding the OpenType-specific data to a TrueType or Type1 font. It does not offer tools for designing or editing glyphs. These command-line programs will allow you to build an OpenType font from an existing font, verify the contents of the font, and proof the font on screen or on paper. The AFDKO also contains useful technical documentation and some example font source material. Note! Although the FDK directory tree contains a number of Python scripts, none of them can be used by double-clicking on them; they can only be called by typing commands into a command-line window. +This release of the Adobe Font Development Kit for OpenType (AFDKO) contains a set of tools used to make OpenType fonts by adding the OpenType-specific data to a TrueType or Type1 font. It does not offer tools for designing or editing glyphs. These command line programs will allow you to build an OpenType font from an existing font, verify the contents of the font, and proof the font on screen or on paper. The AFDKO also contains useful technical documentation and some example font source material. Note! Although the FDK directory tree contains a number of Python scripts, none of them can be used by double-clicking on them; they can only be called by typing commands into a command line window. See the [`afdko`](https://github.com/adobe-type-tools/afdko) home page for installation instructions. -Once the AFDKO is installed, all the command-line programs can be run by entering the command name in a Terminal window (OSX, Windows, Linux), along with the necessary option text. All command-line tools provide usage and help text with the options `-u` and `-h`. +Once the AFDKO is installed, all the command line programs can be run by entering the command name in a Terminal window (OSX, Windows, Linux), along with the necessary option text. All command line tools provide usage and help text with the options `-u` and `-h`. # 2. Overview of Programs @@ -19,7 +19,7 @@ The tools fall into several different functional groups. ### `autohint`/`psautohint` -This program is the Adobe auto-hinter. It can be applied to both OpenType/CFF and Type 1 fonts. Works with Type 1 and OpenType/CFF fonts only. It uses Just von Rossum's [`fontTools`](https://github.com/fonttools/fonttools) Python package for accessing and changing the font data. +This program is the Adobe auto-hinter. It can be applied to both OpenType/CFF and Type 1 fonts. Works with Type 1 and OpenType/CFF fonts only. It uses Just van Rossum's [`fontTools`](https://github.com/fonttools/fonttools) Python package for accessing and changing the font data. ### `makeotf` @@ -35,7 +35,7 @@ This script will use a .designspace file and the output OTFs of `buildmasterotfs ### `makeinstancesufo` -This script will generate UFO instances from a .designspace file, and a set of compatible UFO masters. More info on designspace files and interpolation systems can be found at [Superpolator.com](http://superpolator.com/). +This script will generate UFO instances from a .designspace file, and a set of compatible UFO masters. More info on designspace files and interpolation systems can be found at [Superpolator.com](http://superpolator.com/) and [DesignSpaceDocument Specification](https://github.com/fonttools/fonttools/tree/master/Doc/source/designspaceLib). ### `mergefonts` @@ -63,15 +63,15 @@ This allows you to cut and paste the entire binary block of a font table from on ### `stemhist`/`psstemhist` -This program provides reports which help in selecting the global hint data and alignment zones for Type 1 hinting. You should look at the reports from this tool in order to select the most common stem widths, and then use a program such as FontLab or Robofont to set the values in the font. This should be done before hinting the font. Works with Type 1 and OpenType/CFF fonts only. +This program provides reports which help in selecting the global hint data and alignment zones for Type 1 hinting. You should look at the reports from this tool in order to select the most common stem widths, and then use a program such as FontLab or RoboFont to set the values in the font. This should be done before hinting the font. Works with Type 1 and OpenType/CFF fonts only. ### `ttfcomponentizer` -Componentizes glyphs of a TrueType font with information from an external UFO font. The script only supports components that are not scaled, rotated nor flipped. +Componentizes glyphs of a TrueType font with information from an external UFO font. The script only supports components that are not scaled, rotated or flipped. ### `ttx` -This tool can dump all or a few tables from an OpenType font to a human-readable text XML file, and can compile this XML file back to full OpenType font. It is an ideal tool for making simple changes of a few values. Used with care, it can also be used to make extensive changes. This is tool is provided by Just von Rossum as part of the fontTools library. It is provided here for convenience, in a form that does not require an installed Python interpreter. +This tool can dump all or a few tables from an OpenType font to a human-readable text XML file, and can compile this XML file back to full OpenType font. It is an ideal tool for making simple changes of a few values. Used with care, it can also be used to make extensive changes. This is tool is provided by Just van Rossum as part of the fontTools library. It is provided here for convenience, in a form that does not require an installed Python interpreter. ### `tx` @@ -89,7 +89,7 @@ This program can report data from an OpenType font in a variety of ways. All tab ### `tx` -This tool has two modes that are useful for proofing. With the `-bc` option, it will rasterize a glyph to the command-line window, using ASCII characters. This is surprisingly useful when you want a quick look at a glyph. With the `-pdf` option, it will write a pdf file which shows the glyphs in the font, either 320 per page or 1 per page. +This tool has two modes that are useful for proofing. With the `-bc` option, it will rasterize a glyph to the command line window, using ASCII characters. This is surprisingly useful when you want a quick look at a glyph. With the `-pdf` option, it will write a pdf file which shows the glyphs in the font, either 320 per page or 1 per page. ### `ttx` @@ -119,11 +119,11 @@ Shows one glyph per page. Shows hints and alignment zones. Shows a waterfall of point sizes for all glyphs in the font. This is used to evaluate hinting. In order to allow hinting to be seen, the font is embedded in the PDF, and glyphs are referenced by char code. Does not yet work with TrueType and CID-keyed fonts. -Note that the tools ending in "plot" are all simply small command-file scripts that call a single Python script with different options. The `-h` option for all these scripts will produce the same list of **all** the options supported by the single Python script. You can customize the PDF proofs by providing additional options. Look at the command files; these can by edited to supply additional options to the main script. This was completed shortly before the FDK was released, and has seen little use. It will improve over time. It uses the OpenSource Python package "Pickle" to create the PDF documents, and Just von Rossum's fontTools Python package for accessing the font data. +Note that the tools ending in “plot” are all simply small command-file scripts that call a single Python script with different options. The `-h` option for all these scripts will produce the same list of **all** the options supported by the single Python script. You can customize the PDF proofs by providing additional options. Look at the command files; these can be edited to supply additional options to the main script. This was completed shortly before the FDK was released, and has seen little use. It will improve over time. It uses the OpenSource Python package “Pickle” to create the PDF documents, and Just van Rossum's fontTools Python package for accessing the font data. ## 2.3 Validation -### `autohint` +### `psautohint` The auto-hinting program will report at length about hinting issues. Some of these you can ignore, such as reports about near misses when a stem could be controlled by a hint-zone but is just a little too wide or too narrow. By adjusting either the stem widths or the hint-zones according to these reports, you can include more stems in the set that are controlled by hints, but you can also reasonably decide that is not worth the effort. However, many complaints do need fixing, such not having nodes at vertical or horizontal extremes of a curve. @@ -133,7 +133,7 @@ This tool will check the quality of the glyph outline data, and should always be ### `comparefamily` -The tool examines all the fonts in a directory and runs many quality checks. It is the only tool which checks consistency and compares data across a family of fonts, as well as in a single font. It will point out any errors in naming within a style-linked group. Every time the Adobe Type Department finds a bug in the Adobe OpenType fonts, we try to put a check in here. It is not a complete validation tool, but it does represents several years of experience of mistakes made by typographers. +The tool examines all the fonts in a directory and runs many quality checks. It is the only tool which checks consistency and compares data across a family of fonts, as well as in a single font. It will point out any errors in naming within a style-linked group. Every time the Adobe Type Department finds a bug in the Adobe OpenType fonts, we try to put a check in here. It is not a complete validation tool, but it does represent several years of experience of mistakes made by typographers. ### `sfntdiff` @@ -141,12 +141,12 @@ This tool does a low-level comparison of two OpenType font files. It is most use ### `ttx` -The best way to see in detail how two fonts differ is to use the ttx tool to dump XML files, and then compare them with a good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC. This tool was developed by Just von Rossum of LettError, and is available under OpenSource licensing from: https://github.com/fonttools/fonttools +The best way to see in detail how two fonts differ is to use the ttx tool to dump XML files, and then compare them with a good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC. This tool was developed by Just van Rossum of LettError, and is available under OpenSource licensing from: https://github.com/fonttools/fonttools ### `ttxn` -This tool is used to test if two fonts are functionally the same. It sorts and modifies the output from the ttx and tx tools to build a normalized text dump that eliminates differences due to issues such as OTL table record order, glyph order and subroutinzation differences. It writes one file for each table in the font. A good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC, can then be used to compare the output files from two different fonts. It is particularly useful in comparing older and newer versions of the same font. +This tool is used to test if two fonts are functionally the same. It sorts and modifies the output from the ttx and tx tools to build a normalized text dump that eliminates differences due to issues such as OTL table record order, glyph order and subroutinization differences. It writes one file for each table in the font. A good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC, can then be used to compare the output files from two different fonts. It is particularly useful in comparing older and newer versions of the same font. ### `tx` -This tool has a couple of modes that are good for testing. It will show only data about the font program with in a font file, either CFF or TrueType. The `-dump` option is good for looking at a text report of the CFF font global and glyph data. The `-bc` option takes additional option that outputs a hash of the rasterized glyphs to a file. This good for finding if hinting has changed in a font; if the hash files for a set of glyphs are the same between two fonts, then the glyphs rasterized identically at the specified point size. You can use this to judge if fonts are functionally equivalent, even if the outlines are not exactly the same. Finally, converting any font to CFF will yield error reports if the font data is not syntactically correct, and if any glyphs are not hinted. +This tool has a couple of modes that are good for testing. It will show only data about the font program within a font file, either CFF or TrueType. The `-dump` option is good for looking at a text report of the CFF font global and glyph data. The `-bc` option takes additional option that outputs a hash of the rasterized glyphs to a file. This is good for finding if hinting has changed in a font; if the hash files for a set of glyphs are the same between two fonts, then the glyphs rasterized identically at the specified point size. You can use this to judge if fonts are functionally equivalent, even if the outlines are not exactly the same. Finally, converting any font to CFF will yield error reports if the font data is not syntactically correct, and if any glyphs are not hinted. diff --git a/docs/CommandLineHowTo.md b/docs/CommandLineHowTo.md index c08094412..bd97dcf25 100644 --- a/docs/CommandLineHowTo.md +++ b/docs/CommandLineHowTo.md @@ -60,7 +60,7 @@ Choose “Buffer” from the drop-down menu, and set the scrollback number of li Now, at the bottom of the dialog, click on the button “Use Settings as Defaults”. This makes your changes apply to new command windows. -To change the prompt, you need to edit an obscure file that sets parameters for the *Terminal* program when it starts up. Unfortunately, the way the *Terminal* program works depends on which command line program, or "shell" it is setup to use. There are several, and each one uses a different name for its startup file, and requires a different line of text added to change the prompt. To see which one you have, under the *Terminal* menu option, choose “Preferences…”, and note the line of text in the top text field. The default under Mac OS X 10.14 and earlier is `bash`, while under Mac OS X 10.15 ("Catalina") is `zsh`. +To change the prompt, you need to edit an obscure file that sets parameters for the *Terminal* program when it starts up. Unfortunately, the way the *Terminal* program works depends on which command line program, or “shell” it is setup to use. There are several, and each one uses a different name for its startup file, and requires a different line of text added to change the prompt. To see which one you have, under the *Terminal* menu option, choose “Preferences…”, and note the line of text in the top text field. The default under Mac OS X 10.14 and earlier is `bash`, while under Mac OS X 10.15 (“Catalina”) is `zsh`. |Program name|Startup file name|Line to add | |------------|-----------------|-------------------| @@ -90,7 +90,7 @@ Commands which operate on files require that you specify the directory path of t ``` open /Users/rroberts/.bash_profile # Mac start C:\adobe\FDK\FDKReleaseNotes.txt # Windows -autohint -a MyFont.pfa # any system +psautohint -a MyFont.pfa # any system ``` The easiest way to get a file path into the command line is to drag its icon from a *Finder/Explorer* window onto the *Terminal/Command Prompt* window. When you do this, the absolute path — the complete path from the computer’s root directory — is copied. However, a command window always has a “current” directory. If the file is in the current directory, then you only need to type the file’s name, as in the third example above. To see the absolute path of the current directory, type the following command: @@ -107,13 +107,13 @@ If you leave off the initial slash (/), then the path is assumed to be relative Some commands produce a lot of text output, so much that it would be more convenient to look at the output in a text editor with good search functions. To send the output of a command to a file, add a greater-than sign (`>`) followed by a file path, to the command line. For example: ``` -autohint -a MyFont.pfa +psautohint -a MyFont.pfa ``` is likely to produce several hundred lines of output. To browse this more easily, enter: ``` -autohint -a MyFont.pfa > MyFont_autohint.txt +psautohint -a MyFont.pfa > MyFont_autohint.txt ``` -This will “re-direct” the output of the autohint command into the file `MyFont_autohint.txt`. You +This will “re-direct” the output of the psautohint command into the file `MyFont_autohint.txt`. You can then open this file in your favorite text editor, and search for interesting notes. ## **Favorite AFDKO (Adobe® Font Development Kit for OpenType®) commands** @@ -131,13 +131,13 @@ Run `checkOutlines` QA tool on the font MinionPro-Bold.otf present in the Bold s ``` checkOutlines Bold/MinionPro-Bold.otf ``` -Autohint only unhinted glyphs in a font: (This allows you to manually hint some glyphs in FontLab without overwriting that work when using the autohint program) +Autohint only unhinted glyphs in a font: (This allows you to manually hint some glyphs in FontLab without overwriting that work when using the psautohint program) ``` -autohint font.pfa +psautohint font.pfa ``` Autohint all glyphs in a font: (This will remove any hints that existed before) ``` -autohint -a font.pfa +psautohint -a font.pfa ``` Build and OpenType CFF font in release mode, assuming that all the input files (font.pfa, features, fontinfo, FontMenuNameDB and GlyphOrderAndAliasDB) have default names, and default locations relative to the current directory: (The resulting OpenType font file, will be named according to the font’s PostScript® name) ``` @@ -177,7 +177,7 @@ spot -t GPOS=7 MinionPro-Regular.otf > gpos.txt ``` ## **Recommendations for text editing applications** -Large log files and the urge to build lists of command lines require a text editor with excellent search-and-replace abilities. For example, it is useful to be able to search the `compareFamily` report for all lines containing the word “Error”, and show them all in a window. For Windows, the clear low-cost leader is [UltraEdit®](https://www.ultraedit.com/); for Mac, an excellent choice is [BBedit®](https://www.barebones.com/products/bbedit/). There are lots of other options, free and paid. Get one, and read the program help about *Regular Expressions* (sometimes referenced as grep or regexp). *Regular Expressions* is a programmer term for wide-spread standard for wild cards on steroids. These let you do things like “find all lines beginning with ‘error’, containing MinionPro-Bold, not containing ‘width’ after MinionPro-Bold, and not containing ‘ligature’”. The very complex forms are mind-bending, but you can do very useful things with the simple wild-cards. MS Word, WordPad and TextEdit are woefully insufficient for finding useful information and for building command line batch files. +Large log files and the urge to build lists of command lines require a text editor with excellent search-and-replace abilities. For example, it is useful to be able to search the `compareFamily` report for all lines containing the word “Error”, and show them all in a window. For Windows, the clear low-cost leader is [UltraEdit®](https://www.ultraedit.com/); for Mac, an excellent choice is [BBEdit®](https://www.barebones.com/products/bbedit/). There are lots of other options, free and paid. Get one, and read the program help about *Regular Expressions* (sometimes referenced as grep or regexp). *Regular Expressions* is a programmer term for wide-spread standard for wild cards on steroids. These let you do things like “find all lines beginning with ‘error’, containing MinionPro-Bold, not containing ‘width’ after MinionPro-Bold, and not containing ‘ligature’”. The very complex forms are mind-bending, but you can do very useful things with the simple wild-cards. MS Word, WordPad and TextEdit are woefully insufficient for finding useful information and for building command line batch files. A real example of the power of command line tools plus good editors with regular expression support is the following story on Mac OS X: 1) Discover that for a library of hundreds of fonts, the copyright string needs to have “, 2007” added to the list of copyright years. diff --git a/docs/MSFontValidatorIssues.md b/docs/MSFontValidatorIssues.md index 0daffb1fc..f6bfa147a 100644 --- a/docs/MSFontValidatorIssues.md +++ b/docs/MSFontValidatorIssues.md @@ -20,7 +20,7 @@ The following is a list of inappropriate error messages issued by the MS Font Va #### 2.a. The following message is caused by the presence of the GPOS ‘size’ feature, which correctly uses a non-NULL FeatureParams pointer. This feature is registered. E5400 The FeatureParams field is not null FeatureList, FeatureRecord[30](size), FeatureTable -#### 2.b. The following message is causes by the presence of stylisitic set features. These feature tags are registered. +#### 2.b. The following message is causes by the presence of stylistic set features. These feature tags are registered. W5300 The FeatureRecord tag is valid, but unregistered FeatureList, FeatureRecord[], tag = 'ss01' ### 3. Messages caused by OS/2 table version 4 diff --git a/docs/MakeOTFUserGuide.md b/docs/MakeOTFUserGuide.md index 65d521f99..33ad36d48 100644 --- a/docs/MakeOTFUserGuide.md +++ b/docs/MakeOTFUserGuide.md @@ -1,7 +1,7 @@ # MakeOTF OpenType/CFF compiler - User Guide ## **Overview** -MakeOTF is a tool designed to create an OpenType® font from a source font file and from a text file containing high-level descriptions of OpenType layout features. It is designed to run as commandline tool: a command typed into the Terminal window on Mac OS® X, or in the DOS window on Windows®. Note that MakeOTF is only a compiler of font data, not a font editor. +MakeOTF is a tool designed to create an OpenType® font from a source font file and from a text file containing high-level descriptions of OpenType layout features. It is designed to run as a command line tool: a command typed into the Terminal window on Mac OS® X, or in the DOS window on Windows®. Note that MakeOTF is only a compiler of font data, not a font editor. MakeOTF requires a number of source files that can all be specified through options for the makeotf command: * **`font`** - usually named `font.pfa` or `cidfont.ps`. This can be either a Type 1 or CID font file, a TrueType font file, or an OpenType/CFF font file. Note that only the glyph outlines are taken from the source font. @@ -54,7 +54,7 @@ MyFontFamily/ ``` The idea is that some data, such as the files `FontMenuNameDB` and `GlyphOrderAndAliasDB`, will be shared between all members of the type family, whereas other data will only apply to a subgroup of the family. By placing the shareable data at a higher level in the directory tree, one can avoid having multiple copies of the same data, which means there will be less files to edit, in case the data needs to be changed. This is most important for the `features.family` file. -Usually, positioning rules such as kerning (`features.kern`) are specific to each font, but most (or all) of the substitution rules are likely to be the same for all fonts. A good practice is to have a features file for each family member, in the same directory as the source font file, and then use an include statement to reference feature files located higher in the directory tree. In the example above, there are two separate `features.family` files, one for Roman and another for Italic. These can, in turn, be shared between all family members under each branch. The need for two different `features.family` files comes from the fact that Roman and Italic styles might not have the same number of substitution (GSUB) rules — Italic tends to have more. +Usually, positioning rules such as kerning (`features.kern`) are specific to each font, but most (or all) of the substitution rules are likely to be the same for all fonts. A good practice is to have a feature file for each family member, in the same directory as the source font file, and then use an include statement to reference feature files located higher in the directory tree. In the example above, there are two separate `features.family` files, one for Roman and another for Italic. These can, in turn, be shared between all family members under each branch. The need for two different `features.family` files comes from the fact that Roman and Italic styles might not have the same number of substitution (GSUB) rules — Italic tends to have more. Once one has assembled all the necessary files, the next step is to open a command window — the Terminal program on Mac OS X, or the Command program on Windows —, and use the cd command to set the current working directory to the directory which contains the set of source files to compile the OpenType font: ``` @@ -95,13 +95,13 @@ makeotf –fp myproject.fpr |`-sans` | | Specify that any added glyphs will use the sans-serif Multiple Master builtin glyph data.| |`-cs` | | Override the heuristics, and specify the script ID for the Mac cmap subtable.| |`-cl`| | Override the heuristics, and specify the language ID for the Mac cmap subtable.| -|`-cm` |`` | Specify path to CID CMap encoding file for the font Mac encoding. (CIDkeyed fonts only)| +|`-cm` |`` | Specify path to CID CMap encoding file for the font Mac encoding. (CID-keyed fonts only)| |`-ch`|``| Specify path to CID CMap encoding file for the font Unicode UTF-32 encoding for horizontal glyphs. (CID-keyed fonts only)| |`-cv`|``| Specify path to CID CMap encoding file for the font Unicode UTF-32 encoding for vertical glyphs. (CID-keyed fonts only)| |`-ci`|``| Specify path to Unicode Variation Sequence specification file.| -|`-dbl`| |Map glyph names to two Unicode values rather than one. This was the default behaviour of makeotf in FDK 1.6 and earlier. The Adobe Type Department now discourages this practice. The option exists only to allow building fonts that match original versions. See `makeotf –h` for the hard-coded list of glyphs.| +|`-dbl`| |Map glyph names to two Unicode values rather than one. This was the default behavior of makeotf in FDK 1.6 and earlier. The Adobe Type Department now discourages this practice. The option exists only to allow building fonts that match original versions. See `makeotf –h` for the hard-coded list of glyphs.| |`-dcs`| |Set OS/2.DefaultChar to the Unicode value for `space`, rather than `.notdef`. The latter is correct by the OT spec, but QuarkXPress 6.5 requires the former in order to print OTF/CFF fonts.| -|`-fi` |``| Path to the `fontinfo` file. If no path is given, the default is to look for first `fontinfo`, then `cidfontinfo`, in the current directory. Used to set some default values. This are overridden by any conflicting settings in the project file and then by command-line options. This option is processed before any others, so if the path is relative, it is relative to the current working directory. All other relative paths are relative so the source font’s parent directory.| +|`-fi` |``| Path to the `fontinfo` file. If no path is given, the default is to look for first `fontinfo`, then `cidfontinfo`, in the current directory. Used to set some default values. This are overridden by any conflicting settings in the project file and then by command line options. This option is processed before any others, so if the path is relative, it is relative to the current working directory. All other relative paths are relative so the source font’s parent directory.| |`-sp`|``|Save the current options to the file path provided, as well as to the current.fpr file.| |`-nb`| |Turn off the Bold style. Can be used to override a project file setting, otherwise has no effect.| |`-ni`| |Turn off the Italic style. Can be used to override a project file setting, otherwise has no effect.| @@ -211,7 +211,7 @@ To use accented characters in Latin menu names, one needs two `f=` entries: one |`f=Arnold B`**`\00f6`**`cklin` | Windows | |`f=1,Arnold B`**`\9a`**`cklin` | Mac | -`00f6` is the hex representation of the Unicode for odieresis (`ö`). Unicode hex values must have 4 digits. `9a` is MacRoman encoding for `odieresis`. Mac char code hex values must have 2 digits for Western cript encodings, and may have 2 or 4 digits for CJK encodings. +`00f6` is the hex representation of the Unicode for odieresis (`ö`). Unicode hex values must have 4 digits. `9a` is MacRoman encoding for `odieresis`. Mac char code hex values must have 2 digits for Western script encodings, and may have 2 or 4 digits for CJK encodings. In general, the `f=`, `s=`, and `l=` can be extended to set non-Latin strings by adding the triplet (platform code, script code, language code) after the equal sign (=). The values are the same as described for the name table name ID strings. For example: @@ -223,7 +223,7 @@ In general, the `f=`, `s=`, and `l=` can be extended to set non-Latin strings by ## **FontMenuNameDB - Version 1** -Versions of MakeOTF prior to FDK 2.5 used a similar synax in the FontMenuNameDB file. When this older version syntax is used, MakeOTF will build the name table font menu names as it did in FDK version 2.0 and earlier. These earlier versions built the Windows platform names the same. However, only the Preferred Family and Style names were written in the Mac platform name strings, and in respectively name ID 1 and name ID 2. The key “c=” set the compatbile family name for the Windows platform. There was no way to specify a compatible family name for the Mac platform. The key `c=1,` set instead a compatible value for the Mac platform Full Name String, name ID 18. +Versions of MakeOTF prior to FDK 2.5 used a similar syntax in the FontMenuNameDB file. When this older version syntax is used, MakeOTF will build the name table font menu names as it did in FDK version 2.0 and earlier. These earlier versions built the Windows platform names the same. However, only the Preferred Family and Style names were written in the Mac platform name strings, and in respectively name ID 1 and name ID 2. The key “c=” set the compatible family name for the Windows platform. There was no way to specify a compatible family name for the Mac platform. The key `c=1,` set instead a compatible value for the Mac platform Full Name String, name ID 18. |**Font Entry Description**| |--------------------------| @@ -236,7 +236,7 @@ Versions of MakeOTF prior to FDK 2.5 used a similar synax in the FontMenuNameDB If the key `c=` is used, then MakeOTF will build the older style name table. If the keys `l=` or `m=` are present, it will build the newer style name table . If none of these are present, then there is no difference in how the name table is built. ## **GlyphOrderAndAliasDB** (GOADB) -The GOADB file is used to rename and to establish an order for the glyphs in a font. It is a simple text file with one line per glyph name. Each line contains at least two fields, and optionally three fields. The first field is the final glyph name to be used in the output font. The second field is the ‘friendly’ name used in the source font data. The third field is a Unicode value, specified in the form `uniXXXX` or `uXXXX`, where `XXXX` is a Unicode value (hexadecimal). One may specify more than one Unicode value for a glyph by giving a comma seperated list of values, for example: `uni0020,uni00A0`. The `XXXX` hexidecimal values *must* be either numerals (0-9) or uppercase letters. Values containing lowercase letters will be ignored. The source font is not required to have any glyphs that are named in the `GlyphOrderAndAliasDB` file. +The GOADB file is used to rename and to establish an order for the glyphs in a font. It is a simple text file with one line per glyph name. Each line contains at least two fields, and optionally three fields. The first field is the final glyph name to be used in the output font. The second field is the ‘friendly’ name used in the source font data. The third field is a Unicode value, specified in the form `uniXXXX` or `uXXXX`, where `XXXX` is a Unicode value (hexadecimal). One may specify more than one Unicode value for a glyph by giving a comma separated list of values, for example: `uni0020,uni00A0`. The `XXXX` hexadecimal values *must* be either numerals (0-9) or uppercase letters. Values containing lowercase letters will be ignored. The source font is not required to have any glyphs that are named in the `GlyphOrderAndAliasDB` file. It should be noted that the ordering, renaming, and Unicode override operations are applied only if the `–r` option or the `-ga` option is specified. These operations work as follows: @@ -259,15 +259,15 @@ Note that MakeOTF cannot re-order glyphs when the source font is a TrueType or O Note that MakeOTF no longer assigns glyphs Unicode values from the Private Use Area (PUA) block. If such Unicode values are needed, they must be specified in a `GOADB` file. ## **fontinfo** -The fontinfo file is a simple text file containing key-value pairs. Each line contains two white-space separated fields. The first field is a keyword, and the second field is the value. makeotf will look for a fontinfo file in the same directory as the source font file, and, if found, use it to set some default values. These values will be overridden if they are also set by a project file, and then by any `makeotf` command-line options. The keywords and values currently supported are: +The fontinfo file is a simple text file containing key-value pairs. Each line contains two white-space separated fields. The first field is a keyword, and the second field is the value. makeotf will look for a fontinfo file in the same directory as the source font file, and, if found, use it to set some default values. These values will be overridden if they are also set by a project file, and then by any `makeotf` command line options. The keywords and values currently supported are: | Keyword | Values | Effect | |---------|--------|--------| -|`IsBoldStyle`|`true/false` | Set the font style to Bold. Same as the commandline option `–b`| -|`IsItalicStyle`|`true/false` | Set the font style to Italic. Same as the commandline option `–i`| -|`PreferOS/2TypoMetrics`|`true/false` | Set the OS/2 table fsSelection bit 7, `USE_TYPO_METRICS`. Same as the command-line option `–osbOn 7`.| -|`IsOS/2WidthWeigthSlopeOnly`|`true/false` | Set the OS/2 table fsSelection bit 8, `WEIGHT_WIDTH_SLOPE_ONLY`. Same as the command-line option `–osbOn 8`.| -|`IsOS/2OBLIQUE`|`true/false` | Set the OS/2 table fsSelection bit 9, `OBLIQUE`. Same as the command-line option `–osbOn 9`.| +|`IsBoldStyle`|`true/false` | Set the font style to Bold. Same as the command line option `–b`| +|`IsItalicStyle`|`true/false` | Set the font style to Italic. Same as the command line option `–i`| +|`PreferOS/2TypoMetrics`|`true/false` | Set the OS/2 table fsSelection bit 7, `USE_TYPO_METRICS`. Same as the command line option `–osbOn 7`.| +|`IsOS/2WidthWeigthSlopeOnly`|`true/false` | Set the OS/2 table fsSelection bit 8, `WEIGHT_WIDTH_SLOPE_ONLY`. Same as the command line option `–osbOn 8`.| +|`IsOS/2OBLIQUE`|`true/false` | Set the OS/2 table fsSelection bit 9, `OBLIQUE`. Same as the command line option `–osbOn 9`.| ## **Adobe character code map** (CMap) A CMap file maps character codes to glyph selectors. It is only necessary for CID fonts. This file may be located anywhere within the file system, as long as the directory path is stored in the `FontEnvironment.txt` file, or the file is chosen explicitly via the UI. The default CMap files are automatically selected by MakeOTF when the `cidfontinfo` file is selected. @@ -291,17 +291,17 @@ When looking for default CID CMap files, MakeOTF uses the following rules: | Adobe-CNS1: | B5pc-H | UniCNS-UTF32-H | UniCNS-UTF32-V | | Adobe-Korea1: | KSCpc-EUC-H | UniKS-UTF32-H | UniKS-UTF32-V | - If one wants to use a CMap, which would not be found by these assumptions, one must specify them explicitly on the command-line while using `makeotf`. + If one wants to use a CMap, which would not be found by these assumptions, one must specify them explicitly on the command line while using `makeotf`. -For further information on CMaps, please read the many [Adobe’s Technical Notes](https://github.com/adobe-type-tools/cmap-resources) +For further information on CMaps, please read the many [Adobe Technical Notes](https://github.com/adobe-type-tools/cmap-resources) ## **Unicode Variation Sequence (UVS) File** -A UVS file is a list of records, each of which specifies the glyph which should be displayed for a given combination of a Unicode encoding value and a Unicode Variation Selector. You can read about Unicode Variation Sequence in the publication “Unicode Technical Stadard #37 , Ideographic Variation Database , at http://unicode.org/reports/tr37/. The format depends on the source font format: CID-keyed fonts require three fields in each record, non-CID fonts require only two. +A UVS file is a list of records, each of which specifies the glyph which should be displayed for a given combination of a Unicode encoding value and a Unicode Variation Selector. You can read about Unicode Variation Sequence in the publication “Unicode Technical Standard #37 , Ideographic Variation Database , at http://unicode.org/reports/tr37/. The format depends on the source font format: CID-keyed fonts require three fields in each record, non-CID fonts require only two. #### For CID-keyed fonts: The `makeotf` command will look for a UVS file under FDK/Tools/SharedData/Adobe CMAPS/, where stands for the font’s CID Registry-Order-Supplement. The file will be assumed to be named “`_sequences.txt`. For a CID font with the R-O-S “Adobe-Japan1-6”. the default UVS file path would be “FDK/Tools/SharedData/Adobe CMAPS/Adobe-Japan1-6/Adobe-Japan1_sequences.txt“ . The option `-ci ` may be used to specify a UVS file path other than the default. -The file format is an ASCII text file. Each line represents one Unicode Variation Sequence(UVS). A line may be blank, or contain a comment that starts with the charater “#”. +The file format is an ASCII text file. Each line represents one Unicode Variation Sequence(UVS). A line may be blank, or contain a comment that starts with the character “#”. Each line contains three fields. Fields are separated by a semicolon followed by whitespace. The fields are: 1) Variation Sequence. Two hexadecimal value, with no leading “x” or “0x, separated by a space. The first is the Base Unicode Value, and the second is the Variation Selector value.. @@ -312,7 +312,7 @@ Each line contains three fields. Fields are separated by a semicolon followed by ``` # Registered Adobe-Japan1 sequences # Version 07/30/2007 -# Prepared by Ken Lunde (lunde@adobe.com), Adobe Systems Incorporated +# Prepared by Ken Lunde, Adobe Systems Incorporated 3402 E0100; Adobe-Japan1; CID+13698 3402 E0101; Adobe-Japan1; CID+13697 3402 E0102; Adobe-Japan1; CID+13699 @@ -336,9 +336,9 @@ In 2006, Microsoft and Adobe began discussions to define three new bit values in These bits have meaning only in OS/2 table version 4 and later; in earlier versions, they are reserved, and should be set off. The Adobe Type Department will set the bits in our new fonts. #### `USE_TYPO_METRICS` -When bit 7 is on, programs are supposed to use the OS/2 table sTypoAscent/Descent/LineGap for vertical line spacing. This bit was defined because the Windows layout libraries have been using the OS/2 table winAscent/Descent values instead. The next release of Windows Presentation Foundation, on which new versions of Microsoft programs such as Word will be based, and which is due in late 2006, will use the sTypo values instead – but only if this bit is on. This bit certifies that the OS/2 sTypo values are good, and have the side effect of being present only in new fonts, so that reflow of documents will happen less often than if Microsoft just changed the behaviour for all fonts. For example, it is rumored that some TrueType fonts have bad values for the sTypo values, making it undesirable to apply the sTypo values for all existing fonts. +When bit 7 is on, programs are supposed to use the OS/2 table sTypoAscent/Descent/LineGap for vertical line spacing. This bit was defined because the Windows layout libraries have been using the OS/2 table winAscent/Descent values instead. The next release of Windows Presentation Foundation, on which new versions of Microsoft programs such as Word will be based, and which is due in late 2006, will use the sTypo values instead – but only if this bit is on. This bit certifies that the OS/2 sTypo values are good, and have the side effect of being present only in new fonts, so that reflow of documents will happen less often than if Microsoft just changed the behavior for all fonts. For example, it is rumored that some TrueType fonts have bad values for the sTypo values, making it undesirable to apply the sTypo values for all existing fonts. -The next two bits have to do with the fact that future generations of Microsoft programs, and programs from other vendors that use the Windows Presentation Foundation (WPF) libraries, will use the Cascading Style Sheet (CSS) v.2 specification for specifying fonts. The provisions of this specification can be seen at https://www.w3.org/TR/css-fonts-3/. In brief, a CSS font declaration within a document will describe a font by specifying the family name, and one or more properties; there is no way to refer directly to a specific font. The possible styles are Regular, Italic and Oblique. Weight and width are specified with separate keywords, with a limited and defined set of possible values. An example (in a simplified syntax) is `font-family: TimesStd, style: italic, weight: 700, width: normal`. One requirement of a CSS family is that each font has to have a different set of properties. There cannot be two fonts in a CSS font family which both have the properties `style: italic, weight: 700, width: normal`. For OpenType fonts, the name table Preferred Family Name is used as the CSS family name. Nonetheless, OpenType font families may well contain more than one font with a particular set of properties, but this fact will create a conflict in a CSSbased environment. When WPF encounters one of such families, it will divide the family into groups, so that only one font in each group has a given set of properties. However, that will allow WPF to provide new family names for each group, and these might not correspond to the type designer’s initial intentions. +The next two bits have to do with the fact that future generations of Microsoft programs, and programs from other vendors that use the Windows Presentation Foundation (WPF) libraries, will use the Cascading Style Sheet (CSS) v.2 specification for specifying fonts. The provisions of this specification can be seen at https://www.w3.org/TR/css-fonts-3/. In brief, a CSS font declaration within a document will describe a font by specifying the family name, and one or more properties; there is no way to refer directly to a specific font. The possible styles are Regular, Italic and Oblique. Weight and width are specified with separate keywords, with a limited and defined set of possible values. An example (in a simplified syntax) is `font-family: TimesStd, style: italic, weight: 700, width: normal`. One requirement of a CSS family is that each font has to have a different set of properties. There cannot be two fonts in a CSS font family which both have the properties `style: italic, weight: 700, width: normal`. For OpenType fonts, the name table Preferred Family Name is used as the CSS family name. Nonetheless, OpenType font families may well contain more than one font with a particular set of properties, but this fact will create a conflict in a CSS-based environment. When WPF encounters one of such families, it will divide the family into groups, so that only one font in each group has a given set of properties. However, that will allow WPF to provide new family names for each group, and these might not correspond to the type designer’s initial intentions. Similarly, WPF will infer the font’s properties by analyzing its Preferred Family and Style names, and may mistakenly conclude that any two fonts in a family cannot be uniquely assigned different sets of font properties. In this case, WPF will also divide the family into groups, and generate new family names for them. The `WEIGHT_WIDTH_SLOPE_ONLY` bit was added to deal with this latter case. When this bit is set in a font’s OS/2 table fsSelection field, the application is requested to trust that all fonts sharing the same Preferred Family name, will differ from all the remaining with respect to their CSS properties. That given, the application can use the OpenType name table font menu names. diff --git a/docs/OpenTypeFeatureFileSpecification.md b/docs/OpenTypeFeatureFileSpecification.md index 7a3928d1f..2c37f0e36 100644 --- a/docs/OpenTypeFeatureFileSpecification.md +++ b/docs/OpenTypeFeatureFileSpecification.md @@ -457,7 +457,7 @@ These named value coordinates can then be used in value records. For example: pos T V ; ``` -Note than when the value record name is used, it must be enclosed by angle +Note that when the value record name is used, it must be enclosed by angle brackets, whether it is a single value or four value record. The `valueRecordDef` is a top level statement, and must be defined outside of feature blocks. It also must be defined before it is used. @@ -1696,7 +1696,7 @@ because there is more than one rule in each referenced lookup, and different rules within the referenced lookups will match in the different contexts. In the first contextual substitution rule, the lookup `CNTXT_LIGS`will be applied at the input sequence glyph “f”, and the glyphs “f” and “i” will be replaced by -“f_i”. The lookup `CNTXT_SUB`will be applied at the input sequence glyph “n”, +“f_i”. The lookup `CNTXT_SUB` will be applied at the input sequence glyph “n”, and the glyph “n” will be replaced by “n.end”. This will happen only when the sequence “f i n” is preceded by any one of the glyphs “a e i o u”. Likewise, in the second contextual substitution rule the glyphs “c” and “t” will be replaced @@ -1754,7 +1754,7 @@ components. ###### Example 5: In this example two Multiple Sub lookups are applied to the same input. The rule below means: in lookup `REORDER_CHAIN` the sequence “ka ka.pas_cakra.ns” is first substituted -by “ka” and then a second lookup subsitutes the remaining “ka” by the sequence “ka.pas_cakra ka”. +by “ka” and then a second lookup substitutes the remaining “ka” by the sequence “ka.pas_cakra ka”. ```fea lookup REMOVE_CAKRA { @@ -3193,7 +3193,7 @@ specification, any glyph not included in one of the class definitions will be assigned glyph class index 0, and will not be included in any of the `GlyphClassDef` classes. -The **MarkAttach** classes of the GDEF table may not be specified explicitly in +The **MarkAttachment** classes of the GDEF table may not be specified explicitly in feature file syntax. They are instead created by the implementation from use of the `lookupflag MarkAttachmentType ` statements. The class names may be from either regular classes definitions or mark class definitions. diff --git a/docs/WinWeights.md b/docs/WinWeights.md index 01ce7fd17..d9998dc48 100644 --- a/docs/WinWeights.md +++ b/docs/WinWeights.md @@ -3,19 +3,19 @@ #### Copyright 2016 Adobe Systems Incorporated. All rights reserved. ## Introduction -Although the Microsoft version of the TrueType specification explicitly allows for usWeightClass to be set to values from 100 to 900, TrueType fonts have historically always used values of 400 for a "regular" font in a Windows family with 700 for a "bold" style-linked font. Because of this history, in practice many or most Windows applications do not handle all possible values without problems. Using certain weightclasses, or style-lining certain weights, can result in fonts which are incorrectly "smeared bold," or cases where regardless of which font is selected (regular or bold) either only the regular or only the bold font appears. +Although the Microsoft version of the TrueType specification explicitly allows for usWeightClass to be set to values from 100 to 900, TrueType fonts have historically always used values of 400 for a “regular” font in a Windows family with 700 for a “bold” style-linked font. Because of this history, in practice many or most Windows applications do not handle all possible values without problems. Using certain weightclasses, or style-lining certain weights, can result in fonts which are incorrectly “smeared bold,” or cases where regardless of which font is selected (regular or bold) either only the regular or only the bold font appears. In general, applications appear to divide into two groups: those which have problems with some weight settings and style-link combinations, and those which do not. The applications which have problems all appear to exhibit the same problems with the same fonts. Some examples of common problem applications include PageMaker 6.5.x, Word 97, and Word 2000. -To avoid such problems, you may wish to follow these guidelines. We have not done exhaustive testing with every possible value for weight or for style-linking, so it is conceivable that certain combinations which we believe are "functional" may have problems with some small number of applications. +To avoid such problems, you may wish to follow these guidelines. We have not done exhaustive testing with every possible value for weight or for style-linking, so it is conceivable that certain combinations which we believe are “functional” may have problems with some small number of applications. ## Usable values -For a font which is "regular" (not style-linked as the bold version of something else), any weightclass value from 250 to 1000 seems to work. -Having a weightclass of 100 or 200 can result in a "smear bold" or (unintentionally) returning the style-linked bold. Because of this, you may wish to manually override the weightclass setting for all "extra light," "ultra light" or "thin" fonts. +For a font which is “regular” (not style-linked as the bold version of something else), any weightclass value from 250 to 1000 seems to work. +Having a weightclass of 100 or 200 can result in a “smear bold” or (unintentionally) returning the style-linked bold. Because of this, you may wish to manually override the weightclass setting for all “extra light,” “ultra light” or “thin” fonts. -It is possible to use manual overrides to change values to any desired number. Be aware that some applications may begin to use weightclass in ways you have not anticipated. For example, newer Adobe applications (starting with Illustrator 9 and Photoshop 6) are using the weightclass where present to help determine sorting order of font submenus for all fonts sharing the same "preferred family." For this reason, we recommend that even if manual weightclass overrides are deemed necessary, font developers should preserve at least the relative weight relationships of all fonts within any given "preferred family." +It is possible to use manual overrides to change values to any desired number. Be aware that some applications may begin to use weightclass in ways you have not anticipated. For example, Adobe applications (starting with Illustrator 9 and Photoshop 6) are using the weightclass where present to help determine sorting order of font submenus for all fonts sharing the same “preferred family.” For this reason, we recommend that even if manual weightclass overrides are deemed necessary, font developers should preserve at least the relative weight relationships of all fonts within any given “preferred family.” -Here are what ranges of weightclasses appear to work consistently as the "bold" style-links from any given base weightclass, along with what names are normally associated with the given weightclass values (association made by makeotf by default, based on the TrueType spec). +Here are what ranges of weightclasses appear to work consistently as the “bold” style-links from any given base weightclass, along with what names are normally associated with the given weightclass values (association made by makeotf by default, based on the TrueType spec). | REG | BOLD RANGE (usable in increments of 50) | |------|-----------------------------------------|