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
c632f71e
Commit
c632f71e
authored
Jan 03, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Have load_GSUB_feature return LoadedFeature*.
parent
f04b6b2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
25 deletions
+19
-25
shape.c
dlls/usp10/shape.c
+19
-25
No files found.
dlls/usp10/shape.c
View file @
c632f71e
...
@@ -1159,7 +1159,7 @@ static OPENTYPE_TAG get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCac
...
@@ -1159,7 +1159,7 @@ static OPENTYPE_TAG get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCac
}
}
}
}
static
L
PCVOID
load_GSUB_feature
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
const
char
*
feat
)
static
L
oadedFeature
*
load_GSUB_feature
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
const
char
*
feat
)
{
{
LoadedFeature
*
feature
=
NULL
;
LoadedFeature
*
feature
=
NULL
;
...
@@ -1189,28 +1189,20 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
...
@@ -1189,28 +1189,20 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc
GSUB_GetFontFeatureTags
(
psc
,
MS_MAKE_TAG
(
'l'
,
'a'
,
't'
,
'n'
),
MS_MAKE_TAG
(
'd'
,
'f'
,
'l'
,
't'
),
FALSE
,
MS_MAKE_TAG
(
feat
[
0
],
feat
[
1
],
feat
[
2
],
feat
[
3
]),
1
,
&
tags
,
&
cTags
,
&
feature
);
GSUB_GetFontFeatureTags
(
psc
,
MS_MAKE_TAG
(
'l'
,
'a'
,
't'
,
'n'
),
MS_MAKE_TAG
(
'd'
,
'f'
,
'l'
,
't'
),
FALSE
,
MS_MAKE_TAG
(
feat
[
0
],
feat
[
1
],
feat
[
2
],
feat
[
3
]),
1
,
&
tags
,
&
cTags
,
&
feature
);
}
}
if
(
feature
)
TRACE
(
"Feature %s located at %p
\n
"
,
debugstr_an
(
feat
,
4
),
feature
);
{
return
feature
;
TRACE
(
"Feature %s located at %p
\n
"
,
debugstr_an
(
feat
,
4
),
feature
->
feature
);
return
feature
->
feature
;
}
else
{
TRACE
(
"Feature %s not located
\n
"
,
debugstr_an
(
feat
,
4
));
return
NULL
;
}
}
}
static
INT
apply_GSUB_feature_to_glyph
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
WORD
*
glyphs
,
INT
index
,
INT
write_dir
,
INT
*
glyph_count
,
const
char
*
feat
)
static
INT
apply_GSUB_feature_to_glyph
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
WORD
*
glyphs
,
INT
index
,
INT
write_dir
,
INT
*
glyph_count
,
const
char
*
feat
)
{
{
const
GSUB_
Feature
*
feature
;
Loaded
Feature
*
feature
;
feature
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
feat
);
feature
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
feat
);
if
(
!
feature
)
if
(
!
feature
)
return
GSUB_E_NOFEATURE
;
return
GSUB_E_NOFEATURE
;
TRACE
(
"applying feature %s
\n
"
,
feat
);
TRACE
(
"applying feature %s
\n
"
,
feat
);
return
GSUB_apply_feature_all_lookups
(
psc
->
GSUB_Table
,
feature
,
glyphs
,
index
,
write_dir
,
glyph_count
);
return
GSUB_apply_feature_all_lookups
(
psc
->
GSUB_Table
,
feature
->
feature
,
glyphs
,
index
,
write_dir
,
glyph_count
);
}
}
static
VOID
*
load_gsub_table
(
HDC
hdc
)
static
VOID
*
load_gsub_table
(
HDC
hdc
)
...
@@ -1477,14 +1469,16 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W
...
@@ -1477,14 +1469,16 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W
{
{
if
(
psc
->
GSUB_Table
)
if
(
psc
->
GSUB_Table
)
{
{
LoadedFeature
*
load_feature
;
const
GSUB_Feature
*
feature
;
const
GSUB_Feature
*
feature
;
const
GSUB_LookupList
*
lookup
;
const
GSUB_LookupList
*
lookup
;
const
GSUB_Header
*
header
=
psc
->
GSUB_Table
;
const
GSUB_Header
*
header
=
psc
->
GSUB_Table
;
int
lookup_index
,
lookup_count
;
int
lookup_index
,
lookup_count
;
feature
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
feat
);
load_
feature
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
feat
);
if
(
!
feature
)
if
(
!
load_
feature
)
return
GSUB_E_NOFEATURE
;
return
GSUB_E_NOFEATURE
;
feature
=
load_feature
->
feature
;
TRACE
(
"applying feature %s
\n
"
,
debugstr_an
(
feat
,
4
));
TRACE
(
"applying feature %s
\n
"
,
debugstr_an
(
feat
,
4
));
lookup
=
(
const
GSUB_LookupList
*
)((
const
BYTE
*
)
header
+
GET_BE_WORD
(
header
->
LookupList
));
lookup
=
(
const
GSUB_LookupList
*
)((
const
BYTE
*
)
header
+
GET_BE_WORD
(
header
->
LookupList
));
...
@@ -2195,7 +2189,7 @@ static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT i
...
@@ -2195,7 +2189,7 @@ static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT i
glyph_index
->
pref
+=
shift
;
glyph_index
->
pref
+=
shift
;
}
}
static
void
Apply_Indic_BasicForm
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwChars
,
INT
cChars
,
IndicSyllable
*
syllable
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
WORD
*
pwLogClust
,
lexical_function
lexical
,
IndicSyllable
*
glyph_index
,
const
GSUB_
Feature
*
feature
)
static
void
Apply_Indic_BasicForm
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwChars
,
INT
cChars
,
IndicSyllable
*
syllable
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
WORD
*
pwLogClust
,
lexical_function
lexical
,
IndicSyllable
*
glyph_index
,
Loaded
Feature
*
feature
)
{
{
int
index
=
glyph_index
->
start
;
int
index
=
glyph_index
->
start
;
...
@@ -2206,7 +2200,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps
...
@@ -2206,7 +2200,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps
{
{
INT
nextIndex
;
INT
nextIndex
;
INT
prevCount
=
*
pcGlyphs
;
INT
prevCount
=
*
pcGlyphs
;
nextIndex
=
GSUB_apply_feature_all_lookups
(
psc
->
GSUB_Table
,
feature
,
pwOutGlyphs
,
index
,
1
,
pcGlyphs
);
nextIndex
=
GSUB_apply_feature_all_lookups
(
psc
->
GSUB_Table
,
feature
->
feature
,
pwOutGlyphs
,
index
,
1
,
pcGlyphs
);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
{
{
UpdateClusters
(
nextIndex
,
*
pcGlyphs
-
prevCount
,
1
,
cChars
,
pwLogClust
);
UpdateClusters
(
nextIndex
,
*
pcGlyphs
-
prevCount
,
1
,
cChars
,
pwLogClust
);
...
@@ -2332,13 +2326,13 @@ static void ShapeIndicSyllables(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa,
...
@@ -2332,13 +2326,13 @@ static void ShapeIndicSyllables(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa,
{
{
int
c
;
int
c
;
int
overall_shift
=
0
;
int
overall_shift
=
0
;
const
GSUB_
Feature
*
locl
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"locl"
)
:
NULL
;
Loaded
Feature
*
locl
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"locl"
)
:
NULL
;
const
GSUB_
Feature
*
nukt
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"nukt"
);
Loaded
Feature
*
nukt
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"nukt"
);
const
GSUB_
Feature
*
akhn
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"akhn"
);
Loaded
Feature
*
akhn
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"akhn"
);
const
GSUB_
Feature
*
rkrf
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"rkrf"
)
:
NULL
;
Loaded
Feature
*
rkrf
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"rkrf"
)
:
NULL
;
const
GSUB_
Feature
*
pstf
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"pstf"
);
Loaded
Feature
*
pstf
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"pstf"
);
const
GSUB_
Feature
*
vatu
=
(
!
rkrf
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"vatu"
)
:
NULL
;
Loaded
Feature
*
vatu
=
(
!
rkrf
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"vatu"
)
:
NULL
;
const
GSUB_
Feature
*
cjct
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"cjct"
)
:
NULL
;
Loaded
Feature
*
cjct
=
(
modern
)
?
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"cjct"
)
:
NULL
;
BOOL
rphf
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"rphf"
)
!=
NULL
);
BOOL
rphf
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"rphf"
)
!=
NULL
);
BOOL
pref
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"pref"
)
!=
NULL
);
BOOL
pref
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"pref"
)
!=
NULL
);
BOOL
blwf
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"blwf"
)
!=
NULL
);
BOOL
blwf
=
(
load_GSUB_feature
(
hdc
,
psa
,
psc
,
"blwf"
)
!=
NULL
);
...
@@ -3592,7 +3586,7 @@ rpRangeProperties = &ShapingData[psa->eScript].defaultTextRange;
...
@@ -3592,7 +3586,7 @@ rpRangeProperties = &ShapingData[psa->eScript].defaultTextRange;
HRESULT
SHAPE_CheckFontForRequiredFeatures
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
)
HRESULT
SHAPE_CheckFontForRequiredFeatures
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
)
{
{
const
GSUB_
Feature
*
feature
;
Loaded
Feature
*
feature
;
int
i
;
int
i
;
if
(
!
ShapingData
[
psa
->
eScript
].
requiredFeatures
)
if
(
!
ShapingData
[
psa
->
eScript
].
requiredFeatures
)
...
...
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