ref: b8bf8b54e5b202fb5d47ac548a59c991fc239883
parent: 0d28a7d6a638fb37f24022f7d0e5a20b5a3cc63f
author: Werner Lemberg <[email protected]>
date: Sun Aug 4 05:25:24 EDT 2013
[autofit] Update comments.
--- a/src/autofit/afhints.h
+++ b/src/autofit/afhints.h
@@ -62,16 +62,20 @@
*
* by David Turner and Werner Lemberg
*
- * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
*
+ * with appropriate updates.
*
+ *
* Segments
*
* `af_{cjk,latin,...}_hints_compute_segments' are the functions to
- * find segments in an outline. 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 script.
+ * find segments in an outline.
*
+ * 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
* `fake' segments that are generated to hint metrics appropriately,
* and which consist of a single point.
@@ -79,18 +83,19 @@
*
* 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
* edges. An edge corresponds to a single position on the main
* dimension that collects one or more segments (allowing for a small
* threshold).
*
- * The auto-hinter first tries to grid fit edges, then to align
- * segments on the edges unless it detects that they form a serif.
+ * As an example, the `latin' writing system first tries to grid-fit
+ * 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
* | |
* | |
@@ -107,6 +112,8 @@
*
* Stems
*
+ * Stems are detected by `af_{cjk,latin,...}_hint_edges'.
+ *
* 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
* directions and that are sufficiently close to each other. Using
@@ -127,18 +134,22 @@
* The best candidate is stored in field `link' in structure
* `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
* 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
* GH.
*
+ * The detection and handling of stems is dependent on the writing
+ * system.
*
+ *
* 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
*
* where segment_1 corresponds to the serif segment (CD and EF in the
@@ -147,9 +158,7 @@
* The best candidate is stored in field `serif' in structure
* `AF_Segment' (and `link' is set to NULL).
*
- * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
*
- *
* Touched points
*
* A point is called `touched' if it has been processed somehow by the
@@ -178,7 +187,8 @@
* differ greatly)
*
* - 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
* care of such situations; it is equivalent to the TrueType `IP'