]> git.eshelyaron.com Git - emacs.git/commit
Refactor sfntfont.c
authorPo Lu <luangruo@yahoo.com>
Mon, 27 Mar 2023 03:24:05 +0000 (11:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 27 Mar 2023 03:24:05 +0000 (11:24 +0800)
commit18b34e9ca01deff8e0bde4b1e53293f27712a149
tree4e80d1cbf5f6211f03c834425f88bc9657fdfb71
parent67a325243c6942ff367b24211999554690c328d2
Refactor sfntfont.c

* src/sfnt.c (sfnt_build_glyph_outline): Take scale, not head
and pixel size.
(sfnt_scale_metrics_to_pixel_size): Delete function.
(sfnt_get_scale): New function.
(main): Update tests.
* src/sfnt.h (PROTOTYPE): Update prototypes.
* src/sfntfont.c (struct sfnt_outline_cache)
(sfntfont_get_glyph_outline, struct sfnt_font_info)
(sfntfont_open): Save scale in font information and use it.
(sfntfont_measure_instructed_pcm): Delete function.
(sfntfont_measure_pcm): Make this the only ``measure pcm''
function.
(sfntfont_draw): Rely on sfntfont_get_glyph_outline for the
scale.
src/sfnt.c
src/sfnt.h
src/sfntfont.c