Commit graph

1336 commits

Author SHA1 Message Date
Jacek Caban e4ee1ffeb9 dwrite: Explicitly cast DWRITE_FONT_STRETCH to float in init_font_prop_vec. 2023-12-11 23:11:19 +01:00
Alexandre Julliard b70154a549 dwrite: Remove DECLSPEC_HIDDEN usage. 2023-11-28 22:58:42 +01:00
Alexandre Julliard acad49573a makefiles: Always use the global SOURCES variable for .c files. 2023-11-01 22:44:03 +01:00
Alex Henrie a23d21a902 dwrite: Use the debugstr_fourcc function instead of reimplementing it. 2023-10-17 20:20:47 +02:00
Jacek Caban 75635053fc dwrite: Avoid implicit casts between DWRITE_RENDERING_MODE and DWRITE_RENDERING_MODE1. 2023-10-17 18:18:21 +02:00
Jacek Caban 1ba498c5e6 dwrite/tests: Avoid implicit DWRITE_RENDERING_MODE to DWRITE_RENDERING_MODE1 casts. 2023-10-17 18:18:21 +02:00
Jacek Caban 2c98df50cb dwrite: Use DWRITE_FONT_FEATURE_TAG for tags argument type in shape_get_typographic_features. 2023-10-17 18:18:21 +02:00
Alexandre Julliard c047bb6ea3 makefiles: Always use the global SOURCES variable for .sfd files. 2023-10-12 10:59:29 +02:00
Alexandre Julliard c547659586 nls: Update character tables to Unicode 15.1.0. 2023-09-30 13:23:19 +02:00
Brendan Shanks e8ea81cf7a dwrite: Ensure unixlib function tables and enum stay in sync. 2023-09-14 11:12:36 +02:00
Jeff Smith c93cfb4aad dwrite: Treat null character as NO_VISUAL in script analyzer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55529
2023-09-08 22:00:25 +02:00
Alexandre Julliard f078d5b4f9 gdi32: Fix buffer size parameter in GetFontFileData for 64-bit. 2023-09-01 18:06:02 +02:00
Alexandre Julliard 20afe43832 Remove unused NONAMELESS defines. 2023-08-15 18:56:45 +02:00
Jacek Caban a5f62b3ef7 make_unicode: Don't use DECLSPEC_HIDDEN. 2023-06-26 20:19:13 +02:00
Zhiyi Zhang f2df5a6c5d dwrite: Use cache when font transform matrix contains only translation offsets.
Word 2016 queries a lot of font glyph bounding boxes and bitmaps with translation matrices. The
result of these queries is not cached because the transform matrix is not the identity matrix.
However, the translation offsets don't affect FreeType font operations at all, which can be
verified in ft_matrix_from_dwrite_matrix() called by get_glyph_transform(). So these results with
translation matrices can be cached as well. With this patch, Word 2016 stuttering is reduced
significantly.
2023-03-31 19:00:30 +02:00
Philip Gruebele 7eb1ac5143 dwrite: Pass correct font key when adding glyph to cache.
Without this fix, the font cache was filling up with lots of duplicate entries,
and getting cache misses, thereby causing font-intensive applications
to be very slow (e.g. AvalonEdit).
This fix provides 30x speed increase when processing glyphs.
2023-03-01 21:39:30 +01:00
Fabian Maurer 2d6fdf7c8e dwrite/tests: Prevent "misleading indentation" warnings.
Happens on gcc 12.2.0

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
2023-02-02 18:08:39 +01:00
Rémi Bernon 17ac4059a5 dwrite: Statically init the system_fallback locale list.
To avoid a crash on DLL unload if it wasn't initialized.
2023-01-24 20:06:18 +01:00
Alex Henrie 08643dc4d5 dwrite: Handle memory allocation failure in bidi_compute_bracket_pairs (cppcheck). 2023-01-24 18:26:15 +01:00
Alexandre Julliard 5392bd303e dwrite: Use the Unix call helpers. 2022-11-25 10:11:36 +01:00
Rémi Bernon 0908161bbd dwrite: Avoid memcpy source overflow in GetFontAxisValues. 2022-11-21 12:58:31 +01:00
Nikolay Sivov e5bfd522d2 dwrite/tests: Use existing to create factory instance. 2022-10-18 23:52:30 +02:00
Alexandre Julliard 7ab46c4f21 unicode: Update to Unicode 15.0.0. 2022-09-14 22:38:34 +02:00
Nikolay Sivov 47b2750309 dwrite/layout: Limit text window passed to MapCharacters() to the range of characters to map.
Fallback instance does not get access to layout contents outside of given range. This could
be observed with a custom fallback.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-13 22:07:22 +02:00
Nikolay Sivov 31ab7f87db dwrite/layout: Constify some internal helpers arguments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-13 22:07:22 +02:00
Nikolay Sivov b783100773 dwrite/layout: Use already resolved or last resort fonts when setting dummy line metrics.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-13 22:07:22 +02:00
Nikolay Sivov 8d2bca638d dwrite/layout: Keep system font collection for each layout.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-13 22:07:22 +02:00
Nikolay Sivov a10ae49292 dwrite/layout: Use same logic for mapping both non-visual and visual runs.
Both non-visual and visual runs go through fallback mapping process, and
could end up with hard coded default at the end if fallback was insufficient.

