Commit Graph

195 Commits

Author SHA1 Message Date
Nikolay Sivov f5e342b2a6 dwrite: Simplify ligature substitution handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:28:02 +02:00
Nikolay Sivov 5909ab5303 dwrite: Simplify alternate substitution handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:28:00 +02:00
Nikolay Sivov 78ea46f6a9 dwrite: Simplify multiple substitution handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:27:58 +02:00
Nikolay Sivov a13469374f dwrite: Simplify single substitution handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:27:56 +02:00
Nikolay Sivov 122cac563d dwrite: Use mark array helper in mark to mark attachment handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Nikolay Sivov 81d8a0980b dwrite: Use mark array helper in mark to base attachment handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Nikolay Sivov 240305660a dwrite: Implement mark to ligature attachment (GPOS lookup 5).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Nikolay Sivov c928c1cbd8 dwrite: Use single table pointer in GPOS handlers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Nikolay Sivov 51d4e5c134 dwrite: Remove some unused types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Nikolay Sivov b2d9d552c0 dwrite: Keep current lookup feature mask in context.
Lookups referenced from context-based lookups need to have access to
original feature mask, set it once instead of propagating it on every
recursive call. It's used for input matching and parametrized cases
like alternate substitutions.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:26 +02:00
Jacek Caban ce4083eccc dwrite: Use BitScanReverse instead of dwrite_log2i.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:52:38 +02:00
Jacek Caban f5e67202cc dwrite: Use BitScanForward instead of dwrite_ctz.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:52:28 +02:00
Nikolay Sivov 292dff589e dwrite: Implement ligature substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:51:19 +02:00
Nikolay Sivov cd9f374879 dwrite: Normalize glyph data before passing it to matching function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:51:18 +02:00
Nikolay Sivov a6c0eab6de dwrite: Set initial canBreakShapingAfter flags.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:51:18 +02:00
Nikolay Sivov f7fc249e8f dwrite: Update clustermap once after all features have been applied.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 15:51:18 +02:00
Nikolay Sivov 796f34e81f dwrite: Share same cluster for bases and following diacritics in initial map.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:38:49 +02:00
Nikolay Sivov 03fe6c64bc dwrite: Implement GetVerticalGlyphVariants().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:38:49 +02:00
Nikolay Sivov f48ecfc83e dwrite: Return ranges for selected cmap.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:38:49 +02:00
Nikolay Sivov a767467d2e dwrite: Get rid of cmap cache.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Nikolay Sivov 745452ee94 dwrite: Do not require fontface object for HasCharacter().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Nikolay Sivov fb5eec2c1e dwrite: Disallow recursing to reverse chaining substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Nikolay Sivov 3c415128f1 dwrite: Limit recursion level for context lookups.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Nikolay Sivov 8a52d3e7d9 dwrite: Implement contextual positional lookups.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 21:01:33 +02:00
Nikolay Sivov 102272a4a9 dwrite: Unify context lookup helpers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 21:01:33 +02:00
Nikolay Sivov b4b33e13d2 dwrite: Implement CheckTypographicFeature().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 21:01:33 +02:00
Nikolay Sivov b60796bd73 dwrite: Sort feature tags returned from GetTypographicFeatures().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 21:01:32 +02:00
Nikolay Sivov 384067bda6 dwrite: Use correct glyph array offset for alternate substitution table output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Nikolay Sivov e89aa70555 dwrite: Fix global feature mask to match its shift.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Nikolay Sivov 4f7f3b7b8b dwrite: Enable lookups from non-global features too.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 12:37:28 +02:00
Nikolay Sivov 15baea930a dwrite: Include required feature when collecting lookups.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 12:37:28 +02:00
Nikolay Sivov aa222d7df8 dwrite: Use lookup fitering for context matching.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 12:37:28 +02:00
Nikolay Sivov f2db3b58d6 dwrite: Implement reverse chain contextual substitution (GSUB lookup 8).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 12:37:28 +02:00
Nikolay Sivov 3e59649c9e dwrite: Add main loop variant for reverse substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Nikolay Sivov db6c4156af dwrite: Fix offsets when stepping through chain rule fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Nikolay Sivov e7324209e0 dwrite: Implement contextual subsitution (GSUB lookup 5).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Nikolay Sivov d5cca52750 dwrite: Fix lookup collection when no suitable script was found.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Nikolay Sivov d1ae4a5647 dwrite: Implement chaining contextual substitution of format 2.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov 7e798dae37 dwrite: Implement chaining contextual substitution of format 1.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov a1d1647131 dwrite: Use iterator matching for chain substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov 4d23336882 dwrite: Add matching callback support for iterators.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov 5c9129723c dwrite: Implement mark glyph filtering.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov 2e79405eec dwrite: Simplify glyph properties helpers by using current glyph buffer.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Nikolay Sivov 9479f87b8a dwrite: Add stub handler for ligature substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Nikolay Sivov 2e4d71c721 dwrite: Update glyph component count on multiple substitution.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Nikolay Sivov 9f31bf0e1c dwrite: Implement multiple substitution (GSUB lookup 2).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Nikolay Sivov 684dd31cc2 dwrite: Use GPOS handlers for subtables, not whole lookups.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:31 +02:00
Nikolay Sivov cd8cdc7893 dwrite: Mark some of default ignorables as ZWS.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 10:22:56 +02:00
Nikolay Sivov 47272be6aa dwrite: Use cluster map to apply use feature ranges.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 10:20:58 +02:00
Nikolay Sivov d5058fb304 dwrite: Implement alternate substitution (GSUB lookup 3).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 10:20:54 +02:00