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
23b3299c
Commit
23b3299c
authored
Jan 03, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Make the script cache accessible from a string analysis.
parent
140a610e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
17 deletions
+7
-17
usp10.c
dlls/usp10/usp10.c
+7
-17
No files found.
dlls/usp10/usp10.c
View file @
23b3299c
...
...
@@ -159,7 +159,7 @@ typedef struct {
typedef
struct
{
BOOL
invalid
;
HDC
hd
c
;
ScriptCache
*
s
c
;
int
cItems
;
int
cMaxGlyphs
;
SCRIPT_ITEM
*
pItem
;
...
...
@@ -517,9 +517,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
{
HRESULT
hr
;
StringAnalysis
*
analysis
;
int
numItemizedItems
;
int
i
;
SCRIPT_CACHE
*
sc
=
0
;
int
i
,
numItemizedItems
=
255
;
TRACE
(
"(%p,%p,%d,%d,%d,0x%x,%d,%p,%p,%p,%p,%p,%p)
\n
"
,
hdc
,
pString
,
cString
,
cGlyphs
,
iCharset
,
dwFlags
,
...
...
@@ -534,8 +532,6 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
analysis
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
StringAnalysis
));
analysis
->
hdc
=
hdc
;
numItemizedItems
=
255
;
analysis
->
pItem
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
numItemizedItems
*
sizeof
(
SCRIPT_ITEM
)
+
1
);
...
...
@@ -556,10 +552,10 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
analysis
->
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
StringGlyphs
)
*
analysis
->
numItems
);
sc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
SCRIPT_CACHE
));
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
{
SCRIPT_CACHE
*
sc
=
(
SCRIPT_CACHE
*
)
&
analysis
->
sc
;
int
cChar
=
analysis
->
pItem
[
i
+
1
].
iCharPos
-
analysis
->
pItem
[
i
].
iCharPos
;
int
numGlyphs
=
1
.
5
*
cChar
+
16
;
WORD
*
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WORD
)
*
numGlyphs
);
...
...
@@ -587,10 +583,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
analysis
->
glyphs
[
i
].
abc
=
abc
;
}
HeapFree
(
GetProcessHeap
(),
0
,
sc
);
*
pssa
=
analysis
;
return
S_OK
;
}
...
...
@@ -628,7 +621,6 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa,
WORD
*
glyphs
;
int
item
,
cnt
,
x
;
HRESULT
hr
;
SCRIPT_CACHE
sc
=
0
;
TRACE
(
"(%p,%d,%d,0x%1x,%p,%d,%d,%d)
\n
"
,
ssa
,
iX
,
iY
,
uOptions
,
prc
,
iMinSel
,
iMaxSel
,
fDisabled
);
...
...
@@ -671,17 +663,15 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa,
cnt
+=
analysis
->
glyphs
[
item
].
numGlyphs
;
/* point to the end of the copied text */
}
hr
=
ScriptTextOut
(
analysis
->
hdc
,
&
sc
,
iX
,
iY
,
uOptions
,
prc
,
&
analysis
->
pItem
->
a
,
NULL
,
0
,
glyphs
,
cnt
,
analysis
->
glyphs
->
piAdvance
,
NULL
,
analysis
->
glyphs
->
pGoffset
);
hr
=
ScriptTextOut
(
analysis
->
sc
->
hdc
,
(
SCRIPT_CACHE
*
)
&
analysis
->
sc
,
iX
,
iY
,
uOptions
,
prc
,
&
analysis
->
pItem
->
a
,
NULL
,
0
,
glyphs
,
cnt
,
analysis
->
glyphs
->
p
iAdvance
,
NULL
,
analysis
->
glyphs
->
p
Goffset
);
TRACE
(
"ScriptTextOut hr=%08x
\n
"
,
hr
);
/*
* Free the output buffer and script cache
*/
HeapFree
(
GetProcessHeap
(),
0
,
glyphs
);
ScriptFreeCache
(
&
sc
);
return
hr
;
}
...
...
@@ -1524,7 +1514,7 @@ const SIZE * WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa)
* appropriate place so that we can just pass cached
* values here.
*/
if
(
!
GetTextMetricsW
(
analysis
->
hdc
,
&
metric
))
if
(
!
GetTextMetricsW
(
analysis
->
sc
->
hdc
,
&
metric
))
{
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
sz
);
analysis
->
sz
=
NULL
;
...
...
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