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
b65d0b96
Commit
b65d0b96
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: In ScriptTextOut make use of piAdvance and pGoffset to position glyphs.
parent
f70864b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
usp10.c
dlls/usp10/usp10.c
+45
-2
No files found.
dlls/usp10/usp10.c
View file @
b65d0b96
...
...
@@ -3176,6 +3176,8 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
const
int
*
piJustify
,
const
GOFFSET
*
pGoffset
)
{
HRESULT
hr
=
S_OK
;
INT
i
;
INT
*
lpDx
;
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
,
...
...
@@ -3189,6 +3191,45 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
if
(
!
psa
->
fNoGlyphIndex
)
/* Have Glyphs? */
fuOptions
|=
ETO_GLYPH_INDEX
;
/* Say don't do translation to glyph */
lpDx
=
heap_alloc
(
cGlyphs
*
sizeof
(
INT
)
*
2
);
if
(
pGoffset
)
{
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
if
(
!
(
fuOptions
&
ETO_PDY
)
&&
pGoffset
[
i
].
dv
)
fuOptions
|=
ETO_PDY
;
}
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
int
idx
=
i
;
if
(
fuOptions
&
ETO_PDY
)
{
idx
*=
2
;
lpDx
[
idx
+
1
]
=
0
;
}
lpDx
[
idx
]
=
piAdvance
[
i
];
}
if
(
pGoffset
)
{
for
(
i
=
1
;
i
<
cGlyphs
;
i
++
)
{
int
idx
=
i
;
int
prev_idx
=
i
-
1
;
if
(
fuOptions
&
ETO_PDY
)
{
idx
*=
2
;
prev_idx
=
idx
-
2
;
}
lpDx
[
prev_idx
]
+=
pGoffset
[
i
].
du
;
lpDx
[
idx
]
-=
pGoffset
[
i
].
du
;
if
(
fuOptions
&
ETO_PDY
)
{
lpDx
[
prev_idx
+
1
]
+=
pGoffset
[
i
].
dv
;
lpDx
[
idx
+
1
]
-=
pGoffset
[
i
].
dv
;
}
}
}
if
(
psa
->
fRTL
&&
psa
->
fLogicalOrder
)
{
int
i
;
...
...
@@ -3201,14 +3242,16 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
rtlGlyphs
[
i
]
=
pwGlyphs
[
cGlyphs
-
1
-
i
];
if
(
!
ExtTextOutW
(
hdc
,
x
,
y
,
fuOptions
,
lprc
,
rtlGlyphs
,
cGlyphs
,
NULL
))
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
,
NULL
))
if
(
!
ExtTextOutW
(
hdc
,
x
,
y
,
fuOptions
,
lprc
,
pwGlyphs
,
cGlyphs
,
lpDx
))
hr
=
S_FALSE
;
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