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
71373552
Commit
71373552
authored
Dec 29, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Replace GSUB_get_script_table with GSUB_GetFontScriptTags.
parent
1090cd2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
30 deletions
+20
-30
shape.c
dlls/usp10/shape.c
+20
-30
No files found.
dlls/usp10/shape.c
View file @
71373552
...
@@ -347,6 +347,7 @@ typedef struct {
...
@@ -347,6 +347,7 @@ typedef struct {
}
CMAP_SegmentedCoverage
;
}
CMAP_SegmentedCoverage
;
static
INT
GSUB_apply_lookup
(
const
GSUB_LookupList
*
lookup
,
INT
lookup_index
,
WORD
*
glyphs
,
INT
glyph_index
,
INT
write_dir
,
INT
*
glyph_count
);
static
INT
GSUB_apply_lookup
(
const
GSUB_LookupList
*
lookup
,
INT
lookup_index
,
WORD
*
glyphs
,
INT
glyph_index
,
INT
write_dir
,
INT
*
glyph_count
);
static
HRESULT
GSUB_GetFontScriptTags
(
ScriptCache
*
psc
,
OPENTYPE_TAG
searchingFor
,
int
cMaxTags
,
OPENTYPE_TAG
*
pScriptTags
,
int
*
pcTags
,
LPCVOID
*
script_table
);
typedef
struct
tagVowelComponents
typedef
struct
tagVowelComponents
{
{
...
@@ -764,30 +765,6 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
...
@@ -764,30 +765,6 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
return
-
1
;
return
-
1
;
}
}
static
const
GSUB_Script
*
GSUB_get_script_table
(
const
GSUB_Header
*
header
,
const
char
*
tag
)
{
const
GSUB_ScriptList
*
script
;
const
GSUB_Script
*
deflt
=
NULL
;
int
i
;
script
=
(
const
GSUB_ScriptList
*
)((
const
BYTE
*
)
header
+
GET_BE_WORD
(
header
->
ScriptList
));
TRACE
(
"%i scripts in this font
\n
"
,
GET_BE_WORD
(
script
->
ScriptCount
));
for
(
i
=
0
;
i
<
GET_BE_WORD
(
script
->
ScriptCount
);
i
++
)
{
const
GSUB_Script
*
scr
;
int
offset
;
offset
=
GET_BE_WORD
(
script
->
ScriptRecord
[
i
].
Script
);
scr
=
(
const
GSUB_Script
*
)((
const
BYTE
*
)
script
+
offset
);
if
(
strncmp
(
script
->
ScriptRecord
[
i
].
ScriptTag
,
tag
,
4
)
==
0
)
return
scr
;
if
(
strncmp
(
script
->
ScriptRecord
[
i
].
ScriptTag
,
"dflt"
,
4
)
==
0
)
deflt
=
scr
;
}
return
deflt
;
}
static
const
GSUB_LangSys
*
GSUB_get_lang_table
(
const
GSUB_Script
*
script
,
const
char
*
tag
)
static
const
GSUB_LangSys
*
GSUB_get_lang_table
(
const
GSUB_Script
*
script
,
const
char
*
tag
)
{
{
int
i
;
int
i
;
...
@@ -1242,15 +1219,22 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
...
@@ -1242,15 +1219,22 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
if
(
psc
->
GSUB_Table
)
if
(
psc
->
GSUB_Table
)
{
{
const
GSUB_Script
*
script
;
const
GSUB_Script
*
script
=
NULL
;
const
GSUB_LangSys
*
language
;
const
GSUB_LangSys
*
language
;
int
attempt
=
2
;
int
attempt
=
2
;
OPENTYPE_TAG
scriptTags
;
int
cTags
;
HRESULT
hr
;
do
do
{
{
script
=
GSUB_get_script_table
(
psc
->
GSUB_Table
,
get_opentype_script
(
hdc
,
psa
,
psc
,(
attempt
==
2
)));
const
char
*
tag
;
tag
=
get_opentype_script
(
hdc
,
psa
,
psc
,(
attempt
==
2
));
hr
=
GSUB_GetFontScriptTags
(
psc
,
MS_MAKE_TAG
(
tag
[
0
],
tag
[
1
],
tag
[
2
],
tag
[
3
]),
1
,
&
scriptTags
,
&
cTags
,
(
LPCVOID
*
)
&
script
);
attempt
--
;
attempt
--
;
if
(
script
)
if
(
SUCCEEDED
(
hr
)
&&
cTags
&&
script
)
{
{
if
(
psc
->
userLang
!=
0
)
if
(
psc
->
userLang
!=
0
)
language
=
GSUB_get_lang_table
(
script
,(
char
*
)
&
psc
->
userLang
);
language
=
GSUB_get_lang_table
(
script
,(
char
*
)
&
psc
->
userLang
);
...
@@ -1264,8 +1248,8 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
...
@@ -1264,8 +1248,8 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
/* try in the default (latin) table */
/* try in the default (latin) table */
if
(
!
feature
)
if
(
!
feature
)
{
{
script
=
GSUB_get_script_table
(
psc
->
GSUB_Table
,
"latn"
);
hr
=
GSUB_GetFontScriptTags
(
psc
,
MS_MAKE_TAG
(
'l'
,
'a'
,
't'
,
'n'
),
1
,
&
scriptTags
,
&
cTags
,
(
LPCVOID
*
)
&
script
);
if
(
script
)
if
(
SUCCEEDED
(
hr
)
&&
script
)
{
{
language
=
GSUB_get_lang_table
(
script
,
"xxxx"
);
/* Need to get Lang tag */
language
=
GSUB_get_lang_table
(
script
,
"xxxx"
);
/* Need to get Lang tag */
if
(
language
)
if
(
language
)
...
@@ -1609,7 +1593,13 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W
...
@@ -1609,7 +1593,13 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W
static
inline
BOOL
get_GSUB_Indic2
(
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
)
static
inline
BOOL
get_GSUB_Indic2
(
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
)
{
{
return
(
GSUB_get_script_table
(
psc
->
GSUB_Table
,
ShapingData
[
psa
->
eScript
].
newOtTag
)
!=
NULL
);
OPENTYPE_TAG
tag
;
HRESULT
hr
;
int
count
=
0
;
hr
=
GSUB_GetFontScriptTags
(
psc
,
MS_MAKE_TAG
(
ShapingData
[
psa
->
eScript
].
newOtTag
[
0
],
ShapingData
[
psa
->
eScript
].
newOtTag
[
1
],
ShapingData
[
psa
->
eScript
].
newOtTag
[
2
],
ShapingData
[
psa
->
eScript
].
newOtTag
[
3
]),
1
,
&
tag
,
&
count
,
NULL
);
return
(
SUCCEEDED
(
hr
));
}
}
static
WCHAR
neighbour_char
(
int
i
,
int
delta
,
const
WCHAR
*
chars
,
INT
cchLen
)
static
WCHAR
neighbour_char
(
int
i
,
int
delta
,
const
WCHAR
*
chars
,
INT
cchLen
)
...
...
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