From 35a3be4c965cf854e2116e906543a56648421f20 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 6 Jun 2014 09:11:23 +0200 Subject: [PATCH] Improve documentation of `symbol' option. Other minor documentation issues. --- doc/ttfautohint-1.pandoc | 34 +++++++++++++++++++--------------- frontend/maingui.cpp | 9 ++++----- lib/ttfautohint-scripts.h | 2 +- lib/ttfautohint.h | 17 +++++++++-------- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/doc/ttfautohint-1.pandoc b/doc/ttfautohint-1.pandoc index 810840e..0937047 100644 --- a/doc/ttfautohint-1.pandoc +++ b/doc/ttfautohint-1.pandoc @@ -300,7 +300,7 @@ See ['Hint Sets'](#hint-sets) for a definition and explanation. `--x-height-snapping-exceptions=`*string*, `-X`\ *string* : A list of comma separated PPEM values or value ranges at which no - x-height snapping shall be applied. A value range has the form + x\ height snapping shall be applied. A value range has the form *value1*`-`*value2*, meaning *value1*\ <= PPEM <=\ *value2*. *value1* or *value2* (or both) can be missing; a missing value is replaced by the beginning or end of the whole interval of valid PPEM values, @@ -308,10 +308,10 @@ See ['Hint Sets'](#hint-sets) for a definition and explanation. commas are ignored, and ranges must be specified in increasing order. For example, the string `"7-9, 11, 13-"` means the values 7, 8, 9, 11, 13, 14, 15, etc. Consequently, if the supplied argument is `"-"`, no - x-height snapping takes place at all. The default is the empty string + x\ height snapping takes place at all. The default is the empty string (`""`), meaning no snapping exceptions. - Normally, x-height snapping means a slight increase in the overall + Normally, x\ height snapping means a slight increase in the overall vertical glyph size so that the height of lowercase glyphs gets aligned to the pixel grid (this is a global feature, affecting *all* glyphs of a font). However, having larger vertical glyph sizes is not always @@ -383,13 +383,17 @@ See ['Hint Sets'](#hint-sets) for a definition and explanation. ### Symbol Font `--symbol`, `-s` -: Apply default values for standard (horizontal) stem width and height - instead of deriving them from script-specific, hard-coded default - characters (which usually resemble the shape of a lowercase 'o'). Use - this option (usually in combination with option `--fallback-script`) to - hint symbol or dingbat fonts or math glyphs, for example, that lack - default characters, at the expense of possibly poor hinting results at - small sizes. +: Process a font that ttfautohint would refuse otherwise because it can't + find a single standard character for any of the supported scripts. + + For all scripts that lack proper standard characters, ttfautohint uses a + default (hinting) value for the standard stem width instead of deriving + it from a script's set of standard characters (for the latin script, one + of them is character 'o'). + + Use this option (usually in combination with option `--fallback-script`) + to hint symbol or dingbat fonts or math glyphs, for example, at the + expense of possibly poor hinting results at small sizes. ### Dehint @@ -543,14 +547,14 @@ hinting. This affects the hinting of all glyphs, trying to give them a uniform appearance. - + Compute standard stem widths and heights of the font. The values - are normally taken from glyphs that resemble letter 'o'. + + Compute standard horizontal stem width of the font. The value + is normally taken from glyphs that resemble letter 'o'. + Compute blue zones, see [below](#blue-zones). - If stem widths and heights of single glyphs differ by a large value, or - if ttfautohint fails to find proper blue zones, hinting becomes quite - poor, possibly leading even to severe shape distortions. + If the stem widths of single glyphs differ by a large value, or if + ttfautohint fails to find proper blue zones, hinting becomes quite poor, + possibly leading even to severe shape distortions. Table: script-specific standard characters of the 'latin' writing system diff --git a/frontend/maingui.cpp b/frontend/maingui.cpp index 3925648..27af576 100644 --- a/frontend/maingui.cpp +++ b/frontend/maingui.cpp @@ -1081,11 +1081,10 @@ Main_GUI::create_layout(bool horizontal_layout) symbol_box = new QCheckBox(tr("S&ymbol Font"), this); symbol_box->setToolTip( - tr("If switched on, TTFautohint uses default values" - " for standard stem width and height" - " instead of deriving these values from the input font.
" - "Use this for fonts that don't contain glyphs" - " of a (supported) script.")); + tr("If switched on, TTFautohint accepts fonts" + " that don't contain a single standard character" + " for any of the supported scripts.
" + "Use this for symbol or dingbat fonts, for example.")); dehint_box = new QCheckBox(tr("&Dehint"), this); dehint_box->setToolTip( diff --git a/lib/ttfautohint-scripts.h b/lib/ttfautohint-scripts.h index 76f65e7..500239d 100644 --- a/lib/ttfautohint-scripts.h +++ b/lib/ttfautohint-scripts.h @@ -25,7 +25,7 @@ * script name in lowercase and uppercase, respectively, followed * by a description string. Then comes the corresponding HarfBuzz * script name tag, followed by the default character (to derive - * the standard width and height of stems). + * the standard width of stems). */ SCRIPT(cyrl, CYRL, diff --git a/lib/ttfautohint.h b/lib/ttfautohint.h index 1726cc6..a0db149 100644 --- a/lib/ttfautohint.h +++ b/lib/ttfautohint.h @@ -316,7 +316,7 @@ typedef int * `x-height-snapping-exceptions` * : A pointer of type `const char*` to a null-terminated string that * gives a list of comma separated PPEM values or value ranges at which - * no x-height snapping shall be applied. A value range has the form + * no x\ height snapping shall be applied. A value range has the form * *value1*`-`*value2*, meaning *value1* <= PPEM <= *value2*. *value1* * or *value2* (or both) can be missing; a missing value is replaced by * the beginning or end of the whole interval of valid PPEM values, @@ -324,7 +324,7 @@ typedef int * ignored, and ranges must be specified in increasing order. For * example, the string `"3, 5-7, 9-"` means the values 3, 5, 6, 7, 9, * 10, 11, 12, etc. Consequently, if the supplied argument is `"-"`, no - * x-height snapping takes place at all. The default is the empty + * x\ height snapping takes place at all. The default is the empty * string (`""`), meaning no snapping exceptions. * * `windows-compatibility` @@ -353,12 +353,13 @@ typedef int * `ttfautohint-scripts.h`. * * `symbol` - * : Set this integer to\ 1 if you want to process a font that lacks the - * characters of a supported script, for example, a symbol font. - * ttfautohint then uses default values for the standard stem width and - * height instead of deriving these values from a script's standard - * characters (for the latin script, one of them is character 'o'). The - * default value is\ 0. + * : Set this integer to\ 1 if you want to process a font that ttfautohint + * would refuse otherwise because it can't find a single standard + * character for any of the supported scripts. ttfautohint then uses a + * default (hinting) value for the standard stem width instead of + * deriving it from a script's set of standard characters (for the latin + * script, one of them is character 'o'). The default value of this + * option is\ 0. * * * ### Miscellaneous -- 2.11.4.GIT