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
Nikolay Sivov
9ff62cb30a
dwrite: Add Arabic fallback ranges.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-27 23:07:06 +02:00
Nikolay Sivov
b32acacb4f
dwrite: Add a few more fallback ranges.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-25 22:47:47 +02:00
Nikolay Sivov
5259c1a1dc
dwrite: Use correct ranges to set DWRITE_SCRIPT_SHAPES_NO_VISUAL.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-25 22:47:47 +02:00
Nikolay Sivov
dcb8094a37
dwrite: Use u32-reads for AnalyzeScript().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-25 22:47:47 +02:00
Nikolay Sivov
d8fa0ff148
dwrite: Add some mappings for Tahoma in the system fallback.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:10 +02:00
Nikolay Sivov
26e717c565
dwrite: Remove old system fallback logic.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:10 +02:00
Nikolay Sivov
d37eb0f144
dwrite: Implement MapCharacters() for custom fallback.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:09 +02:00
Nikolay Sivov
d800cd7437
dwrite: Extend matching font creation helper.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:09 +02:00
Nikolay Sivov
fcbb0f6c61
dwrite: Duplicate mapping data when creating fallback object.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:09 +02:00
Nikolay Sivov
f2ad1d8b93
dwrite: Override existing ranges with AddMapping().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:09 +02:00
Nikolay Sivov
76e675a011
dwrite: Keep locales separate for fallback data.
...
Each locale entry contains a "list" of its mappings.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:08 +02:00
Nikolay Sivov
78846236b9
dwrite: Filter out unusable ranges on AddMapping().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:08 +02:00
Nikolay Sivov
1cf2ac20c8
dwrite: Add additional structure for mappings array.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:08 +02:00
Nikolay Sivov
c4af69e0b7
dwrite: Use older interface version for fallback system collection.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 17:54:07 +02:00
Alexandre Julliard
194e09baec
makefiles: Add separate variables for Unix flags and libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00