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
June
May
April
March
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
May 2011
----- 2025 -----
June 2025
May 2025
April 2025
March 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
945 discussions
Start a n
N
ew thread
Aric Stewart : usp10: Determine glyph properties after shaping for scripts with no justification .
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 953c7a34275390b17b83f12df3e612ed03882994 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=953c7a34275390b17b83f12df…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:43 2011 -0500 usp10: Determine glyph properties after shaping for scripts with no justification. --- dlls/usp10/shape.c | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 41 insertions(+), 4 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 18ae11b..047acc5 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -50,6 +50,7 @@ typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, co static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp); static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); +static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -390,16 +391,16 @@ static const ScriptShapeData ShapingData[] = {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ hebrew_features, 1}, NULL, "hebr", NULL, NULL}, - {{ syriac_features, 4}, required_syriac_features, "syrc", ContextualShape_Syriac, NULL}, + {{ syriac_features, 4}, required_syriac_features, "syrc", ContextualShape_Syriac, ShapeCharGlyphProp_None}, {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, - {{ NULL, 0}, NULL, "thaa", NULL, NULL}, + {{ NULL, 0}, NULL, "thaa", NULL, ShapeCharGlyphProp_None}, {{ standard_features, 2}, NULL, "grek", NULL, NULL}, {{ standard_features, 2}, NULL, "cyrl", NULL, NULL}, {{ standard_features, 2}, NULL, "armn", NULL, NULL}, {{ standard_features, 2}, NULL, "geor", NULL, NULL}, {{ sinhala_features, 7}, NULL, "sinh", NULL, NULL}, - {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, - {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_None}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_None}, {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa, ShapeCharGlyphProp_Thai}, {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, @@ -1703,6 +1704,42 @@ static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS } } +static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp) +{ + int i,k; + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + + for (k = 0; k < cChars; k++) + { + if (pwLogClust[k] == i) + { + char_index[char_count] = k; + char_count++; + } + } + + if (char_count == 0) + { + FIXME("No chars in this glyph? Must be an error\n"); + continue; + } + + if (char_count ==1 && pwcChars[char_index[0]] == 0x0020) /* space */ + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); +} + void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) { if (ShapingData[psa->eScript].charGlyphPropProc)
1
0
0
0
Aric Stewart : usp10: Determine glyph properties after shaping for Thai and other SE asian scrpts .
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 9dd700206aa2bb7790fd8783ed6ec7d23f27f9c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9dd700206aa2bb7790fd8783e…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:40 2011 -0500 usp10: Determine glyph properties after shaping for Thai and other SE asian scrpts. --- dlls/usp10/shape.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 80 insertions(+), 5 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index bfcf64c..18ae11b 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -49,6 +49,7 @@ typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, co static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp); static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); +static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -399,11 +400,11 @@ static const ScriptShapeData ShapingData[] = {{ sinhala_features, 7}, NULL, "sinh", NULL, NULL}, {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, - {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa, NULL}, - {{ thai_features, 1}, NULL, "thai", NULL, NULL}, - {{ thai_features, 1}, NULL, "thai", NULL, NULL}, - {{ thai_features, 1}, required_lao_features, "lao", NULL, NULL}, - {{ thai_features, 1}, required_lao_features, "lao", NULL, NULL}, + {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa, ShapeCharGlyphProp_Thai}, + {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, + {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, + {{ thai_features, 1}, required_lao_features, "lao", NULL, ShapeCharGlyphProp_Thai}, + {{ thai_features, 1}, required_lao_features, "lao", NULL, ShapeCharGlyphProp_Thai}, }; static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) @@ -1628,6 +1629,80 @@ static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSI HeapFree(GetProcessHeap(),0,spaces); } +static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ) +{ + int i,k; + int finaGlyph; + INT dirL; + BYTE *spaces; + + spaces = HeapAlloc(GetProcessHeap(),0,cGlyphs); + memset(spaces,0,cGlyphs); + + if (!psa->fLogicalOrder && psa->fRTL) + { + finaGlyph = 0; + dirL = -1; + } + else + { + finaGlyph = cGlyphs-1; + dirL = 1; + } + + for (i = 0; i < cGlyphs; i++) + { + for (k = 0; k < cChars; k++) + if (pwLogClust[k] == i) + { + if (pwcChars[k] == 0x0020) + spaces[i] = 1; + } + } + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + + for (k = 0; k < cChars; k++) + { + if (pwLogClust[k] == i) + { + char_index[char_count] = k; + char_count++; + } + } + + if (char_count == 0) + { + FIXME("No chars in this glyph? Must be an error\n"); + continue; + } + + if (char_count ==1 && pwcChars[char_index[0]] == 0x0020) /* space */ + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + else if (i == finaGlyph) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; + } + + HeapFree(GetProcessHeap(),0,spaces); + GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); + + /* Do not allow justification between marks and their base */ + for (i = 0; i < cGlyphs; i++) + { + if (!pGlyphProp[i].sva.fClusterStart) + pGlyphProp[i-dirL].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } +} + void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) { if (ShapingData[psa->eScript].charGlyphPropProc)
1
0
0
0
Aric Stewart : usp10: Determine glyph properties after shaping for Arabic.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 38d440964101c3ee4584d45e72412cd5dbddf80f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38d440964101c3ee4584d45e7…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:38 2011 -0500 usp10: Determine glyph properties after shaping for Arabic. --- dlls/usp10/shape.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 119 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index c2cbfbf..bfcf64c 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -48,6 +48,7 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, const WCHAR*, const INT, const WORD*, const INT, WORD*, SCRIPT_CHARPROP*, SCRIPT_GLYPHPROP*); static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp); +static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -385,11 +386,11 @@ static const ScriptShapeData ShapingData[] = {{ standard_features, 2}, NULL, "latn", NULL, NULL}, {{ standard_features, 2}, NULL, "" , NULL, NULL}, {{ standard_features, 2}, NULL, "latn", NULL, NULL}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ hebrew_features, 1}, NULL, "hebr", NULL, NULL}, {{ syriac_features, 4}, required_syriac_features, "syrc", ContextualShape_Syriac, NULL}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ NULL, 0}, NULL, "thaa", NULL, NULL}, {{ standard_features, 2}, NULL, "grek", NULL, NULL}, {{ standard_features, 2}, NULL, "cyrl", NULL, NULL}, @@ -1512,6 +1513,121 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); } +static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ) +{ + int i,k; + int initGlyph, finaGlyph; + INT dirR, dirL; + BYTE *spaces; + + spaces = HeapAlloc(GetProcessHeap(),0,cGlyphs); + memset(spaces,0,cGlyphs); + + if (!psa->fLogicalOrder && psa->fRTL) + { + initGlyph = cGlyphs-1; + finaGlyph = 0; + dirR = 1; + dirL = -1; + } + else + { + initGlyph = 0; + finaGlyph = cGlyphs-1; + dirR = -1; + dirL = 1; + } + + for (i = 0; i < cGlyphs; i++) + { + for (k = 0; k < cChars; k++) + if (pwLogClust[k] == i) + { + if (pwcChars[k] == 0x0020) + spaces[i] = 1; + } + } + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + BOOL isInit, isFinal; + + for (k = 0; k < cChars; k++) + { + if (pwLogClust[k] == i) + { + char_index[char_count] = k; + char_count++; + } + } + + isInit = (i == initGlyph || (i+dirR > 0 && i+dirR < cGlyphs && spaces[i+dirR])); + isFinal = (i == finaGlyph || (i+dirL > 0 && i+dirL < cGlyphs && spaces[i+dirL])); + + if (char_count == 0) + { + FIXME("No chars in this glyph? Must be an error\n"); + continue; + } + + if (char_count == 1) + { + if (pwcChars[char_index[0]] == 0x0020) /* space */ + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_BLANK; + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + else if (pwcChars[char_index[0]] == 0x0640) /* kashida */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_KASHIDA; + else if (pwcChars[char_index[0]] == 0x0633) /* SEEN */ + { + if (!isInit && !isFinal) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_SEEN_M; + else if (isInit) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_SEEN; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + else if (!isInit) + { + if (pwcChars[char_index[0]] == 0x0628 ) /* BA */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_BA; + else if (pwcChars[char_index[0]] == 0x0631 ) /* RA */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_RA; + else if (pwcChars[char_index[0]] == 0x0647 ) /* HA */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_HA; + else if ((pwcChars[char_index[0]] == 0x0627 || pwcChars[char_index[0]] == 0x0625 || pwcChars[char_index[0]] == 0x0623 || pwcChars[char_index[0]] == 0x0622) ) /* alef-like */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_ALEF; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + else if (!isInit && !isFinal) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_NORMAL; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + else if (char_count == 2) + { + if ((pwcChars[char_index[0]] == 0x0628 && pwcChars[char_index[1]]== 0x0631) || (pwcChars[char_index[0]] == 0x0631 && pwcChars[char_index[1]]== 0x0628)) /* BA+RA */ + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_BARA; + else if (!isInit) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_NORMAL; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + else if (!isInit && !isFinal) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_ARABIC_NORMAL; + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + + GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); + HeapFree(GetProcessHeap(),0,spaces); +} + void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) { if (ShapingData[psa->eScript].charGlyphPropProc)
1
0
0
0
Aric Stewart : usp10: Update LogClust from glyph properties.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 342de4c1288e1b80fe3e3970d4c0d4d76b2abd26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=342de4c1288e1b80fe3e3970d…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:35 2011 -0500 usp10: Update LogClust from glyph properties. --- dlls/usp10/shape.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index debd242..c2cbfbf 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1026,6 +1026,30 @@ static void GDEF_UpdateGlyphProps(HDC hdc, const WORD *pwGlyphs, const WORD cGly } } +static void UpdateClustersFromGlyphProp(const int cGlyphs, const int cChars, WORD* pwLogClust, SCRIPT_GLYPHPROP *pGlyphProp) +{ + int i; + + for (i = 0; i < cGlyphs; i++) + { + if (!pGlyphProp[i].sva.fClusterStart) + { + int j; + for (j = 0; j < cChars; j++) + { + if (pwLogClust[j] == i) + { + int k = j; + while (!pGlyphProp[pwLogClust[k]].sva.fClusterStart && k >= 0 && k <cChars) + k-=1; + if (pGlyphProp[pwLogClust[k]].sva.fClusterStart) + pwLogClust[j] = pwLogClust[k]; + } + } + } + } +} + static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int chars, WORD* pwLogClust ) { if (changeCount == 0) @@ -1485,6 +1509,7 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS } GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); } void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
1
0
0
0
Aric Stewart : usp10: Use the font GDEF table to update glyph properties.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 8e8d4be5a4b3d04b9025757cd966b54cf0b6a5c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e8d4be5a4b3d04b9025757cd…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:32 2011 -0500 usp10: Use the font GDEF table to update glyph properties. --- dlls/usp10/shape.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index c587ca7..debd242 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -241,6 +241,38 @@ typedef struct{ WORD Alternate[1]; } GSUB_AlternateSet; +/* These are all structures needed for the GDEF table */ +#define GDEF_TAG MS_MAKE_TAG('G', 'D', 'E', 'F') + +enum {BaseGlyph=1, LigatureGlyph, MarkGlyph, ComponentGlyph}; + +typedef struct { + DWORD Version; + WORD GlyphClassDef; + WORD AttachList; + WORD LigCaretList; + WORD MarkAttachClassDef; +} GDEF_Header; + +typedef struct { + WORD ClassFormat; + WORD StartGlyph; + WORD GlyphCount; + WORD ClassValueArray[1]; +} GDEF_ClassDefFormat1; + +typedef struct { + WORD Start; + WORD End; + WORD Class; +} GDEF_ClassRangeRecord; + +typedef struct { + WORD ClassFormat; + WORD ClassRangeCount; + GDEF_ClassRangeRecord ClassRangeRecord[1]; +} GDEF_ClassDefFormat2; + static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count); /* the orders of joined_forms and contextual_features need to line up */ @@ -894,6 +926,106 @@ static VOID *load_gsub_table(HDC hdc) return GSUB_Table; } +static WORD GDEF_get_glyph_class(const GDEF_Header *header, WORD glyph) +{ + int offset; + WORD class = 0; + const GDEF_ClassDefFormat1 *cf1; + + if (!header) + return 0; + + offset = GET_BE_WORD(header->GlyphClassDef); + if (!offset) + return 0; + + cf1 = (GDEF_ClassDefFormat1*)(((BYTE*)header)+offset); + if (GET_BE_WORD(cf1->ClassFormat) == 1) + { + if (glyph >= GET_BE_WORD(cf1->StartGlyph)) + { + int index = glyph - GET_BE_WORD(cf1->StartGlyph); + if (index < GET_BE_WORD(cf1->GlyphCount)) + class = GET_BE_WORD(cf1->ClassValueArray[index]); + } + } + else if (GET_BE_WORD(cf1->ClassFormat) == 2) + { + const GDEF_ClassDefFormat2 *cf2 = (GDEF_ClassDefFormat2*)cf1; + int i, top; + top = GET_BE_WORD(cf2->ClassRangeCount); + for (i = 0; i < top; i++) + { + if (glyph >= GET_BE_WORD(cf2->ClassRangeRecord[i].Start) && + glyph <= GET_BE_WORD(cf2->ClassRangeRecord[i].End)) + { + class = GET_BE_WORD(cf2->ClassRangeRecord[i].Class); + break; + } + } + } + else + ERR("Unknown Class Format %i\n",GET_BE_WORD(cf1->ClassFormat)); + + return class; +} + +static VOID *load_gdef_table(HDC hdc) +{ + VOID* GDEF_Table = NULL; + int length = GetFontData(hdc, GDEF_TAG , 0, NULL, 0); + if (length != GDI_ERROR) + { + GDEF_Table = HeapAlloc(GetProcessHeap(),0,length); + GetFontData(hdc, GDEF_TAG , 0, GDEF_Table, length); + TRACE("Loaded GDEF table of %i bytes\n",length); + } + return GDEF_Table; +} + +static void GDEF_UpdateGlyphProps(HDC hdc, const WORD *pwGlyphs, const WORD cGlyphs, WORD* pwLogClust, SCRIPT_GLYPHPROP *pGlyphProp) +{ + VOID* header = load_gdef_table(hdc); + int i; + + for (i = 0; i < cGlyphs; i++) + { + WORD class; + + class = GDEF_get_glyph_class(header, pwGlyphs[i]); + + switch (class) + { + case 0: + case BaseGlyph: + pGlyphProp[i].sva.fClusterStart = 1; + pGlyphProp[i].sva.fDiacritic = 0; + pGlyphProp[i].sva.fZeroWidth = 0; + break; + case LigatureGlyph: + pGlyphProp[i].sva.fClusterStart = 1; + pGlyphProp[i].sva.fDiacritic = 0; + pGlyphProp[i].sva.fZeroWidth = 0; + break; + case MarkGlyph: + pGlyphProp[i].sva.fClusterStart = 0; + pGlyphProp[i].sva.fDiacritic = 1; + pGlyphProp[i].sva.fZeroWidth = 1; + break; + case ComponentGlyph: + pGlyphProp[i].sva.fClusterStart = 0; + pGlyphProp[i].sva.fDiacritic = 0; + pGlyphProp[i].sva.fZeroWidth = 0; + break; + default: + ERR("Unknown glyph class %i\n",class); + pGlyphProp[i].sva.fClusterStart = 1; + pGlyphProp[i].sva.fDiacritic = 0; + pGlyphProp[i].sva.fZeroWidth = 0; + } + } +} + static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int chars, WORD* pwLogClust ) { if (changeCount == 0) @@ -1351,6 +1483,8 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS else pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; } + + GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); } void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
1
0
0
0
Aric Stewart : usp10: Add default glyph properties proc.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: c7e42c05a5cb1b0ea76f034aafc382d5483b17a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7e42c05a5cb1b0ea76f034aa…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:28 2011 -0500 usp10: Add default glyph properties proc. --- dlls/usp10/shape.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 8838050..c587ca7 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -47,6 +47,8 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, const WCHAR*, const INT, const WORD*, const INT, WORD*, SCRIPT_CHARPROP*, SCRIPT_GLYPHPROP*); +static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp); + extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -1317,10 +1319,46 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS HeapFree(GetProcessHeap(),0,context_shape); } +static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp) +{ + int i,k; + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + + for (k = 0; k < cChars; k++) + { + if (pwLogClust[k] == i) + { + char_index[char_count] = k; + char_count++; + } + } + + if (char_count == 0) + { + FIXME("No chars in this glyph? Must be an error\n"); + continue; + } + + if (char_count ==1 && pwcChars[char_index[0]] == 0x0020) /* space */ + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_BLANK; + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; + } +} + void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) { if (ShapingData[psa->eScript].charGlyphPropProc) ShapingData[psa->eScript].charGlyphPropProc(hdc, psc, psa, pwcChars, cChars, pwGlyphs, cGlyphs, pwLogClust, pCharProp, pGlyphProp); + else + ShapeCharGlyphProp_Default(hdc, psc, psa, pwcChars, cChars, pwGlyphs, cGlyphs, pwLogClust, pCharProp, pGlyphProp); } void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
1
0
0
0
Aric Stewart : usp10: Framework for determing glyph properties after shaping.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: d26bdd9121876c9d4aaf40ac022cbe57dc95420b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d26bdd9121876c9d4aaf40ac0…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 23 11:41:57 2011 -0500 usp10: Framework for determing glyph properties after shaping. --- dlls/usp10/shape.c | 66 ++++++++++++++++++++++++------------------ dlls/usp10/usp10.c | 1 + dlls/usp10/usp10_internal.h | 1 + include/usp10.h | 2 +- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 0afb7aa..8838050 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -44,6 +44,9 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p static void ContextualShape_Syriac(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust); static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust); + +typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, const WCHAR*, const INT, const WORD*, const INT, WORD*, SCRIPT_CHARPROP*, SCRIPT_GLYPHPROP*); + extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -332,39 +335,40 @@ static const char* required_lao_features[] = }; typedef struct ScriptShapeDataTag { - TEXTRANGE_PROPERTIES defaultTextRange; - const char** requiredFeatures; - CHAR otTag[5]; - ContextualShapingProc contextProc; + TEXTRANGE_PROPERTIES defaultTextRange; + const char** requiredFeatures; + CHAR otTag[5]; + ContextualShapingProc contextProc; + ShapeCharGlyphPropProc charGlyphPropProc; } ScriptShapeData; /* in order of scripts */ static const ScriptShapeData ShapingData[] = { - {{ standard_features, 2}, NULL, "", NULL}, - {{ standard_features, 2}, NULL, "latn", NULL}, - {{ standard_features, 2}, NULL, "latn", NULL}, - {{ standard_features, 2}, NULL, "latn", NULL}, - {{ standard_features, 2}, NULL, "" , NULL}, - {{ standard_features, 2}, NULL, "latn", NULL}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic}, - {{ hebrew_features, 1}, NULL, "hebr", NULL}, - {{ syriac_features, 4}, required_syriac_features, "syrc", ContextualShape_Syriac}, - {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic}, - {{ NULL, 0}, NULL, "thaa", NULL}, - {{ standard_features, 2}, NULL, "grek", NULL}, - {{ standard_features, 2}, NULL, "cyrl", NULL}, - {{ standard_features, 2}, NULL, "armn", NULL}, - {{ standard_features, 2}, NULL, "geor", NULL}, - {{ sinhala_features, 7}, NULL, "sinh", NULL}, - {{ tibetan_features, 2}, NULL, "tibt", NULL}, - {{ tibetan_features, 2}, NULL, "tibt", NULL}, - {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa}, - {{ thai_features, 1}, NULL, "thai", NULL}, - {{ thai_features, 1}, NULL, "thai", NULL}, - {{ thai_features, 1}, required_lao_features, "lao", NULL}, - {{ thai_features, 1}, required_lao_features, "lao", NULL}, + {{ standard_features, 2}, NULL, "", NULL, NULL}, + {{ standard_features, 2}, NULL, "latn", NULL, NULL}, + {{ standard_features, 2}, NULL, "latn", NULL, NULL}, + {{ standard_features, 2}, NULL, "latn", NULL, NULL}, + {{ standard_features, 2}, NULL, "" , NULL, NULL}, + {{ standard_features, 2}, NULL, "latn", NULL, NULL}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, + {{ hebrew_features, 1}, NULL, "hebr", NULL, NULL}, + {{ syriac_features, 4}, required_syriac_features, "syrc", ContextualShape_Syriac, NULL}, + {{ arabic_features, 6}, required_arabic_features, "arab", ContextualShape_Arabic, NULL}, + {{ NULL, 0}, NULL, "thaa", NULL, NULL}, + {{ standard_features, 2}, NULL, "grek", NULL, NULL}, + {{ standard_features, 2}, NULL, "cyrl", NULL, NULL}, + {{ standard_features, 2}, NULL, "armn", NULL, NULL}, + {{ standard_features, 2}, NULL, "geor", NULL, NULL}, + {{ sinhala_features, 7}, NULL, "sinh", NULL, NULL}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, NULL}, + {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa, NULL}, + {{ thai_features, 1}, NULL, "thai", NULL, NULL}, + {{ thai_features, 1}, NULL, "thai", NULL, NULL}, + {{ thai_features, 1}, required_lao_features, "lao", NULL, NULL}, + {{ thai_features, 1}, required_lao_features, "lao", NULL, NULL}, }; static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) @@ -1313,6 +1317,12 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS HeapFree(GetProcessHeap(),0,context_shape); } +void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) +{ + if (ShapingData[psa->eScript].charGlyphPropProc) + ShapingData[psa->eScript].charGlyphPropProc(hdc, psc, psa, pwcChars, cChars, pwGlyphs, cGlyphs, pwLogClust, pCharProp, pGlyphProp); +} + void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust) { if (ShapingData[psa->eScript].contextProc) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 97f73a75..0ab9ab9 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1589,6 +1589,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, { SHAPE_ContextualShaping(hdc, (ScriptCache *)*psc, psa, rChars, cChars, pwOutGlyphs, pcGlyphs, cMaxGlyphs, pwLogClust); SHAPE_ApplyDefaultOpentypeFeatures(hdc, (ScriptCache *)*psc, psa, pwOutGlyphs, pcGlyphs, cMaxGlyphs, cChars, pwLogClust); + SHAPE_CharGlyphProp(hdc, (ScriptCache *)*psc, psa, pwcChars, cChars, pwOutGlyphs, *pcGlyphs, pwLogClust, pCharProps, pOutGlyphProps); } heap_free(rChars); } diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index a61e56e..f6df10a 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -85,3 +85,4 @@ INT BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust); void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, INT cChars, WORD *pwLogClust); HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa); +void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp); diff --git a/include/usp10.h b/include/usp10.h index 1940176..e84eeb7 100644 --- a/include/usp10.h +++ b/include/usp10.h @@ -86,7 +86,7 @@ typedef enum tag_SCRIPT_JUSTIFY { SCRIPT_JUSTIFY_ARABIC_BA = 12, SCRIPT_JUSTIFY_ARABIC_BARA = 13, SCRIPT_JUSTIFY_ARABIC_SEEN = 14, - SCRIPT_JUSTIFY_RESERVED4 = 15, + SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15, } SCRIPT_JUSTIFY; typedef struct tag_SCRIPT_CONTROL {
1
0
0
0
André Hentschel : user32/tests: Add tests for FlashWindowEx.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 7c8ce6c6e471caa59e22b1afe744e4e4787d8065 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c8ce6c6e471caa59e22b1afe…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon May 23 21:15:06 2011 +0200 user32/tests: Add tests for FlashWindowEx. --- dlls/user32/tests/win.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 93 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 278a282..00512ba 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -56,6 +56,7 @@ static int (WINAPI *pGetWindowRgnBox)(HWND,LPRECT); static BOOL (WINAPI *pGetGUIThreadInfo)(DWORD, GUITHREADINFO*); static BOOL (WINAPI *pGetProcessDefaultLayout)( DWORD *layout ); static BOOL (WINAPI *pSetProcessDefaultLayout)( DWORD layout ); +static BOOL (WINAPI *pFlashWindowEx)( PFLASHWINFO pfwi ); static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); static DWORD (WINAPI *pGetLayout)(HDC hdc); static BOOL (WINAPI *pMirrorRgn)(HWND hwnd, HRGN hrgn); @@ -6446,6 +6447,96 @@ static void test_rtl_layout(void) DestroyWindow( parent ); } +static void test_FlashWindowEx(void) +{ + HWND hwnd; + FLASHWINFO finfo; + BOOL ret; + + if (!pFlashWindowEx) + { + win_skip( "FlashWindowEx not supported\n" ); + return; + } + + hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP, + 0, 0, 0, 0, 0, 0, 0, NULL ); + ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + + finfo.cbSize = sizeof(FLASHWINFO); + finfo.dwFlags = FLASHW_TIMER; + finfo.uCount = 3; + finfo.dwTimeout = 200; + finfo.hwnd = NULL; + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "FlashWindowEx returned with %d\n", GetLastError()); + + finfo.hwnd = hwnd; + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(NULL); + todo_wine ok(!ret && GetLastError() == ERROR_NOACCESS, + "FlashWindowEx returned with %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret, "FlashWindowEx succeeded\n"); + + finfo.cbSize = sizeof(FLASHWINFO) - 1; + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret && GetLastError()==ERROR_INVALID_PARAMETER, + "FlashWindowEx succeeded\n"); + + finfo.cbSize = sizeof(FLASHWINFO) + 1; + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret && GetLastError()==ERROR_INVALID_PARAMETER, + "FlashWindowEx succeeded\n"); + finfo.cbSize = sizeof(FLASHWINFO); + + DestroyWindow( hwnd ); + + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "FlashWindowEx returned with %d\n", GetLastError()); + + ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); + ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); + ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); + ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); + ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); + + hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_VISIBLE | WS_POPUPWINDOW, + 0, 0, 0, 0, 0, 0, 0, NULL ); + ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + finfo.hwnd = hwnd; + + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(NULL); + todo_wine ok(!ret && GetLastError() == ERROR_NOACCESS, + "FlashWindowEx returned with %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + todo_wine ok(!ret, "FlashWindowEx succeeded\n"); + + ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); + ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); + ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); + ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); + ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); + + finfo.dwFlags = FLASHW_STOP; + SetLastError(0xdeadbeef); + ret = pFlashWindowEx(&finfo); + ok(ret, "FlashWindowEx failed with %d\n", GetLastError()); + + DestroyWindow( hwnd ); +} + static void test_FindWindowEx(void) { HWND hwnd, found; @@ -6518,6 +6609,7 @@ START_TEST(win) pGetGUIThreadInfo = (void *)GetProcAddress( user32, "GetGUIThreadInfo" ); pGetProcessDefaultLayout = (void *)GetProcAddress( user32, "GetProcessDefaultLayout" ); pSetProcessDefaultLayout = (void *)GetProcAddress( user32, "SetProcessDefaultLayout" ); + pFlashWindowEx = (void *)GetProcAddress( user32, "FlashWindowEx" ); pGetLayout = (void *)GetProcAddress( gdi32, "GetLayout" ); pSetLayout = (void *)GetProcAddress( gdi32, "SetLayout" ); pMirrorRgn = (void *)GetProcAddress( gdi32, "MirrorRgn" ); @@ -6562,6 +6654,7 @@ START_TEST(win) test_capture_3(hwndMain, hwndMain2); test_capture_4(); test_rtl_layout(); + test_FlashWindowEx(); test_CreateWindow(); test_parent_owner();
1
0
0
0
André Hentschel : mscoree/tests: Fix for the results in CreateConfigStream tests.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: b426a9a0848a95f2ad63b9a32897571f8da47e7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b426a9a0848a95f2ad63b9a32…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon May 23 21:14:34 2011 +0200 mscoree/tests: Fix for the results in CreateConfigStream tests. --- dlls/mscoree/tests/mscoree.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index f80dbb4..308db41 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -287,13 +287,14 @@ static void test_createconfigstream(void) GetFullPathNameW(file, MAX_PATH, path, NULL); hr = pCreateConfigStream(NULL, &stream); - todo_wine ok(hr == E_FAIL, "CreateConfigStream returned %x\n", hr); + todo_wine ok(hr == E_FAIL || broken(hr == ERROR_PROC_NOT_FOUND), /* some WinXP, Win2K3 and Win7 */ + "CreateConfigStream returned %x\n", hr); hr = pCreateConfigStream(path, NULL); - todo_wine ok(hr == E_POINTER, "CreateConfigStream returned %x\n", hr); + todo_wine ok(hr == COR_E_NULLREFERENCE, "CreateConfigStream returned %x\n", hr); hr = pCreateConfigStream(NULL, NULL); - todo_wine ok(hr == E_POINTER, "CreateConfigStream returned %x\n", hr); + todo_wine ok(hr == COR_E_NULLREFERENCE, "CreateConfigStream returned %x\n", hr); hr = pCreateConfigStream(nonexistent, &stream); todo_wine ok(hr == COR_E_FILENOTFOUND, "CreateConfigStream returned %x\n", hr);
1
0
0
0
Hans Leidekker : msi: Fix the font actions to revert components to the installed state during rollback .
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: df2df89dbd4bb67ff72302f1e9912341019bd0a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df2df89dbd4bb67ff72302f1e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue May 24 10:52:07 2011 +0200 msi: Fix the font actions to revert components to the installed state during rollback. --- dlls/msi/font.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dlls/msi/font.c b/dlls/msi/font.c index b5493a0..aea5702 100644 --- a/dlls/msi/font.c +++ b/dlls/msi/font.c @@ -207,6 +207,7 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param) LPWSTR name; LPCWSTR filename; MSIFILE *file; + MSICOMPONENT *comp; HKEY hkey1, hkey2; MSIRECORD *uirow; LPWSTR uipath, p; @@ -215,19 +216,19 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param) file = msi_get_loaded_file( package, filename ); if (!file) { - ERR("Unable to load file\n"); + WARN("unable to find file %s\n", debugstr_w(file->File)); return ERROR_SUCCESS; } - - if (!file->Component->Enabled) + comp = msi_get_loaded_component( package, file->Component->Component ); + if (!comp) { - TRACE("component is disabled\n"); + WARN("unable to find component %s\n", debugstr_w(comp->Component)); return ERROR_SUCCESS; } - - if (file->Component->ActionRequest != INSTALLSTATE_LOCAL) + comp->Action = msi_get_component_action( package, comp ); + if (comp->Action != INSTALLSTATE_LOCAL) { - TRACE("Component not scheduled for installation\n"); + TRACE("component not scheduled for installation %s\n", debugstr_w(comp->Component)); return ERROR_SUCCESS; } @@ -291,6 +292,7 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param ) LPWSTR name; LPCWSTR filename; MSIFILE *file; + MSICOMPONENT *comp; HKEY hkey1, hkey2; MSIRECORD *uirow; LPWSTR uipath, p; @@ -299,19 +301,19 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param ) file = msi_get_loaded_file( package, filename ); if (!file) { - ERR("Unable to load file\n"); + WARN("unable to find file %s\n", debugstr_w(file->File)); return ERROR_SUCCESS; } - - if (!file->Component->Enabled) + comp = msi_get_loaded_component( package, file->Component->Component ); + if (!comp) { - TRACE("component is disabled\n"); + WARN("unable to find component %s\n", debugstr_w(comp->Component)); return ERROR_SUCCESS; } - - if (file->Component->ActionRequest != INSTALLSTATE_ABSENT) + comp->Action = msi_get_component_action( package, comp ); + if (comp->Action != INSTALLSTATE_ABSENT) { - TRACE("Component not scheduled for removal\n"); + TRACE("component not scheduled for removal %s\n", debugstr_w(comp->Component)); return ERROR_SUCCESS; }
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
95
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
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200