[autofit] Add ASCII drawing for better explanation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h
index d63b979..649d4a9 100644
--- a/src/autofit/afhints.h
+++ b/src/autofit/afhints.h
@@ -91,6 +91,20 @@ FT_BEGIN_HEADER
* edges; they are specific to a script.
*
*
+ * A H
+ * | |
+ * | |
+ * | |
+ * | |
+ * C | | F
+ * +------<-----+ +-----<------+
+ * | B G |
+ * | |
+ * | |
+ * +--------------->------------------+
+ * D E
+ *
+ *
* Stems
*
* Segments need to be `linked' to other ones in order to detect stems.
@@ -99,6 +113,9 @@ FT_BEGIN_HEADER
* vocabulary from the TrueType specification, stem segments form a
* `black distance'.
*
+ * In the above ASCII drawing, the horizontal segments are BC, DE, and
+ * FG; the vertical segments are AB, CD, EF, and GH.
+ *
* Each segment has at most one `best' candidate to form a black
* distance, or no candidate at all. Notice that two distinct segments
* can have the same candidate, which frequently means a serif.
@@ -112,6 +129,11 @@ FT_BEGIN_HEADER
*
* 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.
+ *
*
* Serifs
*
@@ -119,7 +141,8 @@ FT_BEGIN_HEADER
*
* best segment_1 = segment_2 && best segment_2 != segment_1
*
- * where segment_1 corresponds to the serif segment.
+ * where segment_1 corresponds to the serif segment (CD and EF in the
+ * above ASCII drawing).
*
* The best candidate is stored in field `serif' in structure
* `AF_Segment' (and `link' is set to NULL).