[autofit] Update comments.

This commit is contained in:
Werner Lemberg 2013-08-04 09:25:24 +02:00
parent 0d28a7d6a6
commit b8bf8b54e5
1 changed files with 25 additions and 15 deletions

View File

@ -64,13 +64,17 @@ FT_BEGIN_HEADER
* *
* http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
* *
* with appropriate updates.
*
* *
* Segments * Segments
* *
* `af_{cjk,latin,...}_hints_compute_segments' are the functions to * `af_{cjk,latin,...}_hints_compute_segments' are the functions to
* find segments in an outline. A segment is a series of consecutive * find segments in an outline.
* points that are approximately aligned along a coordinate axis. The *
* analysis to do so is specific to a script. * A segment is a series of consecutive points that are approximately
* aligned along a coordinate axis. The analysis to do so is specific
* to a writing system.
* *
* A segment must have at least two points, except in the case of * A segment must have at least two points, except in the case of
* `fake' segments that are generated to hint metrics appropriately, * `fake' segments that are generated to hint metrics appropriately,
@ -79,16 +83,17 @@ FT_BEGIN_HEADER
* *
* Edges * Edges
* *
* `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
* edges.
*
* As soon as segments are defined, the auto-hinter groups them into * As soon as segments are defined, the auto-hinter groups them into
* edges. An edge corresponds to a single position on the main * edges. An edge corresponds to a single position on the main
* dimension that collects one or more segments (allowing for a small * dimension that collects one or more segments (allowing for a small
* threshold). * threshold).
* *
* The auto-hinter first tries to grid fit edges, then to align * As an example, the `latin' writing system first tries to grid-fit
* segments on the edges unless it detects that they form a serif. * edges, then to align segments on the edges unless it detects that
* * they form a serif.
* `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
* edges; they are specific to a script.
* *
* *
* A H * A H
@ -107,6 +112,8 @@ FT_BEGIN_HEADER
* *
* Stems * Stems
* *
* Stems are detected by `af_{cjk,latin,...}_hint_edges'.
*
* Segments need to be `linked' to other ones in order to detect stems. * Segments need to be `linked' to other ones in order to detect stems.
* A stem is made of two segments that face each other in opposite * A stem is made of two segments that face each other in opposite
* directions and that are sufficiently close to each other. Using * directions and that are sufficiently close to each other. Using
@ -127,17 +134,21 @@ FT_BEGIN_HEADER
* The best candidate is stored in field `link' in structure * The best candidate is stored in field `link' in structure
* `AF_Segment'. * `AF_Segment'.
* *
* Stems are detected by `af_{cjk,latin,...}_hint_edges'.
*
* In the above ASCII drawing, the best candidate for both AB and CD is * In the above ASCII drawing, the best candidate for both AB and CD is
* GH, while the best candidate for GH is AB. Similarly, the best * GH, while the best candidate for GH is AB. Similarly, the best
* candidate for EF and GH is AB, while the best candidate for AB is * candidate for EF and GH is AB, while the best candidate for AB is
* GH. * GH.
* *
* The detection and handling of stems is dependent on the writing
* system.
*
* *
* Serifs * Serifs
* *
* On the opposite, a serif has * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
*
* In comparison to a stem, a serif (as handled by the auto-hinter
* module which takes care of the `latin' writing system) has
* *
* best segment_1 = segment_2 && best segment_2 != segment_1 * best segment_1 = segment_2 && best segment_2 != segment_1
* *
@ -147,8 +158,6 @@ FT_BEGIN_HEADER
* The best candidate is stored in field `serif' in structure * The best candidate is stored in field `serif' in structure
* `AF_Segment' (and `link' is set to NULL). * `AF_Segment' (and `link' is set to NULL).
* *
* Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
*
* *
* Touched points * Touched points
* *
@ -178,7 +187,8 @@ FT_BEGIN_HEADER
* differ greatly) * differ greatly)
* *
* - inflection points (i.e., where the `in' and `out' angles are the * - inflection points (i.e., where the `in' and `out' angles are the
* same, but the curvature changes sign) * same, but the curvature changes sign) [currently, such points
* aren't handled in the auto-hinter]
* *
* `af_glyph_hints_align_strong_points' is the function which takes * `af_glyph_hints_align_strong_points' is the function which takes
* care of such situations; it is equivalent to the TrueType `IP' * care of such situations; it is equivalent to the TrueType `IP'