Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
953c7a34
Commit
953c7a34
authored
May 23, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
May 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Determine glyph properties after shaping for scripts with no justification.
parent
9dd70020
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
shape.c
dlls/usp10/shape.c
+41
-4
No files found.
dlls/usp10/shape.c
View file @
953c7a34
...
@@ -50,6 +50,7 @@ typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, co
...
@@ -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_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_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_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_table
[];
extern
const
unsigned
short
wine_shaping_forms
[
LAST_ARABIC_CHAR
-
FIRST_ARABIC_CHAR
+
1
][
4
];
extern
const
unsigned
short
wine_shaping_forms
[
LAST_ARABIC_CHAR
-
FIRST_ARABIC_CHAR
+
1
][
4
];
...
@@ -390,16 +391,16 @@ static const ScriptShapeData ShapingData[] =
...
@@ -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
},
{{
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
},
{{
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
},
{{
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
,
"grek"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"cyrl"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"cyrl"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"armn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"armn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"geor"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"geor"
,
NULL
,
NULL
},
{{
sinhala_features
,
7
},
NULL
,
"sinh"
,
NULL
,
NULL
},
{{
sinhala_features
,
7
},
NULL
,
"sinh"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
ShapeCharGlyphProp_None
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
ShapeCharGlyphProp_None
},
{{
tibetan_features
,
2
},
NULL
,
"phag"
,
ContextualShape_Phags_pa
,
ShapeCharGlyphProp_Thai
},
{{
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
},
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
...
@@ -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
)
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
)
if
(
ShapingData
[
psa
->
eScript
].
charGlyphPropProc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment