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
83cbc071
Commit
83cbc071
authored
Jan 11, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Jan 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Simplify the reordering of glyphs.
parent
3197e364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
+18
-22
usp10.c
dlls/usp10/usp10.c
+18
-22
No files found.
dlls/usp10/usp10.c
View file @
83cbc071
...
...
@@ -3239,6 +3239,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
HRESULT
hr
=
S_OK
;
INT
i
;
INT
*
lpDx
;
WORD
*
reordered_glyphs
=
(
WORD
*
)
pwGlyphs
;
TRACE
(
"(%p, %p, %d, %d, %04x, %p, %p, %p, %d, %p, %d, %p, %p, %p)
\n
"
,
hdc
,
psc
,
x
,
y
,
fuOptions
,
lprc
,
psa
,
pwcReserved
,
iReserved
,
pwGlyphs
,
cGlyphs
,
...
...
@@ -3253,8 +3254,22 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
fuOptions
|=
ETO_GLYPH_INDEX
;
/* Say don't do translation to glyph */
lpDx
=
heap_alloc
(
cGlyphs
*
sizeof
(
INT
)
*
2
);
if
(
!
lpDx
)
return
E_OUTOFMEMORY
;
fuOptions
|=
ETO_PDY
;
if
(
psa
->
fRTL
&&
psa
->
fLogicalOrder
)
{
reordered_glyphs
=
heap_alloc
(
cGlyphs
*
sizeof
(
WORD
)
);
if
(
!
reordered_glyphs
)
{
heap_free
(
lpDx
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
reordered_glyphs
[
i
]
=
pwGlyphs
[
cGlyphs
-
1
-
i
];
}
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
lpDx
[
i
*
2
]
=
piAdvance
[
i
];
...
...
@@ -3269,29 +3284,10 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
}
}
if
(
psa
->
fRTL
&&
psa
->
fLogicalOrder
)
{
int
i
;
WORD
*
rtlGlyphs
;
rtlGlyphs
=
heap_alloc
(
cGlyphs
*
sizeof
(
WORD
));
if
(
!
rtlGlyphs
)
{
heap_free
(
lpDx
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
rtlGlyphs
[
i
]
=
pwGlyphs
[
cGlyphs
-
1
-
i
];
if
(
!
ExtTextOutW
(
hdc
,
x
,
y
,
fuOptions
,
lprc
,
rtlGlyphs
,
cGlyphs
,
lpDx
))
hr
=
S_FALSE
;
heap_free
(
rtlGlyphs
);
}
else
if
(
!
ExtTextOutW
(
hdc
,
x
,
y
,
fuOptions
,
lprc
,
pwGlyphs
,
cGlyphs
,
lpDx
))
hr
=
S_FALSE
;
if
(
!
ExtTextOutW
(
hdc
,
x
,
y
,
fuOptions
,
lprc
,
reordered_glyphs
,
cGlyphs
,
lpDx
))
hr
=
S_FALSE
;
if
(
reordered_glyphs
!=
pwGlyphs
)
heap_free
(
reordered_glyphs
);
heap_free
(
lpDx
);
return
hr
;
...
...
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