Commit Graph

348 Commits

Author SHA1 Message Date
Nikolay Sivov df4aaff7a3 usp10: Use single path for all fonts in ScriptGetCMap().
Testing tmPitchAndFamily bitmask does not tell if font has mappings defined.
Besides that, GetGlyphIndices() handles bitmap system fonts exactly the same
way alternate path did.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46678
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 17:35:14 +01:00
Nikolay Sivov eda3a3e37d usp10: Remove extra parentheses.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-14 11:16:48 +01:00
Nikolay Sivov 8d018d8d1d usp10: Make sure metrics cache is used with glyph indices only.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44410
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-14 11:16:46 +01:00
Nikolay Sivov d1e618d31d usp10: Use glyph index consistently in ScriptGetGlyphABCWidth().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-14 11:16:45 +01:00
Henri Verbeet 7a5a63de99 usp10: Use heap_calloc() in _ItemizeInternal().
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-13 13:24:40 +01:00
Henri Verbeet 9140256ba8 usp10: Use heap_calloc() in requires_fallback().
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-09 10:40:40 -06:00
Henri Verbeet 15c47c16e0 usp10: Use heap_calloc() in ScriptStringAnalyse().
Note that this changes the allocation size of analysis->pItem. I believe that
change to be correct.

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-08 09:23:22 -06:00
Henri Verbeet 8d08ff3745 usp10: Use heap_calloc() in ScriptShapeOpenType().
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-08 09:23:15 -06:00
Henri Verbeet 315be161ce usp10: Use heap_calloc() in ScriptShape().
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-06 09:15:27 -06:00
Henri Verbeet 9be6ff403d usp10: Use heap_calloc() in ScriptPlace().
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-05 06:57:10 -06:00
Henri Verbeet 8889c86297 usp10: Use heap_calloc() in ScriptTextOut().
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-02 16:19:43 +01:00
Henri Verbeet d6fb80a110 usp10: Use heap_calloc() in ScriptLayout().
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-02 10:54:44 +01:00
Michael Stefaniuc 498bf04971 usp10: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
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-02-28 19:39:25 +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
Thomas Faber fb44feb62f usp10: Re-use script caches for the same font.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 18:44:11 +01:00
Andrey Gusev f6ad192cd2 usp10: Remove worthless check.
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-11-03 23:44:52 +01:00
Andrey Gusev a34adbefe4 usp10: Remove redundant comparison.
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-10-10 18:32:29 +02:00
Nikolay Sivov 3cbd598e81 usp10: Remove separate invalid flag from string analysis structure.
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-10-02 19:31:27 +02:00
Nikolay Sivov c5b41a45f9 usp10: Make string analysis size part of a main structure.
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-10-02 19:31:24 +02:00
Nikolay Sivov abf71afdff usp10: Store per-item ABC structure directly.
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-10-02 19:31:21 +02:00
Nikolay Sivov 40bc04ae61 usp10: Return whole SCRIPT_FONTPROPERTIES structure.
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-10-02 19:31:16 +02:00
Huw Davies 866eec810e usp10: Undefined characters above the BMP should be assigned to Script_Surrogates.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-16 22:30:24 +09:00
Tim Worthington 4f96439ebf user32: Fix rendering of tabs in edit control.
Signed-off-by: Tim Worthington <tim@pcbelegance.org>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:31 +02:00
Nikolay Sivov 04e5466e12 usp10: Handle invalid arguments in ScriptIsComplex().
Signed-off-by: Nikolay Sivov <nsivov@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-04-03 19:34:27 +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 a204e589b5 usp10: Avoid LPWSTR.
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:48 +01:00
Henri Verbeet cdd47c3dc3 usp10: Avoid LPCWSTR.
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:42 +01:00
Henri Verbeet af617aacca usp10: Avoid LPBYTE.
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:40 +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 3c704c2c16 usp10: Use bsearch() to lookup the script range in get_char_script().
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-08 15:31:05 +01:00
Henri Verbeet a523b46d0b usp10: Introduce an enumeration for script 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-03-08 15:31:03 +01:00
Francois Gouget 1a42ee3198 usp10: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
And standardize their type names.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 14:04:18 +01:00
Henri Verbeet 4b22953ec5 usp10: Properly get glyph widths for OpenType fonts in ScriptPlaceOpenType().
I.e., don't use GetCharWidth32W() with glyph indices. This fixes glyph
advances for OpenType fonts in wordpad.

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:34 +01:00
Henri Verbeet d00f7315e0 usp10: Itemise ZWSP like ZWNJ and ZWJ.
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-15 22:58:48 +01:00
Henri Verbeet 721fbf617b usp10: Explicitly check for zero-width control characters in ScriptShapeOpenType().
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-15 22:58:48 +01:00
Huw Davies 0dbd2e37f9 usp10: Free the final page.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 00:36:45 +09:00
Nikolay Sivov 0695368406 usp10: Better implementation for ScriptGetLogicalWidths().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-09 23:56:11 +09:00
Henri Verbeet 5098bddf90 usp10: Replace zero-width glyphs with 0x20 when psa->fNoGlyphIndex is set in ScriptShapeOpenType().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 01:03:19 +09:00
Henri Verbeet 9f5389de15 usp10: Replace more control characters with blanks.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 01:03:17 +09:00
Henri Verbeet 68830f12e7 usp10: Don't replace control characters with blanks when psa->fNoGlyphIndex is set.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 01:03:11 +09:00
Henri Verbeet d73f2b02b0 usp10: Don't modify psa->fNoGlyphIndex in ScriptShapeOpenType().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 01:03:09 +09:00
Henri Verbeet acf2d54fb3 usp10: Set fZeroWidth when replacing control characters with blanks.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 01:03:06 +09:00
Henri Verbeet 21586466ac usp10: Set the base embedding level for Script_Arabic_Numeric to 2.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:06:54 +09:00
Henri Verbeet 2ce0f7e4a3 usp10: Arabic numerals are written left-to-right.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:06:52 +09:00
Henri Verbeet 4be7accf2a usp10: Handle C2_ARABICNUMBER as numeric.
I.e., make sure ٬ and ٫ get classified as Script_Arabic_Numeric.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:06:48 +09:00
Henri Verbeet e54bee4415 usp10: Properly check for numeric scripts.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-07 22:04:49 +09:00
Henri Verbeet ae1c02a27f usp10: Set the base embedding level for Script_Persian to 2.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-07 22:04:49 +09:00
Henri Verbeet 8b114ddaf6 usp10: Persian numerals are written left-to-right.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-07 22:04:48 +09:00
Henri Verbeet e49ad1cc5b usp10: Fix the script tag and fallback font for Script_Persian.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-07 22:04:48 +09:00
Francois Gouget 65893a7142 usp10: Punctuation fixes.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-31 11:30:54 +09:00