From f764243cd9e2bfede9230ae01ba06e8704477c64 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 1 Oct 2014 11:38:14 +0200 Subject: [PATCH] Fix a typo and enable segment linking of one-point segments. --- lib/talatin.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/talatin.c b/lib/talatin.c index 359dd61..caa0ae1 100644 --- a/lib/talatin.c +++ b/lib/talatin.c @@ -1384,8 +1384,8 @@ ta_latin_hints_compute_segments(TA_GlyphHints hints, if (point->flags & TA_FLAG_CONTROL) segment->flags |= TA_EDGE_ROUND; - segment->min_coord = (FT_Short)min_pos; - segment->max_coord = (FT_Short)max_pos; + segment->min_coord = (FT_Short)point->v; + segment->max_coord = (FT_Short)point->v; segment->height = 0; on_edge = 0; @@ -1519,6 +1519,14 @@ ta_latin_hints_link_segments(TA_GlyphHints hints, /* compute maximum coordinate difference of the two segments */ /* (this is, how much they overlap) */ len = max - min; + + /* for one-point segments, `len' is zero if there is an overlap */ + /* (and negative otherwise); we have to correct this */ + if (len == 0 + && (seg1->min_coord == seg1->max_coord + || seg2->min_coord == seg2->max_coord)) + len = len_threshold; + if (len >= len_threshold) { /* -- 2.11.4.GIT