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
59bdda00
Commit
59bdda00
authored
Sep 26, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement GetScriptProperties().
parent
db2e44a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
7 deletions
+41
-7
analyzer.c
dlls/dwrite/analyzer.c
+0
-0
scripts.h
dlls/dwrite/scripts.h
+2
-1
analyzer.c
dlls/dwrite/tests/analyzer.c
+33
-0
make_unicode
tools/make_unicode
+6
-6
No files found.
dlls/dwrite/analyzer.c
View file @
59bdda00
This diff is collapsed.
Click to expand it.
dlls/dwrite/scripts.h
View file @
59bdda00
...
...
@@ -4,7 +4,7 @@
enum
unicode_script_id
{
Script_Unknown
=
0
,
Script_Co
ntrol
=
1
,
Script_Co
mmon
=
1
,
Script_Arabic
=
2
,
Script_Armenian
=
3
,
Script_Avestan
=
4
,
...
...
@@ -128,4 +128,5 @@ enum unicode_script_id {
Script_Vai
=
122
,
Script_Warang_Citi
=
123
,
Script_Yi
=
124
,
Script_LastId
=
124
};
dlls/dwrite/tests/analyzer.c
View file @
59bdda00
...
...
@@ -908,6 +908,38 @@ static void test_AnalyzeLineBreakpoints(void)
IDWriteTextAnalyzer_Release
(
analyzer
);
}
static
void
test_GetScriptProperties
(
void
)
{
IDWriteTextAnalyzer1
*
analyzer1
;
IDWriteTextAnalyzer
*
analyzer
;
DWRITE_SCRIPT_ANALYSIS
sa
;
DWRITE_SCRIPT_PROPERTIES
props
;
HRESULT
hr
;
hr
=
IDWriteFactory_CreateTextAnalyzer
(
factory
,
&
analyzer
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextAnalyzer_QueryInterface
(
analyzer
,
&
IID_IDWriteTextAnalyzer1
,
(
void
**
)
&
analyzer1
);
IDWriteTextAnalyzer_Release
(
analyzer
);
if
(
hr
!=
S_OK
)
{
win_skip
(
"IDWriteTextAnalyzer1 is not supported.
\n
"
);
return
;
}
sa
.
script
=
1000
;
hr
=
IDWriteTextAnalyzer1_GetScriptProperties
(
analyzer1
,
sa
,
&
props
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
if
(
0
)
/* crashes on native */
hr
=
IDWriteTextAnalyzer1_GetScriptProperties
(
analyzer1
,
sa
,
NULL
);
sa
.
script
=
0
;
hr
=
IDWriteTextAnalyzer1_GetScriptProperties
(
analyzer1
,
sa
,
&
props
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteTextAnalyzer1_Release
(
analyzer1
);
}
START_TEST
(
analyzer
)
{
HRESULT
hr
;
...
...
@@ -925,6 +957,7 @@ START_TEST(analyzer)
test_AnalyzeScript
();
test_AnalyzeLineBreakpoints
();
test_GetScriptProperties
();
IDWriteFactory_Release
(
factory
);
}
tools/make_unicode
View file @
59bdda00
...
...
@@ -1301,7 +1301,7 @@ sub dump_scripts($)
my
$filename
=
shift
;
my
$header
=
$filename
;
my
@scripts_table
=
(
0
)
x
65536
;
# 0 means unknown script
my
$
next_group
=
0
;
my
$
script_index
;
my
%
scripts
;
my
$i
;
...
...
@@ -1335,10 +1335,9 @@ sub dump_scripts($)
$scripts
{
$type
}
=
-
1
;
}
$
i
=
2
;
$
script_index
=
1
;
foreach
my
$script
(
sort
keys
%
scripts
)
{
$scripts
{
$script
}
=
$i
;
$i
++
;
$scripts
{
$script
}
=
++
$script_index
;
}
# now fill a table
...
...
@@ -1382,14 +1381,15 @@ sub dump_scripts($)
print
OUTPUT
"/* generated from $UNIDATA/Scripts.txt */\n"
;
print
OUTPUT
"/* DO NOT EDIT!! */\n\n"
;
# reserve Unknown and Co
ntrol
ids
# reserve Unknown and Co
mmon
ids
print
OUTPUT
"enum unicode_script_id {\n"
;
print
OUTPUT
" Script_Unknown = 0,\n"
;
print
OUTPUT
" Script_Co
ntrol
= 1,\n"
;
print
OUTPUT
" Script_Co
mmon
= 1,\n"
;
foreach
my
$script
(
sort
keys
%
scripts
)
{
print
OUTPUT
" Script_$script = $scripts{$script},\n"
;
}
print
OUTPUT
" Script_LastId = $script_index\n"
;
print
OUTPUT
"};\n"
;
close
OUTPUT
;
...
...
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