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
9d408bbb
Commit
9d408bbb
authored
Jul 16, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Load the GPOS table.
parent
61895680
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
20 deletions
+33
-20
shape.c
dlls/usp10/shape.c
+31
-20
usp10.c
dlls/usp10/usp10.c
+1
-0
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
No files found.
dlls/usp10/shape.c
View file @
9d408bbb
...
...
@@ -603,6 +603,27 @@ static VOID *load_gsub_table(HDC hdc)
return
GSUB_Table
;
}
static
VOID
*
load_gpos_table
(
HDC
hdc
)
{
VOID
*
GPOS_Table
=
NULL
;
int
length
=
GetFontData
(
hdc
,
MS_MAKE_TAG
(
'G'
,
'P'
,
'O'
,
'S'
),
0
,
NULL
,
0
);
if
(
length
!=
GDI_ERROR
)
{
GPOS_Table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
length
);
GetFontData
(
hdc
,
MS_MAKE_TAG
(
'G'
,
'P'
,
'O'
,
'S'
),
0
,
GPOS_Table
,
length
);
TRACE
(
"Loaded GPOS table of %i bytes
\n
"
,
length
);
}
return
GPOS_Table
;
}
static
VOID
load_ot_tables
(
HDC
hdc
,
ScriptCache
*
psc
)
{
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
if
(
!
psc
->
GPOS_Table
)
psc
->
GPOS_Table
=
load_gpos_table
(
hdc
);
}
INT
SHAPE_does_GSUB_feature_apply_to_chars
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
const
WCHAR
*
chars
,
INT
write_dir
,
INT
count
,
const
char
*
feature
)
{
WORD
*
glyphs
;
...
...
@@ -957,8 +978,7 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
dirL
=
1
;
}
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
context_type
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cChars
);
context_shape
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INT
)
*
cChars
);
...
...
@@ -1179,8 +1199,7 @@ static void ContextualShape_Syriac(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
dirL
=
1
;
}
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
!
psc
->
GSUB_Table
)
return
;
...
...
@@ -1314,8 +1333,7 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
dirL
=
1
;
}
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
!
psc
->
GSUB_Table
)
return
;
...
...
@@ -2650,8 +2668,7 @@ static void ContextualShape_Mongolian(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
else
dirL
=
1
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
!
psc
->
GSUB_Table
)
return
;
...
...
@@ -3153,8 +3170,7 @@ void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const
void
SHAPE_ContextualShaping
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
)
{
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
ShapingData
[
psa
->
eScript
].
contextProc
)
ShapingData
[
psa
->
eScript
].
contextProc
(
hdc
,
psc
,
psa
,
pwcChars
,
cChars
,
pwOutGlyphs
,
pcGlyphs
,
cMaxGlyphs
,
pwLogClust
);
...
...
@@ -3168,8 +3184,7 @@ static void SHAPE_ApplyOpenTypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYS
if
(
!
rpRangeProperties
)
return
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
!
psc
->
GSUB_Table
)
return
;
...
...
@@ -3202,8 +3217,7 @@ HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANA
if
(
!
ShapingData
[
psa
->
eScript
].
requiredFeatures
)
return
S_OK
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
/* we need to have at least one of the required features */
i
=
0
;
...
...
@@ -3225,8 +3239,7 @@ HRESULT SHAPE_GetFontScriptTags( HDC hdc, ScriptCache *psc,
HRESULT
hr
;
OPENTYPE_TAG
searching
=
0x00000000
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
psa
&&
scriptInformation
[
psa
->
eScript
].
scriptTag
)
searching
=
scriptInformation
[
psa
->
eScript
].
scriptTag
;
...
...
@@ -3246,8 +3259,7 @@ HRESULT SHAPE_GetFontLanguageTags( HDC hdc, ScriptCache *psc,
OPENTYPE_TAG
searching
=
0x00000000
;
BOOL
fellback
=
FALSE
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
psa
&&
psc
->
userLang
!=
0
)
searching
=
psc
->
userLang
;
...
...
@@ -3274,8 +3286,7 @@ HRESULT SHAPE_GetFontFeatureTags( HDC hdc, ScriptCache *psc,
HRESULT
hr
;
BOOL
filter
=
FALSE
;
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
load_ot_tables
(
hdc
,
psc
);
if
(
psa
&&
scriptInformation
[
psa
->
eScript
].
scriptTag
)
{
...
...
dlls/usp10/usp10.c
View file @
9d408bbb
...
...
@@ -984,6 +984,7 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GSUB_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GDEF_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
CMAP_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GPOS_Table
);
for
(
i
=
0
;
i
<
((
ScriptCache
*
)
*
psc
)
->
script_count
;
i
++
)
{
int
j
;
...
...
dlls/usp10/usp10_internal.h
View file @
9d408bbb
...
...
@@ -164,6 +164,7 @@ typedef struct {
LPVOID
GDEF_Table
;
LPVOID
CMAP_Table
;
LPVOID
CMAP_format12_Table
;
LPVOID
GPOS_Table
;
INT
script_count
;
LoadedScript
*
scripts
;
...
...
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