Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6d1d7eed
Commit
6d1d7eed
authored
Jan 24, 2013
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Add ShapeCharGlyphProp and ContextualShape for Control characters.
parent
8df64b85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
shape.c
dlls/usp10/shape.c
+36
-1
No files found.
dlls/usp10/shape.c
View file @
6d1d7eed
...
...
@@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
typedef
VOID
(
*
ContextualShapingProc
)(
HDC
,
ScriptCache
*
,
SCRIPT_ANALYSIS
*
,
WCHAR
*
,
INT
,
WORD
*
,
INT
*
,
INT
,
WORD
*
);
static
void
ContextualShape_Control
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Arabic
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Hebrew
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Syriac
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
...
...
@@ -64,6 +65,7 @@ static void ContextualShape_Mongolian(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
(
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_Control
(
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_Latin
(
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_Hebrew
(
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
);
...
...
@@ -457,7 +459,7 @@ static const ScriptShapeData ShapingData[] =
{{
latin_features
,
4
},
{
latin_gpos_features
,
3
},
NULL
,
0
,
NULL
,
ShapeCharGlyphProp_Latin
},
{{
latin_features
,
4
},
{
latin_gpos_features
,
3
},
NULL
,
0
,
NULL
,
ShapeCharGlyphProp_Latin
},
{{
latin_features
,
4
},
{
latin_gpos_features
,
3
},
NULL
,
0
,
NULL
,
ShapeCharGlyphProp_Latin
},
{{
standard_features
,
2
},
{
NULL
,
0
},
NULL
,
0
,
NULL
,
NULL
},
{{
standard_features
,
2
},
{
NULL
,
0
},
NULL
,
0
,
ContextualShape_Control
,
ShapeCharGlyphProp_Control
},
{{
latin_features
,
4
},
{
latin_gpos_features
,
3
},
NULL
,
0
,
NULL
,
ShapeCharGlyphProp_Latin
},
{{
arabic_features
,
6
},
{
arabic_gpos_features
,
4
},
required_arabic_features
,
0
,
ContextualShape_Arabic
,
ShapeCharGlyphProp_Arabic
},
{{
arabic_features
,
6
},
{
arabic_gpos_features
,
4
},
required_arabic_features
,
0
,
ContextualShape_Arabic
,
ShapeCharGlyphProp_Arabic
},
...
...
@@ -941,6 +943,23 @@ static void mark_invalid_combinations(HDC hdc, const WCHAR* pwcChars, INT cChars
HeapFree
(
GetProcessHeap
(),
0
,
context_type
);
}
static
void
ContextualShape_Control
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
)
{
int
i
;
for
(
i
=
0
;
i
<
cChars
;
i
++
)
{
switch
(
pwcChars
[
i
])
{
case
0x000D
:
pwOutGlyphs
[
i
]
=
psc
->
sfp
.
wgBlank
;
break
;
default:
if
(
pwcChars
[
i
]
<
0x1C
)
pwOutGlyphs
[
i
]
=
psc
->
sfp
.
wgDefault
;
else
pwOutGlyphs
[
i
]
=
psc
->
sfp
.
wgBlank
;
}
}
}
static
WCHAR
neighbour_char
(
int
i
,
int
delta
,
const
WCHAR
*
chars
,
INT
cchLen
)
{
if
(
i
+
delta
<
0
)
...
...
@@ -2843,6 +2862,22 @@ static void ShapeCharGlyphProp_Latin( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_NONE
;
}
static
void
ShapeCharGlyphProp_Control
(
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
;
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
pGlyphProp
[
i
].
sva
.
fClusterStart
=
1
;
pGlyphProp
[
i
].
sva
.
fDiacritic
=
0
;
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_BLANK
;
if
(
pwGlyphs
[
i
]
==
psc
->
sfp
.
wgDefault
)
pGlyphProp
[
i
].
sva
.
fZeroWidth
=
0
;
else
pGlyphProp
[
i
].
sva
.
fZeroWidth
=
1
;
}
}
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
;
...
...
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