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
2fe60ff6
Commit
2fe60ff6
authored
Nov 20, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Nov 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Windows breaks punctuation into 2 different script types.
parent
71440868
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
shape.c
dlls/usp10/shape.c
+1
-0
usp10.c
dlls/usp10/tests/usp10.c
+11
-0
usp10.c
dlls/usp10/usp10.c
+10
-1
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
No files found.
dlls/usp10/shape.c
View file @
2fe60ff6
...
...
@@ -583,6 +583,7 @@ static const ScriptShapeData ShapingData[] =
{{
devanagari_features
,
6
},
required_telugu_features
,
"mlym"
,
"mlm2"
,
ContextualShape_Malayalam
,
ShapeCharGlyphProp_Malayalam
},
{{
devanagari_features
,
6
},
required_telugu_features
,
"mlym"
,
"mlm2"
,
ContextualShape_Malayalam
,
ShapeCharGlyphProp_Malayalam
},
{{
standard_features
,
2
},
NULL
,
""
,
""
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
""
,
NULL
,
NULL
},
};
static
INT
GSUB_is_glyph_covered
(
LPCVOID
table
,
UINT
glyph
)
...
...
dlls/usp10/tests/usp10.c
View file @
2fe60ff6
...
...
@@ -285,6 +285,13 @@ static void test_ScriptItemize( void )
static
const
WCHAR
test21
[]
=
{
0x0710
,
0x0712
,
0x0308
,
0x0712
,
0x0714
,
0
};
static
const
itemTest
t211
[
2
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
syrc_tag
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
,
-
1
,
FALSE
}};
/* Latin Punctuation */
static
const
WCHAR
test22
[]
=
{
'#'
,
'$'
,
','
,
'!'
,
'\"'
,
'*'
,
0
};
static
const
itemTest
t221
[
3
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
latn_tag
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
3
,
0
,
0
,
0
,
0
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
6
,
0
,
0
,
0
,
-
1
,
FALSE
}};
static
const
itemTest
t222
[
3
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
latn_tag
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
3
,
1
,
1
,
1
,
0
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
6
,
0
,
0
,
0
,
-
1
,
FALSE
}};
static
const
itemTest
t223
[
2
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
latn_tag
,
FALSE
},{{
0
,
0
,
0
,
0
,
0
},
6
,
0
,
0
,
0
,
-
1
,
FALSE
}};
SCRIPT_ITEM
items
[
15
];
SCRIPT_CONTROL
Control
;
SCRIPT_STATE
State
;
...
...
@@ -339,6 +346,7 @@ static void test_ScriptItemize( void )
test_items_ok
(
test19
,
6
,
NULL
,
NULL
,
1
,
t191
,
FALSE
,
0
);
test_items_ok
(
test20
,
5
,
NULL
,
NULL
,
2
,
t201
,
FALSE
,
0
);
test_items_ok
(
test21
,
5
,
NULL
,
NULL
,
1
,
t211
,
FALSE
,
0
);
test_items_ok
(
test22
,
6
,
NULL
,
NULL
,
2
,
t221
,
FALSE
,
0
);
State
.
uBidiLevel
=
0
;
test_items_ok
(
test1
,
4
,
&
Control
,
&
State
,
1
,
t11
,
FALSE
,
0
);
...
...
@@ -367,6 +375,7 @@ static void test_ScriptItemize( void )
test_items_ok
(
test19
,
6
,
&
Control
,
&
State
,
1
,
t191
,
FALSE
,
0
);
test_items_ok
(
test20
,
5
,
&
Control
,
&
State
,
2
,
t201
,
FALSE
,
0
);
test_items_ok
(
test21
,
5
,
&
Control
,
&
State
,
1
,
t211
,
FALSE
,
0
);
test_items_ok
(
test22
,
6
,
&
Control
,
&
State
,
2
,
t221
,
FALSE
,
0
);
State
.
uBidiLevel
=
1
;
test_items_ok
(
test1
,
4
,
&
Control
,
&
State
,
1
,
t12
,
FALSE
,
0
);
...
...
@@ -395,6 +404,7 @@ static void test_ScriptItemize( void )
test_items_ok
(
test19
,
6
,
&
Control
,
&
State
,
1
,
t192
,
FALSE
,
0
);
test_items_ok
(
test20
,
5
,
&
Control
,
&
State
,
2
,
t202
,
FALSE
,
0
);
test_items_ok
(
test21
,
5
,
&
Control
,
&
State
,
1
,
t211
,
FALSE
,
0
);
test_items_ok
(
test22
,
6
,
&
Control
,
&
State
,
2
,
t222
,
FALSE
,
1
);
State
.
uBidiLevel
=
1
;
Control
.
fMergeNeutralItems
=
TRUE
;
...
...
@@ -424,6 +434,7 @@ static void test_ScriptItemize( void )
test_items_ok
(
test19
,
6
,
&
Control
,
&
State
,
1
,
t192
,
FALSE
,
0
);
test_items_ok
(
test20
,
5
,
&
Control
,
&
State
,
2
,
t202
,
FALSE
,
0
);
test_items_ok
(
test21
,
5
,
&
Control
,
&
State
,
1
,
t211
,
FALSE
,
0
);
test_items_ok
(
test22
,
6
,
&
Control
,
&
State
,
1
,
t223
,
FALSE
,
2
);
}
static
inline
void
_test_shape_ok
(
int
valid
,
HDC
hdc
,
LPCWSTR
string
,
...
...
dlls/usp10/usp10.c
View file @
2fe60ff6
...
...
@@ -362,6 +362,10 @@ static const scriptData scriptInformation[] = {
{
LANG_ENGLISH
,
0
,
1
,
0
,
1
,
ANSI_CHARSET
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
0
,
0
},
0x00000000
,
{
0
}},
{{
Script_Punctuation2
,
0
,
0
,
0
,
0
,
0
,
0
,
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}},
{
LANG_ENGLISH
,
0
,
0
,
0
,
0
,
ANSI_CHARSET
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
MS_MAKE_TAG
(
'l'
,
'a'
,
't'
,
'n'
),
{
0
}},
};
static
const
SCRIPT_PROPERTIES
*
script_props
[]
=
...
...
@@ -522,14 +526,19 @@ static WCHAR mirror_char( WCHAR ch )
static
WORD
get_char_script
(
WCHAR
ch
)
{
static
const
WCHAR
latin_punc
[]
=
{
'#'
,
'$'
,
'&'
,
'\''
,
','
,
';'
,
'<'
,
'>'
,
'?'
,
'@'
,
'\\'
,
'^'
,
'_'
,
'`'
,
'{'
,
'|'
,
'}'
,
'~'
,
0x00a0
,
0
};
WORD
type
=
0
;
int
i
;
if
(
ch
==
0xc
||
ch
==
0x20
||
ch
==
0x202f
)
return
Script_CR
;
/* These punctuation are seperated out as Latin punctuation */
if
(
strchrW
(
latin_punc
,
ch
))
return
Script_Punctuation2
;
/* These chars are itemized as Punctuation by Windows */
if
(
ch
==
0x2212
||
ch
==
0x2044
||
ch
==
0x00a0
)
if
(
ch
==
0x2212
||
ch
==
0x2044
)
return
Script_Punctuation
;
GetStringTypeW
(
CT_CTYPE1
,
&
ch
,
1
,
&
type
);
...
...
dlls/usp10/usp10_internal.h
View file @
2fe60ff6
...
...
@@ -73,6 +73,7 @@
#define Script_Malayalam_Numeric 43
/* More supplemental */
#define Script_Diacritical 44
#define Script_Punctuation2 45
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
...
...
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