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
c4c9f8b0
Commit
c4c9f8b0
authored
Dec 01, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Apply lookups in order over the whole range of glyphs instead of individually to each glyph.
parent
711dd9b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
shape.c
dlls/usp10/shape.c
+20
-10
No files found.
dlls/usp10/shape.c
View file @
c4c9f8b0
...
...
@@ -1027,7 +1027,7 @@ static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WO
return
GSUB_E_NOGLYPH
;
}
static
INT
GSUB_apply_feature
(
const
GSUB_Header
*
header
,
const
GSUB_Feature
*
feature
,
WORD
*
glyphs
,
INT
glyph_index
,
INT
write_dir
,
INT
*
glyph_count
)
static
INT
GSUB_apply_feature
_all_lookups
(
const
GSUB_Header
*
header
,
const
GSUB_Feature
*
feature
,
WORD
*
glyphs
,
INT
glyph_index
,
INT
write_dir
,
INT
*
glyph_count
)
{
int
i
;
int
out_index
=
GSUB_E_NOGLYPH
;
...
...
@@ -1047,7 +1047,7 @@ static INT GSUB_apply_feature(const GSUB_Header * header, const GSUB_Feature* fe
else
{
int
out2
;
out2
=
GSUB_apply_feature
(
header
,
feature
,
glyphs
,
glyph_index
,
write_dir
,
glyph_count
);
out2
=
GSUB_apply_feature
_all_lookups
(
header
,
feature
,
glyphs
,
glyph_index
,
write_dir
,
glyph_count
);
if
(
out2
!=
GSUB_E_NOGLYPH
)
out_index
=
out2
;
}
...
...
@@ -1171,7 +1171,7 @@ static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCach
return
GSUB_E_NOFEATURE
;
TRACE
(
"applying feature %s
\n
"
,
feat
);
return
GSUB_apply_feature
(
psc
->
GSUB_Table
,
feature
,
glyphs
,
index
,
write_dir
,
glyph_count
);
return
GSUB_apply_feature
_all_lookups
(
psc
->
GSUB_Table
,
feature
,
glyphs
,
index
,
write_dir
,
glyph_count
);
}
static
VOID
*
load_gsub_table
(
HDC
hdc
)
...
...
@@ -1419,23 +1419,32 @@ static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int ch
static
int
apply_GSUB_feature
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
WORD
*
pwOutGlyphs
,
int
write_dir
,
INT
*
pcGlyphs
,
INT
cChars
,
const
char
*
feat
,
WORD
*
pwLogClust
)
{
int
i
;
if
(
psc
->
GSUB_Table
)
{
const
GSUB_Feature
*
feature
;
const
GSUB_LookupList
*
lookup
;
const
GSUB_Header
*
header
=
psc
->
GSUB_Table
;
int
lookup_index
,
lookup_count
;
feature
=
load_GSUB_feature
(
hdc
,
psa
,
psc
,
feat
);
if
(
!
feature
)
return
GSUB_E_NOFEATURE
;
i
=
0
;
TRACE
(
"applying feature %s
\n
"
,
debugstr_an
(
feat
,
4
));
while
(
i
<
*
pcGlyphs
)
{
lookup
=
(
const
GSUB_LookupList
*
)((
const
BYTE
*
)
header
+
GET_BE_WORD
(
header
->
LookupList
));
lookup_count
=
GET_BE_WORD
(
feature
->
LookupCount
);
TRACE
(
"%i lookups
\n
"
,
lookup_count
);
for
(
lookup_index
=
0
;
lookup_index
<
lookup_count
;
lookup_index
++
)
{
int
i
;
i
=
0
;
TRACE
(
"applying lookup (%i/%i)
\n
"
,
lookup_index
,
lookup_count
);
while
(
i
<
*
pcGlyphs
)
{
INT
nextIndex
;
INT
prevCount
=
*
pcGlyphs
;
nextIndex
=
GSUB_apply_feature
(
psc
->
GSUB_Table
,
feature
,
pwOutGlyphs
,
i
,
write_dir
,
pcGlyphs
);
nextIndex
=
GSUB_apply_lookup
(
lookup
,
GET_BE_WORD
(
feature
->
LookupListIndex
[
lookup_index
]),
pwOutGlyphs
,
i
,
write_dir
,
pcGlyphs
);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
{
UpdateClusters
(
nextIndex
,
*
pcGlyphs
-
prevCount
,
write_dir
,
cChars
,
pwLogClust
);
...
...
@@ -1443,6 +1452,7 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W
}
else
i
++
;
}
}
return
*
pcGlyphs
;
}
...
...
@@ -2134,7 +2144,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps
{
INT
nextIndex
;
INT
prevCount
=
*
pcGlyphs
;
nextIndex
=
GSUB_apply_feature
(
psc
->
GSUB_Table
,
feature
,
pwOutGlyphs
,
index
,
1
,
pcGlyphs
);
nextIndex
=
GSUB_apply_feature
_all_lookups
(
psc
->
GSUB_Table
,
feature
,
pwOutGlyphs
,
index
,
1
,
pcGlyphs
);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
{
UpdateClusters
(
nextIndex
,
*
pcGlyphs
-
prevCount
,
1
,
cChars
,
pwLogClust
);
...
...
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