summaryrefslogtreecommitdiff
path: root/src/w32dwrite.c
AgeCommit message (Collapse)Author
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-04-24; * src/w32dwrite.c: Minor coding style adjustments.Po Lu
2025-04-23; * src/w32dwrite.c (text_extents_internal): Fix typos in comments.Eli Zaretskii
2025-04-23w32: change the way text is measured when using DirectWriteCecilio Pardo
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)
2025-03-27w32: fail gracefully when using invalid glyphs on DWriteCecilio Pardo
* src/w32dwrite.c (text_extents_internal): Return false instead of crashing with bad glyph indexes. (Bug#77196)
2025-01-01Update copyright year to 2025Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2024-11-21; Fix typosStefan Kangas
2024-11-12Fix Cygw32 buildEli Zaretskii
* src/pdumper.c (dump_mm_heap_cb_release): Avoid NULL pointer dereference. * src/w32dwrite.c (INITGUID) [CYGWIN]: Don't define for Cygwin. * src/w32menu.c (w32_popup_dialog): Fix Cygw32 build. (Bug#74312)
2024-10-27; * src/w32dwrite.c (syms_of_w32dwrite): Init 'w32-inhibit-dwrite'.Eli Zaretskii
2024-10-27; Fix problem with DirectWrite (MS-Windows)Cecilio Pardo
Negative lbearings were not handled. * src/w32dwrite.c (w32_dwrite_draw): Modified to handle negative lbearing.
2024-10-26; Fix coding style of Uniscribe filesPo Lu
* src/w32dwrite.c (EMACS_DWRITE_UNUSED, IDWriteFontFaceVtbl) (IDWriteFontFace, IDWriteRenderingParamsVtbl) (IDWriteRenderingParams, IDWriteFontVtbl, IDWriteFont) (IDWriteBitmapRenderTargetVtbl, IDWriteBitmapRenderTarget) (IDWriteBitmapRenderTarget1, IDWriteGdiInteropVtbl) (IDWriteGdiInterop, IDWriteFactoryVtbl, IDWriteFactory) (IDWriteColorGlyphRunEnumeratorVtbl) (IDWriteColorGlyphRunEnumerator, IDWriteFactory2Vtbl) (IDWriteFactory2, get_font_face, text_extents_internal) (w32_initialize_direct_write, w32_dwrite_draw) (w32_use_direct_write): * src/w32font.c (w32font_text_extents, w32font_draw): * src/w32uniscribe.c (uniscribe_open): Correct coding style.
2024-10-25; * src/w32dwrite.c (Fw32_dwrite_reinit): Doc fix.Eli Zaretskii
2024-10-25; Minor fixes to last changesEli Zaretskii
* src/w32font.h: * src/w32font.c: * src/w32dwrite.c: * etc/NEWS: Minor fixes of last changes. (Bug#73730)
2024-10-25Implement drawing text with DirectWrite on MS-Windows.Cecilio Pardo
This adds support for color fonts. * configure.ac: Add src/w32drite to W32_OBJ. * src/w32dwrite.c: New file. (w32-initialize-direct-write): New function, initialize the DirectWrite library if it is available, and required global variables. (w32_use_direct_write): New function, check if DirectWrite is available and activated by the user. (w32_dwrite_encode_char): New function, replacement for HarfBuzz's 'encode_char'. (w32_dwrite_text_extents): New function, replacement for w32font text_extents. (w32_dwrite_draw): New function, replacement for w32font draw. (w32_dwrite_free_cached_face): New function, used in the font deletion process to also delete DirectWrite data. (verify_hr): New function, verify COM method results. (release_com): New function, release a COM object. (w32-dwrite-available): New function, returns true if DirectWrite is available. (w32-dwrite-reinit): New function, reinitialize DirectWrite, optionally setting some rendering parameters. * src/w32font.c (w32font_text_extents): If DirectWrite is enabled, call 'w32_dwrite_text_extents'. (w32font_draw): If DirectWrite is enabled, call 'w32_dwrite_draw'. * src/w32uniscribe.c: (w32hb_encode_char): If DirectWrite is enabled, call 'w32_dwrite_encode_char'. (syms_of_w32uniscribe_for_pdumper): Initialize DirectWrite. (uniscribe_close): Free DirectWrite data for the font. Bug#73730