aboutsummaryrefslogtreecommitdiffstats
path: root/src/sfnt.h
diff options
context:
space:
mode:
authorPo Lu2023-12-29 14:58:19 +0800
committerPo Lu2023-12-29 14:58:41 +0800
commitea3d211f3f7ecc5b59d5affc1aed812a2ded62b0 (patch)
treebd83822c8a517b4ed6aca9e84cfd3d2e7486d9c3 /src/sfnt.h
parent714942b1c3767ee6c70a5644d6a4460dedbe4422 (diff)
downloademacs-ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0.tar.gz
emacs-ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0.zip
Obey USE_MY_METRICS in compound glyphs
* src/sfnt.c (struct sfnt_compound_glyph_context): New fields holding the positions of both phantom points. (sfnt_decompose_compound_glyph): New argument METRICS_RETURN; return the metrics of components with USE_MY_METRICS within this field. (sfnt_decompose_glyph): New argument METRICS_RETURN, which serves the same purpose. (sfnt_build_glyph_outline): Apply glyph advance and origin distortion to METRICS, and return the metrics as altered by compound glyphs in there. (sfnt_lookup_glyph_metrics): Trim away two unused parameters, PIXEL_SIZE and HEAD, whose functionality has been superseeded by sfnt_scale_metrics and the implicit scaling the interpreter performs. (sfnt_interpret_compound_glyph_2): Save phantom points within fields provided to that end in CONTEXT. (sfnt_interpret_compound_glyph_1): Save and source phantom points for each glyph to and from the context. (sfnt_test_get_metrics, main): Adjust tests correspondingly. * src/sfnt.h: Update prototypes. * src/sfntfont.c (sfntfont_get_metrics): Remove obsolete parameters. (sfntfont_get_glyph_outline): Don't change temp by the metrics distortions, which is now the task of sfnt_decompose_glyph.
Diffstat (limited to 'src/sfnt.h')
-rw-r--r--src/sfnt.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sfnt.h b/src/sfnt.h
index 576d287e8e6..8f6d6bf427b 100644
--- a/src/sfnt.h
+++ b/src/sfnt.h
@@ -1524,11 +1524,10 @@ extern struct sfnt_raster *sfnt_raster_glyph_outline_exact (PROTOTYPE);
1524extern struct sfnt_hmtx_table *sfnt_read_hmtx_table (PROTOTYPE); 1524extern struct sfnt_hmtx_table *sfnt_read_hmtx_table (PROTOTYPE);
1525#undef PROTOTYPE 1525#undef PROTOTYPE
1526 1526
1527extern int sfnt_lookup_glyph_metrics (sfnt_glyph, int, 1527extern int sfnt_lookup_glyph_metrics (sfnt_glyph,
1528 struct sfnt_glyph_metrics *, 1528 struct sfnt_glyph_metrics *,
1529 struct sfnt_hmtx_table *, 1529 struct sfnt_hmtx_table *,
1530 struct sfnt_hhea_table *, 1530 struct sfnt_hhea_table *,
1531 struct sfnt_head_table *,
1532 struct sfnt_maxp_table *); 1531 struct sfnt_maxp_table *);
1533 1532
1534extern void sfnt_scale_metrics (struct sfnt_glyph_metrics *, 1533extern void sfnt_scale_metrics (struct sfnt_glyph_metrics *,