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
1da826a1
Commit
1da826a1
authored
Jul 29, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix text positioning in mirrored DCs.
parent
7d776a86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
font.c
dlls/gdi32/font.c
+12
-4
No files found.
dlls/gdi32/font.c
View file @
1da826a1
...
@@ -1715,6 +1715,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
...
@@ -1715,6 +1715,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
LPWSTR
reordered_str
=
(
LPWSTR
)
str
;
LPWSTR
reordered_str
=
(
LPWSTR
)
str
;
WORD
*
glyphs
=
NULL
;
WORD
*
glyphs
=
NULL
;
UINT
align
=
GetTextAlign
(
hdc
);
UINT
align
=
GetTextAlign
(
hdc
);
DWORD
layout
=
GetLayout
(
hdc
);
POINT
pt
;
POINT
pt
;
TEXTMETRICW
tm
;
TEXTMETRICW
tm
;
LOGFONTW
lf
;
LOGFONTW
lf
;
...
@@ -1755,17 +1756,23 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
...
@@ -1755,17 +1756,23 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
!
lprect
)
if
(
!
lprect
)
flags
&=
~
ETO_CLIPPED
;
flags
&=
~
ETO_CLIPPED
;
if
(
flags
&
ETO_RTLREADING
)
align
|=
TA_RTLREADING
;
if
(
layout
&
LAYOUT_RTL
)
{
if
((
align
&
TA_CENTER
)
!=
TA_CENTER
)
align
^=
TA_RIGHT
;
align
^=
TA_RTLREADING
;
}
if
(
!
(
flags
&
(
ETO_GLYPH_INDEX
|
ETO_IGNORELANGUAGE
))
&&
count
>
0
)
if
(
!
(
flags
&
(
ETO_GLYPH_INDEX
|
ETO_IGNORELANGUAGE
))
&&
count
>
0
)
{
{
INT
cGlyphs
;
INT
cGlyphs
;
reordered_str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WCHAR
));
reordered_str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WCHAR
));
BIDI_Reorder
(
hdc
,
str
,
count
,
GCP_REORDER
,
BIDI_Reorder
(
hdc
,
str
,
count
,
GCP_REORDER
,
((
flags
&
ETO_RTLREADING
)
!=
0
||
(
GetTextAlign
(
hdc
)
&
TA_RTLREADING
)
!=
0
)
?
(
align
&
TA_RTLREADING
)
?
WINE_GCPW_FORCE_RTL
:
WINE_GCPW_FORCE_LTR
,
WINE_GCPW_FORCE_RTL:
WINE_GCPW_FORCE_LTR
,
reordered_str
,
count
,
NULL
,
&
glyphs
,
&
cGlyphs
);
reordered_str
,
count
,
NULL
,
&
glyphs
,
&
cGlyphs
);
flags
|=
ETO_IGNORELANGUAGE
;
flags
|=
ETO_IGNORELANGUAGE
;
if
(
glyphs
)
if
(
glyphs
)
{
{
...
@@ -1901,6 +1908,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
...
@@ -1901,6 +1908,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
LPtoDP
(
hdc
,
desired
,
2
);
LPtoDP
(
hdc
,
desired
,
2
);
desired
[
1
].
x
-=
desired
[
0
].
x
;
desired
[
1
].
x
-=
desired
[
0
].
x
;
desired
[
1
].
y
-=
desired
[
0
].
y
;
desired
[
1
].
y
-=
desired
[
0
].
y
;
if
(
layout
&
LAYOUT_RTL
)
desired
[
1
].
x
=
-
desired
[
1
].
x
;
deltas
[
i
].
x
=
desired
[
1
].
x
-
width
.
x
;
deltas
[
i
].
x
=
desired
[
1
].
x
-
width
.
x
;
deltas
[
i
].
y
=
desired
[
1
].
y
-
width
.
y
;
deltas
[
i
].
y
=
desired
[
1
].
y
-
width
.
y
;
...
...
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