Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Baby Joey
wine
Commits
71373552
Commit
71373552
authored
13 years ago
by
Aric Stewart
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
usp10: Replace GSUB_get_script_table with GSUB_GetFontScriptTags.
parent
1090cd2f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/usp10/shape.c
+20
-30
20 additions, 30 deletions
dlls/usp10/shape.c
with
20 additions
and
30 deletions
dlls/usp10/shape.c
+
20
−
30
View file @
71373552
...
...
@@ -347,6 +347,7 @@ typedef struct {
}
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
HRESULT
GSUB_GetFontScriptTags
(
ScriptCache
*
psc
,
OPENTYPE_TAG
searchingFor
,
int
cMaxTags
,
OPENTYPE_TAG
*
pScriptTags
,
int
*
pcTags
,
LPCVOID
*
script_table
);
typedef
struct
tagVowelComponents
{
...
...
@@ -764,30 +765,6 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
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
)
{
int
i
;
...
...
@@ -1242,15 +1219,22 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
if
(
psc
->
GSUB_Table
)
{
const
GSUB_Script
*
script
;
const
GSUB_Script
*
script
=
NULL
;
const
GSUB_LangSys
*
language
;
int
attempt
=
2
;
OPENTYPE_TAG
scriptTags
;
int
cTags
;
HRESULT
hr
;
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
--
;
if
(
script
)
if
(
SUCCEEDED
(
hr
)
&&
cTags
&&
script
)
{
if
(
psc
->
userLang
!=
0
)
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
/* try in the default (latin) table */
if
(
!
feature
)
{
script
=
GSUB_
g
et
_script_table
(
psc
->
GSUB_Table
,
"latn"
);
if
(
script
)
hr
=
GSUB_
G
et
FontScriptTags
(
psc
,
MS_MAKE_TAG
(
'l'
,
'a'
,
't'
,
'n'
),
1
,
&
scriptTags
,
&
cTags
,
(
LPCVOID
*
)
&
script
);
if
(
SUCCEEDED
(
hr
)
&&
script
)
{
language
=
GSUB_get_lang_table
(
script
,
"xxxx"
);
/* Need to get Lang tag */
if
(
language
)
...
...
@@ -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
)
{
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment