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
90d673e9
Commit
90d673e9
authored
Jun 07, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Store the GDEF table in the script cache.
To avoid reloading it all the time.
parent
90cf60c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
shape.c
dlls/usp10/shape.c
+10
-10
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 @
90d673e9
...
...
@@ -1281,16 +1281,18 @@ static VOID *load_gdef_table(HDC hdc)
return
GDEF_Table
;
}
static
void
GDEF_UpdateGlyphProps
(
HDC
hdc
,
const
WORD
*
pwGlyphs
,
const
WORD
cGlyphs
,
WORD
*
pwLogClust
,
SCRIPT_GLYPHPROP
*
pGlyphProp
)
static
void
GDEF_UpdateGlyphProps
(
HDC
hdc
,
ScriptCache
*
psc
,
const
WORD
*
pwGlyphs
,
const
WORD
cGlyphs
,
WORD
*
pwLogClust
,
SCRIPT_GLYPHPROP
*
pGlyphProp
)
{
VOID
*
header
=
load_gdef_table
(
hdc
);
int
i
;
if
(
!
psc
->
GDEF_Table
)
psc
->
GDEF_Table
=
load_gdef_table
(
hdc
);
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
WORD
class
;
class
=
GDEF_get_glyph_class
(
header
,
pwGlyphs
[
i
]);
class
=
GDEF_get_glyph_class
(
psc
->
GDEF_Table
,
pwGlyphs
[
i
]);
switch
(
class
)
{
...
...
@@ -1322,8 +1324,6 @@ static void GDEF_UpdateGlyphProps(HDC hdc, const WORD *pwGlyphs, const WORD cGly
pGlyphProp
[
i
].
sva
.
fZeroWidth
=
0
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
header
);
}
static
void
UpdateClustersFromGlyphProp
(
const
int
cGlyphs
,
const
int
cChars
,
WORD
*
pwLogClust
,
SCRIPT_GLYPHPROP
*
pGlyphProp
)
...
...
@@ -2656,7 +2656,7 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_CHARACTER
;
}
GDEF_UpdateGlyphProps
(
hdc
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
GDEF_UpdateGlyphProps
(
hdc
,
p
sc
,
p
wGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
}
...
...
@@ -2770,7 +2770,7 @@ static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSI
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_NONE
;
}
GDEF_UpdateGlyphProps
(
hdc
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
GDEF_UpdateGlyphProps
(
hdc
,
p
sc
,
p
wGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
HeapFree
(
GetProcessHeap
(),
0
,
spaces
);
}
...
...
@@ -2838,7 +2838,7 @@ static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
}
HeapFree
(
GetProcessHeap
(),
0
,
spaces
);
GDEF_UpdateGlyphProps
(
hdc
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
GDEF_UpdateGlyphProps
(
hdc
,
p
sc
,
p
wGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
/* Do not allow justification between marks and their base */
...
...
@@ -2881,7 +2881,7 @@ static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS*
else
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_NONE
;
}
GDEF_UpdateGlyphProps
(
hdc
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
GDEF_UpdateGlyphProps
(
hdc
,
p
sc
,
p
wGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
}
...
...
@@ -2917,7 +2917,7 @@ static void ShapeCharGlyphProp_Tibet( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS
else
pGlyphProp
[
i
].
sva
.
uJustification
=
SCRIPT_JUSTIFY_NONE
;
}
GDEF_UpdateGlyphProps
(
hdc
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
GDEF_UpdateGlyphProps
(
hdc
,
p
sc
,
p
wGlyphs
,
cGlyphs
,
pwLogClust
,
pGlyphProp
);
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
/* Tibeten script does not set sva.fDiacritic or sva.fZeroWidth */
...
...
dlls/usp10/usp10.c
View file @
90d673e9
...
...
@@ -514,6 +514,7 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
heap_free
(((
ScriptCache
*
)
*
psc
)
->
widths
[
i
]);
}
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GSUB_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GDEF_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
features
);
heap_free
(
*
psc
);
*
psc
=
NULL
;
...
...
dlls/usp10/usp10_internal.h
View file @
90d673e9
...
...
@@ -88,6 +88,7 @@ typedef struct {
WORD
*
glyphs
[
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
];
ABC
*
widths
[
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
];
LPVOID
GSUB_Table
;
LPVOID
GDEF_Table
;
INT
feature_count
;
LoadedFeature
*
features
;
...
...
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