Visual runs are using custom fallback and then the system one, non-visual ones
are using only system fallback.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-12 17:28:32 +02:00
Nikolay Sivov c8592b97e3 dwrite: Set initial justification value for default shaper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-09 23:21:40 +02:00
Nikolay Sivov a23b1dbf39 dwrite/tests: Add some tests for glyph justification values.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-08 18:42:12 +02:00
Nikolay Sivov 28efff3855 dwrite: Handle higher planes characters in line breaking logic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-06 21:40:39 +02:00
Nikolay Sivov 4a7a979e79 dwrite/bidi: Prepare for characters above BMP.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-06 21:40:39 +02:00
Nikolay Sivov d8584a16ed dwrite: Handle higher planes when setting DWRITE_SCRIPT_SHAPES_NO_VISUAL.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-06 21:40:39 +02:00
Alexandre Julliard aeff5099fb unicode: Add data for high Unicode planes to the Arabic shaping table. 2022-09-05 18:41:47 +02:00
Alexandre Julliard 24da06789e unicode: Add data for high Unicode planes to the bidi direction table. 2022-09-05 18:41:47 +02:00
Alexandre Julliard ba58338b21 unicode: Add data for high Unicode planes to the linebreak table. 2022-09-05 18:41:47 +02:00
Alexandre Julliard c848f42aa0 unicode: Add data for high Unicode planes to the scripts table. 2022-09-05 18:41:47 +02:00
Nikolay Sivov eddf252aff dwrite: Fix spans length reported by AnalyzeScript() for characters above BMP.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-02 22:10:21 +02:00
Nikolay Sivov 5d9f0be001 dwrite: Handle variation selectors 17-256 in MapCharacters().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-01 17:42:49 +02:00
Nikolay Sivov 8e1278684a dwrite: Add NNBSP (202F) to Mongolian fallback range.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-31 21:52:25 +02:00
Nikolay Sivov 55439cc3ef dwrite: Skip variation selectors in MapCharacters().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-31 21:52:25 +02:00
Nikolay Sivov 857ec56f45 dwrite/fallback: Add Georgian and Armenian ranges.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-11 16:51:00 +02:00
Nikolay Sivov 1795fd7af9 dwrite/fallback: Fill in some more fallback ranges for various scripts.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-10 14:07:35 +02:00
Nikolay Sivov 5b46a8a065 dwrite/fallback: Add mappings for some CJK ranges.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-09 15:53:32 +02:00
Nikolay Sivov 2879930172 dwrite/tests: Add a helper to create analyzer instance.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-09 15:53:32 +02:00
Nikolay Sivov 1bff5e5859 dwrite/fallback: Make sure all consecutively mapped characters belong to the same mapping.
Picked fallback font often has wider character support than the ranges it's configured for.
Desired behavior is to stop at the first character that doesn't belong to current mapping.
For example, in texts like "abc<some CJK sequence>abc" we'd want the same for both "abc" sequences,
as opposed to using fallback CJK font for trailing Latin range.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-08 18:51:25 +02:00
Nikolay Sivov e25ff734cf dwrite/fallback: Consider character size for returned mapped length.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-08 18:51:23 +02:00
Nikolay Sivov c4c3e9fee4 dwrite: Add ff00-ffef range to the fallback configuration.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-05 20:13:33 +02:00
Nikolay Sivov 2dd903885b dwrite: Fix stretch value validation in CreateTextFormat().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-03 15:09:02 +02:00
Nikolay Sivov f6f2a1a3e5 dwrite: Fix fallback config ranges text parsing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-29 18:55:38 +02:00