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
368bc8aa
Commit
368bc8aa
authored
Oct 31, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Support for Armenian, Hebrew and complete Arabic ranges.
parent
602807c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
analyzer.c
dlls/dwrite/analyzer.c
+7
-1
analyzer.c
dlls/dwrite/tests/analyzer.c
+28
-1
No files found.
dlls/dwrite/analyzer.c
View file @
368bc8aa
...
...
@@ -29,10 +29,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
enum
scriptcode
{
Script_Arabic
=
0
,
Script_Armenian
=
1
,
Script_C1Controls
=
12
,
Script_Coptic
=
13
,
Script_Cyrillic
=
16
,
Script_Greek
=
23
,
Script_Hebrew
=
29
,
Script_Latin
=
38
,
Script_Symbol
=
77
,
Script_Unknown
=
(
UINT16
)
-
1
...
...
@@ -79,8 +81,12 @@ static const struct script_range script_ranges[] = {
/* Cyrillic Supplement range is incomplete cause it's based on Unicode 5.2
that doesn't define some Abkhaz and Azerbaijani letters, we support Unicode 6.0 range here */
{
Script_Cyrillic
,
0x400
,
0x52f
},
/* Armenian: U+0530–U+058F */
{
Script_Armenian
,
0x530
,
0x58f
},
/* Hebrew: U+0590–U+05FF */
{
Script_Hebrew
,
0x590
,
0x5ff
},
/* Arabic: U+0600–U+06FF */
{
Script_Arabic
,
0x600
,
0x6
e
f
},
{
Script_Arabic
,
0x600
,
0x6
f
f
},
/* unsupported range */
{
Script_Unknown
}
};
...
...
dlls/dwrite/tests/analyzer.c
View file @
368bc8aa
...
...
@@ -391,17 +391,19 @@ static IDWriteTextAnalysisSourceVtbl analysissourcevtbl = {
static
IDWriteTextAnalysisSource
analysissource
=
{
&
analysissourcevtbl
};
struct
sa_test
{
const
WCHAR
string
[
2
0
];
const
WCHAR
string
[
5
0
];
int
item_count
;
struct
script_analysis
sa
[
10
];
};
enum
scriptcode
{
Script_Arabic
=
0
,
Script_Armenian
=
1
,
Script_C1Controls
=
12
,
Script_Coptic
=
13
,
Script_Cyrillic
=
16
,
Script_Greek
=
23
,
Script_Hebrew
=
29
,
Script_Latin
=
38
,
Script_Symbol
=
77
};
...
...
@@ -435,6 +437,14 @@ static struct sa_test sa_tests[] = {
{
{
0
,
7
,
{
Script_Arabic
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
{
/* Arabic */
{
0x0627
,
0x0644
,
0x0635
,
0x0651
,
0x0650
,
0x062d
,
0x0629
,
0x064f
,
' '
,
0x062a
,
0x064e
,
0x0627
,
0x062c
,
0x064c
,
' '
,
0x0639
,
0x064e
,
0x0644
,
0x0649
,
' '
,
0x0631
,
0x064f
,
0x0624
,
0x0648
,
0x0633
,
0x0650
,
' '
,
0x0627
,
0x0644
,
0x0623
,
0x0635
,
0x0650
,
0x062d
,
0x0651
,
0x064e
,
0x0627
,
0x0621
,
0x0650
,
0x06f0
,
0x06f5
,
0
},
1
,
{
{
0
,
40
,
{
Script_Arabic
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
{
/* Arabic, Latin */
{
'1'
,
'2'
,
'3'
,
'-'
,
'5'
,
'2'
,
0x064a
,
0x064f
,
0x0633
,
0x0627
,
0x0648
,
0x0650
,
0x064a
,
'7'
,
'1'
,
'.'
,
0
},
1
,
{
{
0
,
16
,
{
Script_Arabic
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
...
...
@@ -505,6 +515,23 @@ static struct sa_test sa_tests[] = {
{
0x400
,
0x40f
,
0x410
,
0x44f
,
0x450
,
0x45f
,
0x460
,
0x481
,
0x48a
,
0x4f0
,
0x4fa
,
0x4ff
,
0x500
,
0x510
,
0x520
,
0
},
1
,
{
{
0
,
15
,
{
Script_Cyrillic
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
{
/* Armenian */
{
0x531
,
0x540
,
0x559
,
0x55f
,
0x570
,
0x589
,
0x58a
,
0
},
1
,
{
{
0
,
7
,
{
Script_Armenian
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
{
/* Hebrew */
{
0x5e9
,
0x5dc
,
0x5d5
,
0x5dd
,
0
},
1
,
{
{
0
,
4
,
{
Script_Hebrew
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
{
/* Hebrew */
{
'p'
,
'a'
,
'r'
,
't'
,
' '
,
'o'
,
'n'
,
'e'
,
' '
,
0x5d7
,
0x5dc
,
0x5e7
,
' '
,
0x5e9
,
0x5ea
,
0x5d9
,
0x5d9
,
0x5dd
,
' '
,
'p'
,
'a'
,
'r'
,
't'
,
' '
,
't'
,
'h'
,
'r'
,
'e'
,
'e'
,
0
},
3
,
{
{
0
,
9
,
{
Script_Latin
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
},
{
9
,
10
,
{
Script_Hebrew
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
},
{
19
,
10
,
{
Script_Latin
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}}
},
/* keep this as end marker */
{
{
0
}
}
};
...
...
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