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
a27e03bf
Commit
a27e03bf
authored
May 21, 2010
by
Aric Stewart
Committed by
Alexandre Julliard
May 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Use font chartype only as a fallback if we do not know the characters script already.
parent
264d2737
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
shape.c
dlls/usp10/shape.c
+23
-7
No files found.
dlls/usp10/shape.c
View file @
a27e03bf
...
...
@@ -347,13 +347,29 @@ static UINT GSUB_apply_feature(const GSUB_Header * header, const GSUB_Feature* f
return
glyph
;
}
static
const
char
*
get_opentype_script
(
HDC
hdc
)
static
const
char
*
get_opentype_script
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
)
{
UINT
charset
;
switch
(
psa
->
eScript
)
{
case
Script_Arabic
:
return
"arab"
;
case
Script_Syriac
:
return
"syrc"
;
case
Script_Hebrew
:
return
"hebr"
;
case
Script_Latin
:
case
Script_Numeric
:
case
Script_CR
:
case
Script_LF
:
return
"latn"
;
}
/*
*
I am not sure if this is the correct way to generate our script tag
*
fall back to the font charset
*/
UINT
charset
=
GetTextCharsetInfo
(
hdc
,
NULL
,
0x0
);
charset
=
GetTextCharsetInfo
(
hdc
,
NULL
,
0x0
);
switch
(
charset
)
{
case
ANSI_CHARSET
:
return
"latn"
;
...
...
@@ -375,7 +391,7 @@ static const char* get_opentype_script(HDC hdc)
}
}
static
WORD
get_GSUB_feature_glyph
(
HDC
hdc
,
void
*
GSUB_Table
,
UINT
glyph
,
const
char
*
feat
)
static
WORD
get_GSUB_feature_glyph
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
void
*
GSUB_Table
,
UINT
glyph
,
const
char
*
feat
)
{
const
GSUB_Header
*
header
;
const
GSUB_Script
*
script
;
...
...
@@ -387,7 +403,7 @@ static WORD get_GSUB_feature_glyph(HDC hdc, void* GSUB_Table, UINT glyph, const
header
=
GSUB_Table
;
script
=
GSUB_get_script_table
(
header
,
get_opentype_script
(
hdc
));
script
=
GSUB_get_script_table
(
header
,
get_opentype_script
(
hdc
,
psa
));
if
(
!
script
)
{
TRACE
(
"Script not found
\n
"
);
...
...
@@ -509,7 +525,7 @@ void SHAPE_ShapeArabicGlyphs(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WC
WORD
newGlyph
=
pwOutGlyphs
[
i
];
if
(
psc
->
GSUB_Table
)
newGlyph
=
get_GSUB_feature_glyph
(
hdc
,
psc
->
GSUB_Table
,
pwOutGlyphs
[
i
],
contextual_features
[
context_shape
[
i
]]);
newGlyph
=
get_GSUB_feature_glyph
(
hdc
,
ps
a
,
ps
c
->
GSUB_Table
,
pwOutGlyphs
[
i
],
contextual_features
[
context_shape
[
i
]]);
if
(
newGlyph
==
pwOutGlyphs
[
i
]
&&
pwcChars
[
i
]
>=
FIRST_ARABIC_CHAR
&&
pwcChars
[
i
]
<=
LAST_ARABIC_CHAR
)
{
/* fall back to presentation form B */
...
...
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