]> git.eshelyaron.com Git - emacs.git/commit
Obey USE_MY_METRICS in compound glyphs
authorPo Lu <luangruo@yahoo.com>
Fri, 29 Dec 2023 06:58:19 +0000 (14:58 +0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Jan 2024 07:22:25 +0000 (08:22 +0100)
commitc6bfbca0392eb08c305a0ebb1d61f362d074bafb
tree6eed5a2d90952271dcad20ec07f2a8ca1664e6ba
parent17eff74694482859ca854b23163265e29112202a
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.

(cherry picked from commit ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0)
src/sfnt.c
src/sfnt.h
src/sfntfont.c