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
February 2017
----- 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
838 discussions
Start a n
N
ew thread
Nikolay Sivov : usp10: Ignore device tables with invalid delta format.
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: fefd15118fa643c16a34be889baf79cda1768a0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fefd15118fa643c16a34be889…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 20 02:36:39 2017 +0300 usp10: Ignore device tables with invalid delta format. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index e3aaf16..1ad9c39 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1492,10 +1492,18 @@ static INT GPOS_get_device_table_value(const OT_DeviceTable *DeviceTable, WORD p static const WORD mask[3] = {3,0xf,0xff}; if (DeviceTable && ppem >= GET_BE_WORD(DeviceTable->StartSize) && ppem <= GET_BE_WORD(DeviceTable->EndSize)) { - int format = GET_BE_WORD(DeviceTable->DeltaFormat); + WORD format = GET_BE_WORD(DeviceTable->DeltaFormat); int index = ppem - GET_BE_WORD(DeviceTable->StartSize); int value; - TRACE("device table, format %i, index %i\n",format, index); + + TRACE("device table, format %#x, index %i\n", format, index); + + if (format & ~0x3) + { + WARN("invalid delta format %#x\n", format); + return 0; + } + index = index << format; value = (DeviceTable->DeltaValue[index/sizeof(WORD)] << (index%sizeof(WORD)))&mask[format-1]; TRACE("offset %i, value %i\n",index, value);
1
0
0
0
Henri Verbeet : usp10: Iterate in visual order in GPOS_apply_feature().
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: b6d541cac50d14314a6ffde9dd32d4b9644e1192 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6d541cac50d14314a6ffde9d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:34 2017 +0100 usp10: Iterate in visual order in GPOS_apply_feature(). In particular, cursive attachment application depends on previous visual order glyph offsets. Affects e.g. wordpad with Nastaliq fonts. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/shape.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 9549d9f..5c257dd 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -882,15 +882,17 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W static VOID GPOS_apply_feature(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, LoadedFeature *feature, const WORD *glyphs, INT glyph_count, GOFFSET *pGoffset) { - int i; + int dir = analysis->fLogicalOrder && analysis->fRTL ? -1 : 1; + unsigned int start_idx, i, j; TRACE("%i lookups\n", feature->lookup_count); + + start_idx = dir < 0 ? glyph_count - 1 : 0; for (i = 0; i < feature->lookup_count; i++) { - int j; for (j = 0; j < glyph_count; ) j += OpenType_apply_GPOS_lookup(psc, lpotm, lplogfont, analysis, piAdvance, - feature->lookups[i], glyphs, j, glyph_count, pGoffset); + feature->lookups[i], glyphs, start_idx + dir * j, glyph_count, pGoffset); } }
1
0
0
0
Henri Verbeet : usp10: Return the logical offset in GPOS_apply_lookup().
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 6fec9b1325e47a279554be54fbd964c5667f9816 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6fec9b1325e47a279554be54f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:33 2017 +0100 usp10: Return the logical offset in GPOS_apply_lookup(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 8 ++++---- dlls/usp10/shape.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 0cf474d..e3aaf16 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -2349,7 +2349,7 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG GPOS_convert_design_units_to_device(lpotm, lplogfont, advance[1].x, advance[1].y, &devX, &devY); piAdvance[glyph_index + write_dir] += round(devX); } - return glyph_index + index_offset; + return index_offset; } case GPOS_LOOKUP_ATTACH_CURSIVE: @@ -2417,17 +2417,17 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } case GPOS_LOOKUP_POSITION_CONTEXT: - return glyph_index + GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + return GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); case GPOS_LOOKUP_POSITION_CONTEXT_CHAINED: - return glyph_index + GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + return GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); default: FIXME("Unhandled GPOS lookup type %#x.\n", type); } - return glyph_index+1; + return 1; } INT OpenType_apply_GPOS_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, INT lookup_index, const WORD *glyphs, INT glyph_index, INT glyph_count, GOFFSET *pGoffset) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index bf333b2..9549d9f 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -889,7 +889,8 @@ static VOID GPOS_apply_feature(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPL { int j; for (j = 0; j < glyph_count; ) - j = OpenType_apply_GPOS_lookup(psc, lpotm, lplogfont, analysis, piAdvance, feature->lookups[i], glyphs, j, glyph_count, pGoffset); + j += OpenType_apply_GPOS_lookup(psc, lpotm, lplogfont, analysis, piAdvance, + feature->lookups[i], glyphs, j, glyph_count, pGoffset); } }
1
0
0
0
Henri Verbeet : usp10: Return the logical offset in GPOS_apply_ChainContextPos().
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 8d1566735ff3d44cd5ffd707a72df11b41a65464 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d1566735ff3d44cd5ffd707a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:32 2017 +0100 usp10: Return the logical offset in GPOS_apply_ChainContextPos(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 1371145..0cf474d 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -2249,14 +2249,14 @@ static INT GPOS_apply_ChainContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpo TRACE("Position: %i -> %i %i\n",k, SequenceIndex, lookupIndex); GPOS_apply_lookup(psc, lpotm, lplogfont, analysis, piAdvance, lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, glyph_count, pGoffset); } - return glyph_index + indexGlyphs + GET_BE_WORD(ccpf3_3->LookaheadGlyphCount); + return indexGlyphs + GET_BE_WORD(ccpf3_3->LookaheadGlyphCount); } - else return glyph_index + 1; + else return 1; } else FIXME("Unhandled Chaining Contextual Positioning Format %i\n",GET_BE_WORD(ccpf3->PosFormat)); } - return glyph_index + 1; + return 1; } static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, const OT_LookupList* lookup, INT lookup_index, const WORD *glyphs, INT glyph_index, INT glyph_count, GOFFSET *pGoffset) @@ -2421,7 +2421,7 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); case GPOS_LOOKUP_POSITION_CONTEXT_CHAINED: - return GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + return glyph_index + GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); default:
1
0
0
0
Henri Verbeet : usp10: Return the logical offset in GPOS_apply_ContextPos( ).
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 22101966cfe6764f0d36918caa8a7f10045d9d85 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22101966cfe6764f0d36918ca…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:31 2017 +0100 usp10: Return the logical offset in GPOS_apply_ContextPos(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 07066f6..1371145 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -2139,7 +2139,7 @@ static INT GPOS_apply_ContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, L TRACE("Position: %i -> %i %i\n",l, SequenceIndex, lookupIndex); GPOS_apply_lookup(psc, lpotm, lplogfont, analysis, piAdvance, lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, glyph_count, pGoffset); } - return glyph_index + 1; + return 1; } } @@ -2156,7 +2156,7 @@ static INT GPOS_apply_ContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, L else FIXME("Unhandled Contextual Positioning Format %i\n",GET_BE_WORD(cpf2->PosFormat)); } - return glyph_index + 1; + return 1; } static INT GPOS_apply_ChainContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, @@ -2417,7 +2417,7 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } case GPOS_LOOKUP_POSITION_CONTEXT: - return GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + return glyph_index + GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); case GPOS_LOOKUP_POSITION_CONTEXT_CHAINED:
1
0
0
0
Henri Verbeet : usp10: Return the logical offset in GPOS_apply_PairAdjustment().
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 6e84358bcdc933b5c86afd781e96dae14ff5d0ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e84358bcdc933b5c86afd781…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:30 2017 +0100 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(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index a67bba7..07066f6 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1695,7 +1695,8 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const SCRIPT_AN int j; int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1; - if (glyph_index + write_dir < 0 || glyph_index + write_dir >= glyph_count) return glyph_index + 1; + if (glyph_index + write_dir < 0 || glyph_index + write_dir >= glyph_count) + return 1; TRACE("Pair Adjustment Positioning Subtable\n"); @@ -1731,7 +1732,7 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const SCRIPT_AN TRACE("Format 1: Found Pair %x,%x\n",glyphs[glyph_index],glyphs[glyph_index+write_dir]); apply_pair_value( ppf1, ValueFormat1, ValueFormat2, pair_val_rec->Value1, ppem, ptAdjust, ptAdvance ); if (ValueFormat2) next++; - return glyph_index + next; + return next; } pair_val_rec = (const GPOS_PairValueRecord *)(pair_val_rec->Value1 + val_fmt1_size + val_fmt2_size); } @@ -1764,14 +1765,14 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const SCRIPT_AN apply_pair_value( ppf2, ValueFormat1, ValueFormat2, pair_val, ppem, ptAdjust, ptAdvance ); if (ValueFormat2) next++; - return glyph_index + next; + return next; } } } else FIXME("Pair Adjustment Positioning: Format %i Unhandled\n",GET_BE_WORD(ppf1->PosFormat)); } - return glyph_index+1; + return 1; } static VOID GPOS_apply_CursiveAttachment(const OT_LookupTable *look, const SCRIPT_ANALYSIS *analysis, const WORD *glyphs, INT glyph_index, @@ -2320,11 +2321,12 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG POINT advance[2]= {{0,0},{0,0}}; POINT adjust[2]= {{0,0},{0,0}}; double devX, devY; - int index; + int index_offset; int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1; int offset_sign = (analysis->fRTL && analysis->fLogicalOrder) ? -1 : 1; - index = GPOS_apply_PairAdjustment(look, analysis, glyphs, glyph_index, glyph_count, ppem, adjust, advance); + index_offset = GPOS_apply_PairAdjustment(look, analysis, glyphs, + glyph_index, glyph_count, ppem, adjust, advance); if (adjust[0].x || adjust[0].y) { GPOS_convert_design_units_to_device(lpotm, lplogfont, adjust[0].x, adjust[0].y, &devX, &devY); @@ -2347,7 +2349,7 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG GPOS_convert_design_units_to_device(lpotm, lplogfont, advance[1].x, advance[1].y, &devX, &devY); piAdvance[glyph_index + write_dir] += round(devX); } - return index; + return glyph_index + index_offset; } case GPOS_LOOKUP_ATTACH_CURSIVE:
1
0
0
0
Henri Verbeet : usp10: Introduce an enumeration for GPOS lookup types.
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 61e8a388b2628d90c604c100e762abd0d85ef67f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61e8a388b2628d90c604c100e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 19:02:29 2017 +0100 usp10: Introduce an enumeration for GPOS lookup types. As opposed to using magic numbers. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 57 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index a9aa4f4..a67bba7 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -48,6 +48,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(uniscribe); /* These are all structures needed for the cmap format 12 table */ #define CMAP_TAG MS_MAKE_TAG('c', 'm', 'a', 'p') +enum gpos_lookup_type +{ + GPOS_LOOKUP_ADJUST_SINGLE = 0x1, + GPOS_LOOKUP_ADJUST_PAIR = 0x2, + GPOS_LOOKUP_ATTACH_CURSIVE = 0x3, + GPOS_LOOKUP_ATTACH_MARK_TO_BASE = 0x4, + GPOS_LOOKUP_ATTACH_MARK_TO_LIGATURE = 0x5, + GPOS_LOOKUP_ATTACH_MARK_TO_MARK = 0x6, + GPOS_LOOKUP_POSITION_CONTEXT = 0x7, + GPOS_LOOKUP_POSITION_CONTEXT_CHAINED = 0x8, + GPOS_LOOKUP_POSITION_EXTENSION = 0x9, +}; + typedef struct { WORD platformID; WORD encodingID; @@ -1587,7 +1600,7 @@ static const BYTE *GPOS_get_subtable(const OT_LookupTable *look, int index) { int offset = GET_BE_WORD(look->SubTable[index]); - if (GET_BE_WORD(look->LookupType) == 9) + if (GET_BE_WORD(look->LookupType) == GPOS_LOOKUP_POSITION_EXTENSION) { const GPOS_ExtensionPosFormat1 *ext = (const GPOS_ExtensionPosFormat1 *)((const BYTE *)look + offset); if (GET_BE_WORD(ext->PosFormat) == 1) @@ -2250,13 +2263,15 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG int offset; const OT_LookupTable *look; int ppem = lpotm->otmTextMetrics.tmAscent + lpotm->otmTextMetrics.tmDescent - lpotm->otmTextMetrics.tmInternalLeading; - WORD type; + enum gpos_lookup_type type; offset = GET_BE_WORD(lookup->Lookup[lookup_index]); look = (const OT_LookupTable*)((const BYTE*)lookup + offset); type = GET_BE_WORD(look->LookupType); - TRACE("type %i, flag %x, subtables %i\n",type,GET_BE_WORD(look->LookupFlag),GET_BE_WORD(look->SubTableCount)); - if (type == 9) + TRACE("type %#x, flag %#x, subtables %u.\n", type, + GET_BE_WORD(look->LookupFlag), GET_BE_WORD(look->SubTableCount)); + + if (type == GPOS_LOOKUP_POSITION_EXTENSION) { if (GET_BE_WORD(look->SubTableCount)) { @@ -2278,7 +2293,7 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } switch (type) { - case 1: + case GPOS_LOOKUP_ADJUST_SINGLE: { double devX, devY; POINT adjust = {0,0}; @@ -2299,7 +2314,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } - case 2: + + case GPOS_LOOKUP_ADJUST_PAIR: { POINT advance[2]= {{0,0},{0,0}}; POINT adjust[2]= {{0,0},{0,0}}; @@ -2333,7 +2349,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } return index; } - case 3: + + case GPOS_LOOKUP_ATTACH_CURSIVE: { POINT desU = {0,0}; double devX, devY; @@ -2348,7 +2365,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } - case 4: + + case GPOS_LOOKUP_ATTACH_MARK_TO_BASE: { double devX, devY; POINT desU = {0,0}; @@ -2366,7 +2384,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } - case 5: + + case GPOS_LOOKUP_ATTACH_MARK_TO_LIGATURE: { double devX, devY; POINT desU = {0,0}; @@ -2379,7 +2398,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } - case 6: + + case GPOS_LOOKUP_ATTACH_MARK_TO_MARK: { double devX, devY; POINT desU = {0,0}; @@ -2393,14 +2413,17 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } - case 7: - return GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); - case 8: - { - return GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); - } + + case GPOS_LOOKUP_POSITION_CONTEXT: + return GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); + + case GPOS_LOOKUP_POSITION_CONTEXT_CHAINED: + return GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, + lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); + default: - FIXME("We do not handle SubType %i\n",type); + FIXME("Unhandled GPOS lookup type %#x.\n", type); } return glyph_index+1; }
1
0
0
0
Henri Verbeet : usp10: Properly get glyph widths for OpenType fonts in ScriptPlaceOpenType().
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: 4b22953ec5ce44b41e1f913d67549bff488f5ab0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b22953ec5ce44b41e1f913d6…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Feb 19 18:16:37 2017 +0100 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(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/usp10.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 3595ca2..f8a6aa5 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3347,15 +3347,24 @@ HRESULT WINAPI ScriptPlaceOpenType( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS } else if (!get_cache_glyph_widths(psc, pwGlyphs[i], &abc)) { + BOOL ret; if (!hdc) return E_PENDING; - if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex) + if (get_cache_pitch_family(psc) & TMPF_TRUETYPE) { - if (!GetCharABCWidthsI(hdc, 0, 1, (WORD *)&pwGlyphs[i], &abc)) return S_FALSE; + if (psa->fNoGlyphIndex) + ret = GetCharABCWidthsW(hdc, pwGlyphs[i], pwGlyphs[i], &abc); + else + ret = GetCharABCWidthsI(hdc, 0, 1, (WORD *)&pwGlyphs[i], &abc); + if (!ret) return S_FALSE; } else { INT width; - if (!GetCharWidth32W(hdc, pwGlyphs[i], pwGlyphs[i], &width)) return S_FALSE; + if (psa->fNoGlyphIndex) + ret = GetCharWidth32W(hdc, pwGlyphs[i], pwGlyphs[i], &width); + else + ret = GetCharWidthI(hdc, 0, 1, (WORD *)&pwGlyphs[i], &width); + if (!ret) return S_FALSE; abc.abcB = width; abc.abcA = abc.abcC = 0; }
1
0
0
0
Nikolay Sivov : comdlg32: Use GetPropW() to get to file dialog data.
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: b47de18ce140cfa5606c5dd3893ddafa204bd847 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b47de18ce140cfa5606c5dd38…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 21 15:35:17 2017 +0300 comdlg32: Use GetPropW() to get to file dialog data. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comdlg32/filedlg.c | 63 ++++++++++++++++++++++-------------------- dlls/comdlg32/filedlgbrowser.c | 16 +++++------ dlls/comdlg32/filedlgbrowser.h | 2 +- 3 files changed, 42 insertions(+), 39 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b47de18ce140cfa5606c5…
1
0
0
0
Nikolay Sivov : comdlg32: Consolidate file dialog initialization to avoid duplication.
by Alexandre Julliard
21 Feb '17
21 Feb '17
Module: wine Branch: master Commit: c23a91cb638262f1d60f4437650c7440d3c70c19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c23a91cb638262f1d60f44376…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 21 15:35:16 2017 +0300 comdlg32: Consolidate file dialog initialization to avoid duplication. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comdlg32/filedlg.c | 365 ++++++++++++++++++++---------------------------- 1 file changed, 154 insertions(+), 211 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c23a91cb638262f1d60f4…
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
84
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200