winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
472 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite/shape: Fix iterator skipping logic on ignorable characters.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 23a2213e27058c36c8b015bd353012e0699c3ee3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23a2213e27058c36c8b015bd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:23 2021 +0300 dwrite/shape: Fix iterator skipping logic on ignorable characters. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 82 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 9 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 7d89851bbaa..ae9a88a876c 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -483,6 +483,8 @@ enum glyph_prop_flags GLYPH_PROP_MARK = LOOKUP_FLAG_IGNORE_MARKS, GLYPH_PROP_ZWNJ = 0x10, GLYPH_PROP_ZWJ = 0x20, + GLYPH_PROP_IGNORABLE = 0x40, + GLYPH_PROP_HIDDEN = 0x80, }; enum gpos_lookup_type @@ -3691,12 +3693,17 @@ static BOOL lookup_is_glyph_match(const struct scriptshaping_context *context, u static enum iterator_match glyph_iterator_may_skip(const struct glyph_iterator *iter) { + unsigned int glyph_props = iter->context->glyph_infos[iter->pos].props & (GLYPH_PROP_IGNORABLE | GLYPH_PROP_HIDDEN); + if (!lookup_is_glyph_match(iter->context, iter->pos, iter->flags)) return ITER_YES; - if ((iter->ignore_zwnj || !(iter->context->glyph_infos[iter->pos].props & GLYPH_PROP_ZWNJ)) && + if (glyph_props == GLYPH_PROP_IGNORABLE && !iter->context->u.buffer.glyph_props[iter->pos].components && + (iter->ignore_zwnj || !(iter->context->glyph_infos[iter->pos].props & GLYPH_PROP_ZWNJ)) && (iter->ignore_zwj || !(iter->context->glyph_infos[iter->pos].props & GLYPH_PROP_ZWJ))) + { return ITER_MAYBE; + } return ITER_NO; } @@ -5687,17 +5694,63 @@ static unsigned int unicode_get_mirrored_char(unsigned int codepoint) } /* + * 034F # Mn COMBINING GRAPHEME JOINER + * 061C # Cf ARABIC LETTER MARK + * 180B..180D # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE + * 180E # Cf MONGOLIAN VOWEL SEPARATOR + * 200B..200F # Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK + * FEFF # Cf ZERO WIDTH NO-BREAK SPACE +*/ +static unsigned int opentype_is_zero_width(unsigned int codepoint) +{ + return codepoint == 0x34f || codepoint == 0x61c || codepoint == 0xfeff || + (codepoint >= 0x180b && codepoint <= 0x180e) || (codepoint >= 0x200b && codepoint <= 0x200f); +} + +/* + * 00AD # Cf SOFT HYPHEN * 034F # Mn COMBINING GRAPHEME JOINER * 061C # Cf ARABIC LETTER MARK + * 115F..1160 # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER + * 17B4..17B5 # Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA * 180B..180D # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE * 180E # Cf MONGOLIAN VOWEL SEPARATOR * 200B..200F # Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK + * 202A..202E # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE + * 2060..2064 # Cf [5] WORD JOINER..INVISIBLE PLUS + * 2065 # Cn <reserved-2065> + * 2066..206F # Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES + * 3164 # Lo HANGUL FILLER + * FE00..FE0F # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 * FEFF # Cf ZERO WIDTH NO-BREAK SPACE + * FFA0 # Lo HALFWIDTH HANGUL FILLER + * FFF0..FFF8 # Cn [9] <reserved-FFF0>..<reserved-FFF8> + * 1BCA0..1BCA3 # Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP + * 1D173..1D17A # Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE + * E0000 # Cn <reserved-E0000> + * E0001 # Cf LANGUAGE TAG + * E0002..E001F # Cn [30] <reserved-E0002>..<reserved-E001F> + * E0020..E007F # Cf [96] TAG SPACE..CANCEL TAG + * E0080..E00FF # Cn [128] <reserved-E0080>..<reserved-E00FF> + * E0100..E01EF # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 + * E01F0..E0FFF # Cn [3600] <reserved-E01F0>..<reserved-E0FFF> */ static unsigned int opentype_is_default_ignorable(unsigned int codepoint) { - return codepoint == 0x34f || codepoint == 0x61c || codepoint == 0xfeff || - (codepoint >= 0x180b && codepoint <= 0x180e) || (codepoint >= 0x200b && codepoint <= 0x200f); + if (codepoint < 0x80) return 0; + return codepoint == 0xad || + codepoint == 0x34f || + codepoint == 0x61c || + (codepoint >= 0x17b4 && codepoint <= 0x17b5) || + (codepoint >= 0x180b && codepoint <= 0x180e) || + (codepoint >= 0x200b && codepoint <= 0x200f) || + (codepoint >= 0x202a && codepoint <= 0x202e) || + (codepoint >= 0x2060 && codepoint <= 0x206f) || + (codepoint >= 0xfe00 && codepoint <= 0xfe0f) || + codepoint == 0xfeff || + (codepoint >= 0xfff0 && codepoint <= 0xfff8) || + (codepoint >= 0x1d173 && codepoint <= 0x1d17a) || + (codepoint >= 0xe0000 && codepoint <= 0xe0fff); } static unsigned int opentype_is_diacritic(unsigned int codepoint) @@ -5751,10 +5804,21 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c context->u.buffer.glyphs[g] = font->get_glyph(context->cache->context, codepoint); context->u.buffer.glyph_props[g].justification = SCRIPT_JUSTIFY_CHARACTER; opentype_set_subst_glyph_props(context, g); - if (codepoint == 0x200d) - context->glyph_infos[g].props |= GLYPH_PROP_ZWJ; - else if (codepoint == 0x200c) - context->glyph_infos[g].props |= GLYPH_PROP_ZWNJ; + if (opentype_is_default_ignorable(codepoint)) + { + context->glyph_infos[g].props |= GLYPH_PROP_IGNORABLE; + if (codepoint == 0x200d) + context->glyph_infos[g].props |= GLYPH_PROP_ZWJ; + else if (codepoint == 0x200c) + context->glyph_infos[g].props |= GLYPH_PROP_ZWNJ; + /* Mongolian FVSs, TAGs, COMBINING GRAPHEME JOINER */ + else if ((codepoint >= 0x180b && codepoint <= 0x180d) || + (codepoint >= 0xe0020 && codepoint <= 0xe007f) || + codepoint == 0x34f) + { + context->glyph_infos[g].props |= GLYPH_PROP_HIDDEN; + } + } /* Group diacritics with preceding base. Glyph class is ignored here. */ if (!g || !opentype_is_diacritic(codepoint)) @@ -5763,9 +5827,9 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c context->glyph_infos[g].start_text_idx = i; cluster_start_idx = g; } - - if (opentype_is_default_ignorable(codepoint)) + if (opentype_is_zero_width(codepoint)) context->u.buffer.glyph_props[g].isZeroWidthSpace = 1; + context->u.buffer.glyph_props[g].components = 1; context->glyph_count++;
1
0
0
0
Nikolay Sivov : dwrite/arabic: Set per-glyph mask.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 4ae8191ee9755c0bda1d2ac3341a08e3c2b0d9fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ae8191ee9755c0bda1d2ac3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:22 2021 +0300 dwrite/arabic: Set per-glyph mask. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 2 ++ dlls/dwrite/opentype.c | 6 ++++++ dlls/dwrite/shapers/arabic.c | 15 +++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 3f48c189a13..ac870fd215c 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -590,6 +590,8 @@ extern void shape_enable_feature(struct shaping_features *features, unsigned int unsigned int flags) DECLSPEC_HIDDEN; extern void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, unsigned int value) DECLSPEC_HIDDEN; +extern unsigned int shape_get_feature_1_mask(const struct shaping_features *features, + unsigned int tag) DECLSPEC_HIDDEN; extern void shape_start_next_stage(struct shaping_features *features, stage_func func) DECLSPEC_HIDDEN; struct scriptshaping_context diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 6fe85dd4991..7d89851bbaa 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4632,6 +4632,12 @@ static unsigned int shaping_features_get_mask(const struct shaping_features *fea return feature->mask; } +unsigned int shape_get_feature_1_mask(const struct shaping_features *features, unsigned int tag) +{ + unsigned int shift, mask = shaping_features_get_mask(features, tag, &shift); + return (1 << shift) & mask; +} + static void opentype_layout_get_glyph_range_for_text(struct scriptshaping_context *context, unsigned int start_char, unsigned int end_char, unsigned int *start_glyph, unsigned int *end_glyph) { diff --git a/dlls/dwrite/shapers/arabic.c b/dlls/dwrite/shapers/arabic.c index aaf57da42e4..cc701150a56 100644 --- a/dlls/dwrite/shapers/arabic.c +++ b/dlls/dwrite/shapers/arabic.c @@ -41,6 +41,7 @@ enum arabic_shaping_action MED2, INIT, NONE, + NUM_FEATURES = NONE, }; static BOOL feature_is_syriac(unsigned int tag) @@ -134,10 +135,17 @@ static void arabic_set_shaping_action(struct scriptshaping_context *context, context->glyph_infos[idx].props |= (action & 0xf) << 16; } +static enum arabic_shaping_action arabic_get_shaping_action(const struct scriptshaping_context *context, + unsigned int idx) +{ + return (context->glyph_infos[idx].props >> 16) & 0xf; +} + static void arabic_setup_masks(struct scriptshaping_context *context, const struct shaping_features *features) { unsigned int i, prev = ~0u, state = 0; + unsigned int masks[NUM_FEATURES]; for (i = 0; i < context->length; ++i) { @@ -160,6 +168,13 @@ static void arabic_setup_masks(struct scriptshaping_context *context, prev = i; state = entry->next_state; } + + for (i = 0; i < ARRAY_SIZE(masks); ++i) + masks[i] = shape_get_feature_1_mask(features, arabic_features[i]); + + /* Unaffected glyphs get action NONE with zero mask. */ + for (i = 0; i < context->length; ++i) + context->glyph_infos[i].mask |= masks[arabic_get_shaping_action(context, i)]; } const struct shaper arabic_shaper =
1
0
0
0
Nikolay Sivov : dwrite/arabic: Set per-glyph action.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: bea9c706eb6e818b1d8666b619e10f62a0cb1a96 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bea9c706eb6e818b1d8666b6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:21 2021 +0300 dwrite/arabic: Set per-glyph action. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/Makefile.in | 3 +- dlls/dwrite/shapers/arabic.c | 82 +++++++++++ dlls/dwrite/shapers/arabic_table.c | 275 +++++++++++++++++++++++++++++++++++++ tools/make_unicode | 54 +++++++- 4 files changed, 410 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=bea9c706eb6e818b1d86…
1
0
0
0
Nikolay Sivov : dwrite: Call stage function for substitution loop.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 864745e7bb0e9648e0157c74457faaf6c47deb09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=864745e7bb0e9648e0157c74…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:20 2021 +0300 dwrite: Call stage function for substitution loop. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 66 +++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index b446e7450b7..6fe85dd4991 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -5795,7 +5795,7 @@ void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, unsigned int language_index, struct shaping_features *features) { struct lookups lookups = { 0 }; - unsigned int i, j, start_idx; + unsigned int i = 0, j, start_idx; BOOL ret; context->nesting_level_left = SHAPE_MAX_NESTING_LEVEL; @@ -5805,47 +5805,53 @@ void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, opentype_get_nominal_glyphs(context, features); opentype_layout_set_glyph_masks(context, features); - for (i = 0; i < lookups.count; ++i) + for (j = 0; j <= features->stage; ++j) { - const struct lookup *lookup = &lookups.lookups[i]; + for (; i < features->stages[j].last_lookup; ++i) + { + const struct lookup *lookup = &lookups.lookups[i]; - context->lookup_mask = lookup->mask; - context->auto_zwnj = lookup->auto_zwnj; - context->auto_zwj = lookup->auto_zwj; + context->lookup_mask = lookup->mask; + context->auto_zwnj = lookup->auto_zwnj; + context->auto_zwj = lookup->auto_zwj; - if (!opentype_is_gsub_lookup_reversed(context, lookup)) - { - context->cur = 0; - while (context->cur < context->glyph_count) + if (!opentype_is_gsub_lookup_reversed(context, lookup)) { - ret = FALSE; - - if ((context->glyph_infos[context->cur].mask & lookup->mask) && - lookup_is_glyph_match(context, context->cur, lookup->flags)) + context->cur = 0; + while (context->cur < context->glyph_count) { - ret = opentype_layout_apply_gsub_lookup(context, lookup); - } + ret = FALSE; - if (!ret) - context->cur++; - } - } - else - { - context->cur = context->glyph_count - 1; + if ((context->glyph_infos[context->cur].mask & lookup->mask) && + lookup_is_glyph_match(context, context->cur, lookup->flags)) + { + ret = opentype_layout_apply_gsub_lookup(context, lookup); + } - for (;;) + if (!ret) + context->cur++; + } + } + else { - if ((context->glyph_infos[context->cur].mask & lookup->mask) && - lookup_is_glyph_match(context, context->cur, lookup->flags)) + context->cur = context->glyph_count - 1; + + for (;;) { - opentype_layout_apply_gsub_lookup(context, lookup); - } + if ((context->glyph_infos[context->cur].mask & lookup->mask) && + lookup_is_glyph_match(context, context->cur, lookup->flags)) + { + opentype_layout_apply_gsub_lookup(context, lookup); + } - if (context->cur == 0) break; - --context->cur; + if (context->cur == 0) break; + --context->cur; + } } } + + if (features->stages[j].func) + features->stages[j].func(context); } /* For every glyph range of [<last>.isClusterStart, <next>.isClusterStart) set corresponding
1
0
0
0
Nikolay Sivov : dwrite: Add per shaping stage functions.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: dfb94e6f8ee630bd514a7c16beefcba3daaf0bcf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfb94e6f8ee630bd514a7c16…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:19 2021 +0300 dwrite: Add per shaping stage functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 21 ++++++++++++++++----- dlls/dwrite/opentype.c | 7 ++++--- dlls/dwrite/shape.c | 3 ++- dlls/dwrite/shapers/arabic.c | 6 +++--- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 57641680db5..3f48c189a13 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -559,12 +559,23 @@ struct shaping_feature unsigned int stage; }; +#define MAX_SHAPING_STAGE 16 + +typedef void (*stage_func)(struct scriptshaping_context *context); + +struct shaping_stage +{ + stage_func func; + unsigned int last_lookup; +}; + struct shaping_features { struct shaping_feature *features; size_t count; size_t capacity; unsigned int stage; + struct shaping_stage stages[MAX_SHAPING_STAGE]; }; struct shaper @@ -577,9 +588,9 @@ extern const struct shaper arabic_shaper DECLSPEC_HIDDEN; extern void shape_enable_feature(struct shaping_features *features, unsigned int tag, unsigned int flags) DECLSPEC_HIDDEN; -extern void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, - unsigned int value) DECLSPEC_HIDDEN; -extern void shape_start_next_stage(struct shaping_features *features) DECLSPEC_HIDDEN; +extern void shape_add_feature_full(struct shaping_features *features, unsigned int tag, + unsigned int flags, unsigned int value) DECLSPEC_HIDDEN; +extern void shape_start_next_stage(struct shaping_features *features, stage_func func) DECLSPEC_HIDDEN; struct scriptshaping_context { @@ -667,9 +678,9 @@ extern DWORD opentype_layout_find_script(const struct scriptshaping_cache *cache extern DWORD opentype_layout_find_language(const struct scriptshaping_cache *cache, DWORD kind, DWORD tag, unsigned int script_index, unsigned int *language_index) DECLSPEC_HIDDEN; extern void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, unsigned int script_index, - unsigned int language_index, const struct shaping_features *features) DECLSPEC_HIDDEN; + unsigned int language_index, struct shaping_features *features) DECLSPEC_HIDDEN; extern void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, unsigned int script_index, - unsigned int language_index, const struct shaping_features *features) DECLSPEC_HIDDEN; + unsigned int language_index, struct shaping_features *features) DECLSPEC_HIDDEN; extern BOOL opentype_layout_check_feature(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_feature *feature, unsigned int glyph_count, const UINT16 *glyphs, UINT8 *feature_applies) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 03b74eae591..b446e7450b7 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4442,7 +4442,7 @@ static void opentype_layout_add_lookups(const struct ot_feature_list *feature_li } static void opentype_layout_collect_lookups(struct scriptshaping_context *context, unsigned int script_index, - unsigned int language_index, const struct shaping_features *features, const struct ot_gsubgpos_table *table, + unsigned int language_index, struct shaping_features *features, const struct ot_gsubgpos_table *table, struct lookups *lookups) { unsigned int last_num_lookups = 0, stage, script_feature_count = 0; @@ -4607,6 +4607,7 @@ static void opentype_layout_collect_lookups(struct scriptshaping_context *contex } last_num_lookups = lookups->count; + features->stages[stage].last_lookup = last_num_lookups; } } @@ -4688,7 +4689,7 @@ static void opentype_layout_apply_gpos_context_lookup(struct scriptshaping_conte } void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, unsigned int script_index, - unsigned int language_index, const struct shaping_features *features) + unsigned int language_index, struct shaping_features *features) { struct lookups lookups = { 0 }; unsigned int i; @@ -5791,7 +5792,7 @@ static void opentype_layout_apply_gsub_context_lookup(struct scriptshaping_conte } void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, unsigned int script_index, - unsigned int language_index, const struct shaping_features *features) + unsigned int language_index, struct shaping_features *features) { struct lookups lookups = { 0 }; unsigned int i, j, start_idx; diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index 2dbea825216..6428bf6ceb0 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -142,8 +142,9 @@ void shape_enable_feature(struct shaping_features *features, unsigned int tag, shape_add_feature_full(features, tag, FEATURE_GLOBAL | flags, 1); } -void shape_start_next_stage(struct shaping_features *features) +void shape_start_next_stage(struct shaping_features *features, stage_func func) { + features->stages[features->stage].func = func; features->stage++; } diff --git a/dlls/dwrite/shapers/arabic.c b/dlls/dwrite/shapers/arabic.c index 32588b9c796..0b456dadc11 100644 --- a/dlls/dwrite/shapers/arabic.c +++ b/dlls/dwrite/shapers/arabic.c @@ -56,21 +56,21 @@ static void arabic_collect_features(struct scriptshaping_context *context, shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('c','c','m','p'), 0); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('l','o','c','l'), 0); - shape_start_next_stage(features); + shape_start_next_stage(features, NULL); for (i = 0; i < ARRAY_SIZE(arabic_features); ++i) { unsigned int flags = context->script == Script_Arabic && !feature_is_syriac(arabic_features[i]) ? FEATURE_HAS_FALLBACK : 0; shape_add_feature_full(features, arabic_features[i], flags, 1); - shape_start_next_stage(features); + shape_start_next_stage(features, NULL); } shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('r','l','i','g'), FEATURE_MANUAL_ZWJ | FEATURE_HAS_FALLBACK); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('r','c','l','t'), FEATURE_MANUAL_ZWJ); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('c','a','l','t'), FEATURE_MANUAL_ZWJ); - shape_start_next_stage(features); + shape_start_next_stage(features, NULL); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('m','s','e','t'), 0); }
1
0
0
0
Nikolay Sivov : dwrite: Mark features that were not found.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 3c0836bfa3360b8696d08c0c08ed37ab3368bf5c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c0836bfa3360b8696d08c0c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:18 2021 +0300 dwrite: Mark features that were not found. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/opentype.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 4a4229e1dc0..57641680db5 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -544,6 +544,7 @@ enum shaping_feature_flags FEATURE_MANUAL_ZWJ = 0x8, FEATURE_MANUAL_JOINERS = FEATURE_MANUAL_ZWNJ | FEATURE_MANUAL_ZWJ, FEATURE_HAS_FALLBACK = 0x10, + FEATURE_NEEDS_FALLBACK = 0x20, }; struct shaping_feature diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 256218663fb..03b74eae591 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4568,6 +4568,8 @@ static void opentype_layout_collect_lookups(struct scriptshaping_context *contex next_bit += bits_needed; context->global_mask |= (feature->default_value << feature->shift) & feature->mask; } + if (!found) + feature->flags |= FEATURE_NEEDS_FALLBACK; } for (stage = 0; stage <= features->stage; ++stage)
1
0
0
0
Nikolay Sivov : dwrite/arabic: Mark some features for fallback.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: f064acbdd9fac8a417067a244d008e4177e265f7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f064acbdd9fac8a417067a24…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 22 15:25:17 2021 +0300 dwrite/arabic: Mark some features for fallback. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 3 +++ dlls/dwrite/opentype.c | 2 +- dlls/dwrite/shape.c | 3 ++- dlls/dwrite/shapers/arabic.c | 25 +++++++++++++++++++++++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 76d49ae5104..4a4229e1dc0 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -543,6 +543,7 @@ enum shaping_feature_flags FEATURE_MANUAL_ZWNJ = 0x4, FEATURE_MANUAL_ZWJ = 0x8, FEATURE_MANUAL_JOINERS = FEATURE_MANUAL_ZWNJ | FEATURE_MANUAL_ZWJ, + FEATURE_HAS_FALLBACK = 0x10, }; struct shaping_feature @@ -575,6 +576,8 @@ extern const struct shaper arabic_shaper DECLSPEC_HIDDEN; extern void shape_enable_feature(struct shaping_features *features, unsigned int tag, unsigned int flags) DECLSPEC_HIDDEN; +extern void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, + unsigned int value) DECLSPEC_HIDDEN; extern void shape_start_next_stage(struct shaping_features *features) DECLSPEC_HIDDEN; struct scriptshaping_context diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 20534460d09..256218663fb 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4553,7 +4553,7 @@ static void opentype_layout_collect_lookups(struct scriptshaping_context *contex } } - if (!found) + if (!found && !(features->features[i].flags & FEATURE_HAS_FALLBACK)) continue; if (feature->flags & FEATURE_GLOBAL && feature->max_value == 1) diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index 53b392c88e2..2dbea825216 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -115,7 +115,7 @@ static DWORD shape_select_language(const struct scriptshaping_cache *cache, DWOR return 0; } -static void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, unsigned int value) +void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, unsigned int value) { unsigned int i = features->count; @@ -193,6 +193,7 @@ static void shape_merge_features(struct scriptshaping_context *context, struct s features->features[j].flags ^= FEATURE_GLOBAL; features->features[j].max_value = max(features->features[j].max_value, features->features[i].max_value); } + features->features[j].flags |= features->features[i].flags & FEATURE_HAS_FALLBACK; features->features[j].stage = min(features->features[j].stage, features->features[i].stage); } } diff --git a/dlls/dwrite/shapers/arabic.c b/dlls/dwrite/shapers/arabic.c index d8c6c9495c0..32588b9c796 100644 --- a/dlls/dwrite/shapers/arabic.c +++ b/dlls/dwrite/shapers/arabic.c @@ -18,6 +18,7 @@ */ #include "dwrite_private.h" +#include "scripts.h" static const unsigned int arabic_features[] = { @@ -30,6 +31,24 @@ static const unsigned int arabic_features[] = DWRITE_MAKE_OPENTYPE_TAG('i','n','i','t'), }; +enum arabic_shaping_action +{ + ISOL, + FINA, + FIN2, + FIN3, + MEDI, + MED2, + INIT, + NONE, +}; + +static BOOL feature_is_syriac(unsigned int tag) +{ + return tag == arabic_features[FIN2] || tag == arabic_features[FIN3] || + tag == arabic_features[MED2]; +} + static void arabic_collect_features(struct scriptshaping_context *context, struct shaping_features *features) { @@ -41,11 +60,13 @@ static void arabic_collect_features(struct scriptshaping_context *context, for (i = 0; i < ARRAY_SIZE(arabic_features); ++i) { - shape_enable_feature(features, arabic_features[i], 0); + unsigned int flags = context->script == Script_Arabic && !feature_is_syriac(arabic_features[i]) ? + FEATURE_HAS_FALLBACK : 0; + shape_add_feature_full(features, arabic_features[i], flags, 1); shape_start_next_stage(features); } - shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('r','l','i','g'), FEATURE_MANUAL_ZWJ); + shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('r','l','i','g'), FEATURE_MANUAL_ZWJ | FEATURE_HAS_FALLBACK); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('r','c','l','t'), FEATURE_MANUAL_ZWJ); shape_enable_feature(features, DWRITE_MAKE_OPENTYPE_TAG('c','a','l','t'), FEATURE_MANUAL_ZWJ);
1
0
0
0
Jacek Caban : winnt.h: Fix MSVC variants of InterlockedIncrement16 and InterlockedDecrement16.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 1495ccd152a68cc799b4d2de7244e9ee8cc60ae9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1495ccd152a68cc799b4d2de…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 22 15:11:05 2021 +0100 winnt.h: Fix MSVC variants of InterlockedIncrement16 and InterlockedDecrement16. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/winnt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/winnt.h b/include/winnt.h index f5ef0c7bd52..5b3efe61385 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -6966,7 +6966,7 @@ static FORCEINLINE LONG WINAPI InterlockedIncrement( LONG volatile *dest ) static FORCEINLINE short WINAPI InterlockedIncrement16( short volatile *dest ) { - return _InterlockedIncrement16( (long volatile *)dest ); + return _InterlockedIncrement16( dest ); } static FORCEINLINE LONG WINAPI InterlockedDecrement( LONG volatile *dest ) @@ -6976,7 +6976,7 @@ static FORCEINLINE LONG WINAPI InterlockedDecrement( LONG volatile *dest ) static FORCEINLINE short WINAPI InterlockedDecrement16( short volatile *dest ) { - return _InterlockedDecrement16( (long volatile *)dest ); + return _InterlockedDecrement16( dest ); } static FORCEINLINE LONG WINAPI InterlockedOr( LONG volatile *dest, LONG val )
1
0
0
0
Henri Verbeet : d3d12: Request VKD3D_API_VERSION_1_2.
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: bc29521db57ceaf8698a8e40ddb4852aa0fc77b1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bc29521db57ceaf8698a8e40…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jan 22 10:45:25 2021 +0100 d3d12: Request VKD3D_API_VERSION_1_2. The practical effect of this is that vkd3d will start advertising support for version 1.1 root signatures. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d12/d3d12_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/d3d12/d3d12_main.c b/dlls/d3d12/d3d12_main.c index b8810848cd3..3dd4ec796b0 100644 --- a/dlls/d3d12/d3d12_main.c +++ b/dlls/d3d12/d3d12_main.c @@ -337,6 +337,11 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, D3D_FEATURE_LEVEL minimum_fe { VK_KHR_SWAPCHAIN_EXTENSION_NAME, }; + static const struct vkd3d_application_info application_info = + { + .type = VKD3D_STRUCTURE_TYPE_APPLICATION_INFO, + .api_version = VKD3D_API_VERSION_1_2, + }; TRACE("adapter %p, minimum_feature_level %#x, iid %s, device %p.\n", adapter, minimum_feature_level, debugstr_guid(iid), device); @@ -357,7 +362,7 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, D3D_FEATURE_LEVEL minimum_fe } optional_extensions_info.type = VKD3D_STRUCTURE_TYPE_OPTIONAL_INSTANCE_EXTENSIONS_INFO; - optional_extensions_info.next = NULL; + optional_extensions_info.next = &application_info; optional_extensions_info.extensions = optional_instance_extensions; optional_extensions_info.extension_count = ARRAY_SIZE(optional_instance_extensions);
1
0
0
0
Henri Verbeet : d3d12: Implement D3D12CreateVersionedRootSignatureDeserializer().
by Alexandre Julliard
22 Jan '21
22 Jan '21
Module: wine Branch: master Commit: 8c412417de4c9a4625ad43d506f9904b76063f38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c412417de4c9a4625ad43d5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jan 22 10:45:24 2021 +0100 d3d12: Implement D3D12CreateVersionedRootSignatureDeserializer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d12/d3d12.spec | 2 +- dlls/d3d12/d3d12_main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/d3d12/d3d12.spec b/dlls/d3d12/d3d12.spec index 7c2ae988067..21231d39558 100644 --- a/dlls/d3d12/d3d12.spec +++ b/dlls/d3d12/d3d12.spec @@ -5,7 +5,7 @@ @ stub D3D12CoreGetLayeredDeviceSize @ stub D3D12CoreRegisterLayers @ stdcall D3D12CreateRootSignatureDeserializer(ptr long ptr ptr) -#@ stub D3D12CreateVersionedRootSignatureDeserializer +@ stdcall D3D12CreateVersionedRootSignatureDeserializer(ptr long ptr ptr) @ stdcall D3D12EnableExperimentalFeatures(long ptr ptr ptr) @ stdcall D3D12SerializeRootSignature(ptr long ptr ptr) @ stdcall D3D12SerializeVersionedRootSignature(ptr ptr ptr) diff --git a/dlls/d3d12/d3d12_main.c b/dlls/d3d12/d3d12_main.c index 9f0fa12ee82..b8810848cd3 100644 --- a/dlls/d3d12/d3d12_main.c +++ b/dlls/d3d12/d3d12_main.c @@ -406,6 +406,15 @@ HRESULT WINAPI D3D12CreateRootSignatureDeserializer(const void *data, SIZE_T dat return vkd3d_create_root_signature_deserializer(data, data_size, iid, deserializer); } +HRESULT WINAPI D3D12CreateVersionedRootSignatureDeserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer) +{ + TRACE("data %p, data_size %lu, iid %s, deserializer %p.\n", + data, data_size, debugstr_guid(iid), deserializer); + + return vkd3d_create_versioned_root_signature_deserializer(data, data_size, iid, deserializer); +} + HRESULT WINAPI D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob) {
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200