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
5ad2f6e1
Commit
5ad2f6e1
authored
May 27, 2010
by
Aric Stewart
Committed by
Alexandre Julliard
May 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Break out a function to apply a GSUB feature to an entire string of glyphs.
parent
fd5e732a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
16 deletions
+52
-16
shape.c
dlls/usp10/shape.c
+52
-16
No files found.
dlls/usp10/shape.c
View file @
5ad2f6e1
...
...
@@ -549,6 +549,57 @@ static VOID *load_gsub_table(HDC hdc)
return
GSUB_Table
;
}
static
int
apply_GSUB_feature
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
void
*
GSUB_Table
,
WORD
*
pwOutGlyphs
,
int
write_dir
,
INT
*
pcGlyphs
,
const
char
*
feat
)
{
int
i
;
if
(
GSUB_Table
)
{
const
GSUB_Header
*
header
;
const
GSUB_Script
*
script
;
const
GSUB_LangSys
*
language
;
const
GSUB_Feature
*
feature
;
if
(
!
GSUB_Table
)
return
GSUB_E_NOFEATURE
;
header
=
GSUB_Table
;
script
=
GSUB_get_script_table
(
header
,
get_opentype_script
(
hdc
,
psa
));
if
(
!
script
)
{
TRACE
(
"Script not found
\n
"
);
return
GSUB_E_NOFEATURE
;
}
language
=
GSUB_get_lang_table
(
script
,
"xxxx"
);
if
(
!
language
)
{
TRACE
(
"Language not found
\n
"
);
return
GSUB_E_NOFEATURE
;
}
feature
=
GSUB_get_feature
(
header
,
language
,
feat
);
if
(
!
feature
)
{
TRACE
(
"%s feature not found
\n
"
,
feat
);
return
GSUB_E_NOFEATURE
;
}
i
=
0
;
TRACE
(
"applying feature %s
\n
"
,
feat
);
while
(
i
<
*
pcGlyphs
)
{
INT
nextIndex
;
nextIndex
=
GSUB_apply_feature
(
header
,
feature
,
pwOutGlyphs
,
i
,
write_dir
,
pcGlyphs
);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
i
=
nextIndex
;
else
i
++
;
}
return
*
pcGlyphs
;
}
return
GSUB_E_NOFEATURE
;
}
static
CHAR
neighbour_joining_type
(
int
i
,
int
delta
,
const
CHAR
*
context_type
,
INT
cchLen
,
SCRIPT_ANALYSIS
*
psa
)
{
if
(
i
+
delta
<
0
)
...
...
@@ -668,22 +719,7 @@ void SHAPE_ShapeArabicGlyphs(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WC
}
}
/* Required ligature substitution */
if
(
psc
->
GSUB_Table
)
{
i
=
0
;
while
(
i
<
*
pcGlyphs
)
{
INT
nextIndex
;
nextIndex
=
apply_GSUB_feature_to_glyph
(
hdc
,
psa
,
psc
->
GSUB_Table
,
pwOutGlyphs
,
i
,
dirL
,
pcGlyphs
,
"rlig"
);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
i
=
nextIndex
;
else
if
(
nextIndex
==
GSUB_E_NOFEATURE
)
break
;
else
i
++
;
}
}
apply_GSUB_feature
(
hdc
,
psa
,
psc
->
GSUB_Table
,
pwOutGlyphs
,
dirL
,
pcGlyphs
,
"rlig"
);
HeapFree
(
GetProcessHeap
(),
0
,
context_shape
);
HeapFree
(
GetProcessHeap
(),
0
,
context_type
);
...
...
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