Commit Graph

103 Commits

Author SHA1 Message Date
Alexandre Julliard 8355a20189 usp10: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:36:46 +02:00
Henri Verbeet e9f6a94b94 usp10: Use heap_calloc() in usp10_language_add_feature_list().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 14:03:02 +01:00
Henri Verbeet 0fe041305e usp10: Use usp10_array_reserve() in usp10_language_add_feature_list().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 18:15:01 +01:00
Henri Verbeet e626524e3b usp10: Merge GSUB_initialize_language_cache() and GPOS_expand_language_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 20:37:49 +01:00
Henri Verbeet 489174a9fb usp10: Simplify GPOS_expand_language_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 20:37:45 +01:00
Henri Verbeet cc131ec07e usp10: Use usp10_array_reserve() in GSUB_initialize_language_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 23:53:53 +01:00
Henri Verbeet 66decba0e9 usp10: Merge GSUB_initialize_script_cache() and GPOS_expand_script_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 23:53:49 +01:00
Henri Verbeet c2a876c041 usp10: Simplify GPOS_expand_script_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-16 01:00:08 +01:00
Henri Verbeet 01abc2f8d2 usp10: Use usp10_array_reserve() in GSUB_initialize_script_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-14 15:28:05 +01:00
Michael Stefaniuc b21eb6733f usp10: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 14:28:10 +01:00
Andrey Gusev acdbea2bee usp10: Fix a typo in an ERR() message.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-15 10:48:21 +01:00
Henri Verbeet 30e8768d00 usp10: Validate substition record sequence indices in GSUB_apply_ContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 13:58:13 +02:00
Henri Verbeet ebe75cb66c usp10: Simplify the "sr_2" assignments in GSUB_apply_ContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 13:58:12 +02:00
Henri Verbeet 6c13170b95 usp10: Range check glyph counts in GSUB_apply_ContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 13:58:12 +02:00
Henri Verbeet c5619beb77 usp10: Validate positioning record sequence indices in GPOS_apply_ContextPos().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:19 +02:00
Henri Verbeet 82d36ba63f usp10: Simplify the "pr_2" assignment in GPOS_apply_ContextPos().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:17 +02:00
Henri Verbeet 1b02c1ac50 usp10: Range check glyph counts in GPOS_apply_ContextPos().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:15 +02:00
Henri Verbeet d1ca880ec4 usp10: Validate substition record sequence indices in GSUB_apply_ChainContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:14 +02:00
Henri Verbeet 34a9400a89 usp10: Validate positioning record sequence indices in GPOS_apply_ChainContextPos().
The issue is somewhat theoretical, since in reasonbale fonts the indices
should always be valid, and in fact are fairly likely to be 0. On the other
hand, web fonts exist.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:10 +02:00
Henri Verbeet 9694aeb06d usp10: Avoid special handling if the substitution count is 0 in GSUB_apply_ChainContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:34 +02:00
Henri Verbeet f7b943edbc usp10: Range check glyph counts in GSUB_apply_ChainContextSubst().
Like in GPOS_apply_ChainContextPos().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:32 +02:00
Henri Verbeet 24943fe5e2 usp10: Simplify the chaining context table assignments in GSUB_apply_ChainContextSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:30 +02:00
Henri Verbeet 02316e6613 usp10: Rename the chaining context tables in GSUB_apply_ChainContextSubst() to something more descriptive.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:28 +02:00
Henri Verbeet 0389768568 usp10: Return early if the number of positioning operations is 0 in GPOS_apply_ChainContextPos().
This preserves the current logic, but I wonder if we're not supposed to always
return "input_count". Returning 1 seems questionable if we matched more input
glyphs than that, and so does including the lookahead count.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:39:54 +02:00
Henri Verbeet 7dfe9b9c94 usp10: Range check glyph counts in GPOS_apply_ChainContextPos().
I.e., avoid accessing outside the "glyphs" array. If we're particularly
unlucky we may actually get a match against data outside the array.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:39:54 +02:00
Henri Verbeet f6c0146499 usp10: Simplify the chaining context table assignments in GPOS_apply_ChainContextPos().
And avoid some endian conversions in the process.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:39:54 +02:00
Henri Verbeet fb3ea0ae05 usp10: Rename the chaining context tables in GPOS_apply_ChainContextPos() to something more descriptive.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:39:54 +02:00
Jacek Caban 4553871614 usp10: Check if corresponding headers are present before accessing their feature lists in _initialize_feature_cache.
Based on feedback from Henri, fixes regression from commit
63bcfa3354.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 17:08:08 +02:00
Henri Verbeet 63bcfa3354 usp10: Get rid of the code duplication between GSUB_initialize_feature_cache() and GPOS_expand_feature_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 16:04:13 +02:00
Henri Verbeet 9b0f3f1bac usp10: Get rid of some code duplication in GPOS_expand_feature_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 16:04:13 +02:00
Henri Verbeet 0ffd5b45ea usp10: Double the languages array size when growing it in GPOS_expand_language_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 16:04:13 +02:00
Henri Verbeet 218be443b6 usp10: Double the scripts array size when growing it in GPOS_expand_script_cache().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 16:03:16 +02:00
Henri Verbeet 9a15753d40 usp10: Introduce a helper function to lookup a language in a LoadedScript structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 14:33:57 +02:00
Henri Verbeet 2a0ffc9852 usp10: Introduce a helper function to lookup a script in the script cache.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 12:44:54 +01:00
Henri Verbeet 1403087954 usp10: Avoid LPCVOID.
And cleanup a few style issues along the way.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 12:44:50 +01:00
Henri Verbeet 34c2f74518 usp10: Avoid LPWORD.
And cleanup a style issue along the way.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 15:13:38 +01:00
Henri Verbeet ab8ec605b8 usp10: Avoid LPPOINT.
And cleanup some style issues along the way.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 15:13:35 +01:00
Henri Verbeet ba66b626eb usp10: Avoid LPOUTLINETEXTMETRICW.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-20 13:22:45 +01:00
Henri Verbeet c8f87ad3ed usp10: Make the script cache parameter to GPOS_apply_MarkToBase() const.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-20 13:22:41 +01:00
Henri Verbeet cd9db34e51 usp10: Pass const metrics to GPOS_convert_design_units_to_device().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-20 13:22:40 +01:00
Henri Verbeet 6a0e5bb79d usp10: Use heap_alloc() instead of HeapAlloc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-10 23:21:26 +01:00
Henri Verbeet 77e5a2fba9 usp10: Use heap_alloc_zero() instead of HeapAlloc() with HEAP_ZERO_MEMORY.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-10 23:21:26 +01:00
Henri Verbeet bab506e1cd usp10: Use memmove() in GSUB_apply_LigatureSubst().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 15:56:56 +01:00
Nikolay Sivov 892393bb76 usp10: Filter out DeltaFormat == 0 too, valid range is [1, 3].
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 14:04:12 +01:00
Henri Verbeet 66dce1e75f usp10: Introduce an enumeration for GSUB lookup types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 14:04:06 +01:00
Nikolay Sivov fefd15118f usp10: Ignore device tables with invalid delta format.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:14:28 +01:00
Henri Verbeet 6fec9b1325 usp10: Return the logical offset in GPOS_apply_lookup().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:09:04 +01:00
Henri Verbeet 8d1566735f usp10: Return the logical offset in GPOS_apply_ChainContextPos().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:09:02 +01:00
Henri Verbeet 22101966cf usp10: Return the logical offset in GPOS_apply_ContextPos().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:09:00 +01:00
Henri Verbeet 6e84358bcd usp10: Return the logical offset in GPOS_apply_PairAdjustment().
The base index is redundant, and actually makes it harder to iterate in
logical order in GPOS_apply_feature().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:08:58 +01:00