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
7fbf72c4
Commit
7fbf72c4
authored
Jun 04, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Correct glyph caching beyond the BMP.
parent
0133683c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
usp10.c
dlls/usp10/usp10.c
+18
-5
usp10_internal.h
dlls/usp10/usp10_internal.h
+5
-1
No files found.
dlls/usp10/usp10.c
View file @
7fbf72c4
...
...
@@ -746,18 +746,24 @@ static inline BYTE get_cache_pitch_family(SCRIPT_CACHE *psc)
static
inline
WORD
get_cache_glyph
(
SCRIPT_CACHE
*
psc
,
DWORD
c
)
{
WORD
*
block
=
((
ScriptCache
*
)
*
psc
)
->
glyphs
[
c
>>
GLYPH_BLOCK_SHIFT
];
CacheGlyphPage
*
page
=
((
ScriptCache
*
)
*
psc
)
->
page
[
c
/
0x10000
];
WORD
*
block
;
if
(
!
page
)
return
0
;
block
=
page
->
glyphs
[(
c
%
0x10000
)
>>
GLYPH_BLOCK_SHIFT
];
if
(
!
block
)
return
0
;
return
block
[
c
&
GLYPH_BLOCK_MASK
];
return
block
[
(
c
%
0x10000
)
&
GLYPH_BLOCK_MASK
];
}
static
inline
WORD
set_cache_glyph
(
SCRIPT_CACHE
*
psc
,
WCHAR
c
,
WORD
glyph
)
{
WORD
**
block
=
&
((
ScriptCache
*
)
*
psc
)
->
glyphs
[
c
>>
GLYPH_BLOCK_SHIFT
];
CacheGlyphPage
**
page
=
&
((
ScriptCache
*
)
*
psc
)
->
page
[
c
/
0x10000
];
WORD
**
block
;
if
(
!*
page
&&
!
(
*
page
=
heap_alloc_zero
(
sizeof
(
CacheGlyphPage
))))
return
0
;
block
=
&
(
*
page
)
->
glyphs
[(
c
%
0x10000
)
>>
GLYPH_BLOCK_SHIFT
];
if
(
!*
block
&&
!
(
*
block
=
heap_alloc_zero
(
sizeof
(
WORD
)
*
GLYPH_BLOCK_SIZE
)))
return
0
;
return
((
*
block
)[
c
&
GLYPH_BLOCK_MASK
]
=
glyph
);
return
((
*
block
)[
(
c
%
0x10000
)
&
GLYPH_BLOCK_MASK
]
=
glyph
);
}
static
inline
BOOL
get_cache_glyph_widths
(
SCRIPT_CACHE
*
psc
,
WORD
glyph
,
ABC
*
abc
)
...
...
@@ -965,9 +971,16 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
unsigned
int
i
;
for
(
i
=
0
;
i
<
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
;
i
++
)
{
heap_free
(((
ScriptCache
*
)
*
psc
)
->
glyphs
[
i
]);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
widths
[
i
]);
}
for
(
i
=
0
;
i
<
0x10
;
i
++
)
{
int
j
;
if
(((
ScriptCache
*
)
*
psc
)
->
page
[
i
])
for
(
j
=
0
;
j
<
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
;
j
++
)
heap_free
(((
ScriptCache
*
)
*
psc
)
->
page
[
i
]
->
glyphs
[
j
]);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
page
[
i
]);
}
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GSUB_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
GDEF_Table
);
heap_free
(((
ScriptCache
*
)
*
psc
)
->
CMAP_Table
);
...
...
dlls/usp10/usp10_internal.h
View file @
7fbf72c4
...
...
@@ -151,10 +151,14 @@ typedef struct {
}
LoadedScript
;
typedef
struct
{
WORD
*
glyphs
[
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
];
}
CacheGlyphPage
;
typedef
struct
{
LOGFONTW
lf
;
TEXTMETRICW
tm
;
BOOL
sfnt
;
WORD
*
glyphs
[
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
];
CacheGlyphPage
*
page
[
0x10
];
ABC
*
widths
[
GLYPH_MAX
/
GLYPH_BLOCK_SIZE
];
LPVOID
GSUB_Table
;
LPVOID
GDEF_Table
;
...
...
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