]> git.eshelyaron.com Git - emacs.git/commit
w32: change the way text is measured when using DirectWrite
authorCecilio Pardo <cpardo@imayhem.com>
Sat, 19 Apr 2025 20:46:38 +0000 (22:46 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Apr 2025 19:34:03 +0000 (21:34 +0200)
commite39e6df8c6552191c53c64582c2dbac0bcb92f24
tree498c7e2f46e19c7e445bbf61e0687655c7a330f1
parentb1f7ab8436f3d77f67d1744b2cdd26e4e10ee27b
w32: change the way text is measured when using DirectWrite

Now the glyph outline is inspected directly to get its real size,
as the direct measuring functions give generic values for some
fonts.
* src/w32dwrite.c (data structures): Added data structures from
header files that are not present in the 32bit MinGW build
environment.
(text_extents_internal): Call GetGlyphRunOutline to get exact
glyph vertical bounds.  Add new parameter to make this optional
if case that information is not required.
(w32_dwrite_text_extents, w32_initialize_direct_write)
(w32_dwrite_draw): New parameter for 'text_extents_internal'.
(Bug#77171)

(cherry picked from commit 05480592898a2a33e7e683280456ada0d663bfd4)
src/w32dwrite.c