]> git.eshelyaron.com Git - emacs.git/commit
Consistently round glyph advances in the SFNT font backend
authorPo Lu <luangruo@yahoo.com>
Tue, 26 Dec 2023 06:07:58 +0000 (14:07 +0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 26 Dec 2023 07:07:52 +0000 (08:07 +0100)
commita67838fae12ac3c74f63d9ad463e3c1947320d6b
tree218dc25fe9757aa1db143e6f3e4081e105e3893d
parent38a5f78a6384cf92bf8034fafc7047917a96f60f
Consistently round glyph advances in the SFNT font backend

* src/sfnt.h (SFNT_ROUND_FIXED): New macro.

* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed.  Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.

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