summaryrefslogtreecommitdiff
path: root/src/autofit/afcjk.c
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2023-02-20 23:29:58 -0500
committerAlexei Podtelezhnikov <apodtele@gmail.com>2023-02-20 23:29:58 -0500
commit7f9499044e3baa901de99251a007aa66e750b26c (patch)
treec5bff2c1708cc544873eae180caf223d0fbdf9bd /src/autofit/afcjk.c
parent78464d1b0ce056bb35ff6f987657030a09c3d6ee (diff)
downloadfreetype2-7f9499044e3baa901de99251a007aa66e750b26c.tar.gz
[autofit] Clean up contour indexing.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Refactor. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Ditto.
Diffstat (limited to 'src/autofit/afcjk.c')
-rw-r--r--src/autofit/afcjk.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 5daefff35..7734d4e77 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -417,16 +417,14 @@
{
FT_Int nn;
- FT_Int first = 0;
- FT_Int last = -1;
+ FT_Int pp, first, last;
- for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )
+ last = -1;
+ for ( nn = 0; nn < outline.n_contours; nn++ )
{
- FT_Int pp;
-
-
- last = outline.contours[nn];
+ first = last + 1;
+ last = outline.contours[nn];
/* Avoid single-point contours since they are never rasterized. */
/* In some fonts, they correspond to mark attachment points */