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
29abc7f1
Commit
29abc7f1
authored
Jul 04, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Keep original script for NO_VISUAL case.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c38be910
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
analyzer.c
dlls/dwrite/analyzer.c
+4
-3
analyzer.c
dlls/dwrite/tests/analyzer.c
+51
-1
No files found.
dlls/dwrite/analyzer.c
View file @
29abc7f1
...
@@ -249,7 +249,8 @@ static HRESULT analyze_script(const WCHAR *text, UINT32 position, UINT32 length,
...
@@ -249,7 +249,8 @@ static HRESULT analyze_script(const WCHAR *text, UINT32 position, UINT32 length,
DWRITE_SCRIPT_ANALYSIS
sa
;
DWRITE_SCRIPT_ANALYSIS
sa
;
UINT32
pos
,
i
,
seq_length
;
UINT32
pos
,
i
,
seq_length
;
if
(
!
length
)
return
S_OK
;
if
(
!
length
)
return
S_OK
;
sa
=
get_char_sa
(
*
text
);
sa
=
get_char_sa
(
*
text
);
...
@@ -268,11 +269,11 @@ static HRESULT analyze_script(const WCHAR *text, UINT32 position, UINT32 length,
...
@@ -268,11 +269,11 @@ static HRESULT analyze_script(const WCHAR *text, UINT32 position, UINT32 length,
case
Script_Common
:
case
Script_Common
:
if
(
cur_sa
.
script
==
Script_Unknown
)
if
(
cur_sa
.
script
==
Script_Unknown
)
cur_sa
.
script
=
sa
.
script
;
cur_sa
.
script
=
sa
.
script
;
else
if
(
cur_sa
.
script
!=
Script_Common
)
else
if
(
(
cur_sa
.
script
!=
Script_Common
)
&&
sa
.
shapes
==
DWRITE_SCRIPT_SHAPES_DEFAULT
)
sa
.
script
=
cur_sa
.
script
;
sa
.
script
=
cur_sa
.
script
;
break
;
break
;
default:
default:
if
(
cur_sa
.
script
==
Script_Unknown
||
cur_sa
.
script
==
Script_Commo
n
)
if
(
(
cur_sa
.
script
==
Script_Common
&&
cur_sa
.
shapes
==
DWRITE_SCRIPT_SHAPES_DEFAULT
)
||
cur_sa
.
script
==
Script_Unknow
n
)
cur_sa
.
script
=
sa
.
script
;
cur_sa
.
script
=
sa
.
script
;
}
}
...
...
dlls/dwrite/tests/analyzer.c
View file @
29abc7f1
...
@@ -906,7 +906,57 @@ static struct sa_test sa_tests[] = {
...
@@ -906,7 +906,57 @@ static struct sa_test sa_tests[] = {
{
2
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
2
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
4
,
2
,
DWRITE_SCRIPT_SHAPES_NO_VISUAL
}
}
{
4
,
2
,
DWRITE_SCRIPT_SHAPES_NO_VISUAL
}
}
},
},
/* keep this as end marker */
{
/* Inherited on its own */
{
0x300
,
0x300
,
0
},
1
,
{
{
0
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
/* Inherited followed by Latin */
{
0x300
,
0x300
,
'a'
,
0
},
1
,
{
{
0
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
/* Inherited mixed with Arabic and Latin */
{
0x300
,
'+'
,
0x627
,
0x300
,
'a'
,
0
},
2
,
{
{
0
,
4
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
4
,
1
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
{
'a'
,
0x300
,
'+'
,
0x627
,
0x300
,
')'
,
'a'
,
0
},
3
,
{
{
0
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
3
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
6
,
1
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
/* Paired punctuation */
{
{
0x627
,
'('
,
'a'
,
')'
,
'a'
,
0
},
2
,
{
{
0
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
2
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
{
0x627
,
'['
,
'a'
,
']'
,
0x627
,
0
},
3
,
{
{
0
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
2
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
},
{
4
,
1
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
/* Combining marks */
{
/* dotted circle - Common, followed by accent - Inherited */
{
0x25cc
,
0x300
,
0
},
1
,
{
{
0
,
2
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
/* combining mark with explicit script value */
{
0x25cc
,
0x300
,
0x5c4
,
0
},
1
,
{
{
0
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
{
/* inherited merges with following explicit script */
{
0x25cc
,
0x300
,
'a'
,
0
},
1
,
{
{
0
,
3
,
DWRITE_SCRIPT_SHAPES_DEFAULT
}
}
},
/* keep this as end test data marker */
{
{
0
}
}
{
{
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