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
b057c5f1
Commit
b057c5f1
authored
Dec 10, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix handling of font orientation in advanced graphics mode.
parent
75fff47f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
20 deletions
+33
-20
dc.c
dlls/gdi32/dc.c
+2
-0
graphics.c
dlls/gdi32/dibdrv/graphics.c
+6
-2
font.c
dlls/gdi32/font.c
+17
-15
freetype.c
dlls/gdi32/freetype.c
+2
-1
xrender.c
dlls/winex11.drv/xrender.c
+6
-2
No files found.
dlls/gdi32/dc.c
View file @
b057c5f1
...
...
@@ -1051,6 +1051,8 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode )
dc
->
GraphicsMode
=
mode
;
}
release_dc_ptr
(
dc
);
/* font metrics depend on the graphics mode */
if
(
ret
)
SelectObject
(
dc
->
hSelf
,
GetCurrentObject
(
dc
->
hSelf
,
OBJ_FONT
));
return
ret
;
}
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
b057c5f1
...
...
@@ -499,8 +499,12 @@ static struct cached_font *add_cached_font( HDC hdc, HFONT hfont, UINT aa_flags
GetObjectW
(
hfont
,
sizeof
(
font
.
lf
),
&
font
.
lf
);
GetTransform
(
hdc
,
0x204
,
&
font
.
xform
);
font
.
xform
.
eDx
=
font
.
xform
.
eDy
=
0
;
/* unused, would break hashing */
if
(
GetGraphicsMode
(
hdc
)
==
GM_COMPATIBLE
&&
font
.
xform
.
eM11
*
font
.
xform
.
eM22
<
0
)
font
.
lf
.
lfOrientation
=
-
font
.
lf
.
lfOrientation
;
if
(
GetGraphicsMode
(
hdc
)
==
GM_COMPATIBLE
)
{
font
.
lf
.
lfOrientation
=
font
.
lf
.
lfEscapement
;
if
(
font
.
xform
.
eM11
*
font
.
xform
.
eM22
<
0
)
font
.
lf
.
lfOrientation
=
-
font
.
lf
.
lfOrientation
;
}
font
.
lf
.
lfWidth
=
abs
(
font
.
lf
.
lfWidth
);
font
.
aa_flags
=
aa_flags
;
font
.
hash
=
font_cache_hash
(
&
font
);
...
...
dlls/gdi32/font.c
View file @
b057c5f1
...
...
@@ -395,15 +395,6 @@ HFONT WINAPI CreateFontIndirectExW( const ENUMLOGFONTEXDVW *penumex )
fontPtr
->
logfont
=
*
plf
;
if
(
plf
->
lfEscapement
!=
plf
->
lfOrientation
)
{
/* this should really depend on whether GM_ADVANCED is set */
fontPtr
->
logfont
.
lfOrientation
=
fontPtr
->
logfont
.
lfEscapement
;
WARN
(
"orientation angle %f set to "
"escapement angle %f for new font %p
\n
"
,
plf
->
lfOrientation
/
10
.,
plf
->
lfEscapement
/
10
.,
fontPtr
);
}
if
(
!
(
hFont
=
alloc_gdi_handle
(
fontPtr
,
OBJ_FONT
,
&
font_funcs
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
fontPtr
);
...
...
@@ -2274,10 +2265,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
dc
->
vport2WorldValid
&&
dc
->
xformWorld2Vport
.
eM22
<
0
)
desired
[
1
].
y
=
-
desired
[
1
].
y
;
}
else
{
if
(
layout
&
LAYOUT_RTL
)
desired
[
1
].
x
=
-
desired
[
1
].
x
;
}
deltas
[
i
].
x
=
desired
[
1
].
x
-
width
.
x
;
deltas
[
i
].
y
=
desired
[
1
].
y
-
width
.
y
;
...
...
@@ -2288,6 +2275,8 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
}
else
{
POINT
desired
[
2
];
if
(
!
done_extents
)
{
if
(
flags
&
ETO_GLYPH_INDEX
)
...
...
@@ -2296,8 +2285,21 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
GetTextExtentPointW
(
hdc
,
reordered_str
,
count
,
&
sz
);
done_extents
=
TRUE
;
}
width
.
x
=
abs
(
INTERNAL_XWSTODS
(
dc
,
sz
.
cx
));
width
.
y
=
0
;
desired
[
0
].
x
=
desired
[
0
].
y
=
0
;
desired
[
1
].
x
=
sz
.
cx
;
desired
[
1
].
y
=
0
;
LPtoDP
(
hdc
,
desired
,
2
);
desired
[
1
].
x
-=
desired
[
0
].
x
;
desired
[
1
].
y
-=
desired
[
0
].
y
;
if
(
dc
->
GraphicsMode
==
GM_COMPATIBLE
)
{
if
(
dc
->
vport2WorldValid
&&
dc
->
xformWorld2Vport
.
eM11
<
0
)
desired
[
1
].
x
=
-
desired
[
1
].
x
;
if
(
dc
->
vport2WorldValid
&&
dc
->
xformWorld2Vport
.
eM22
<
0
)
desired
[
1
].
y
=
-
desired
[
1
].
y
;
}
width
=
desired
[
1
];
}
tm
.
tmAscent
=
abs
(
INTERNAL_YWSTODS
(
dc
,
tm
.
tmAscent
));
...
...
dlls/gdi32/freetype.c
View file @
b057c5f1
...
...
@@ -4578,7 +4578,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
{
lf
.
lfHeight
*=
fabs
(
dcmat
.
eM11
);
lf
.
lfWidth
*=
fabs
(
dcmat
.
eM11
);
dcmat
.
eM11
=
dcmat
.
eM22
=
1
.
0
;
dcmat
.
eM11
=
dcmat
.
eM22
=
dcmat
.
eM11
<
0
?
-
1
:
1
;
}
}
else
...
...
@@ -4587,6 +4587,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
font scaling abilities. */
dcmat
.
eM11
=
dcmat
.
eM22
=
1
.
0
;
dcmat
.
eM21
=
dcmat
.
eM12
=
0
;
lf
.
lfOrientation
=
lf
.
lfEscapement
;
if
(
dc
->
vport2WorldValid
)
{
if
(
dc
->
xformWorld2Vport
.
eM11
*
dc
->
xformWorld2Vport
.
eM22
<
0
)
...
...
dlls/winex11.drv/xrender.c
View file @
b057c5f1
...
...
@@ -884,8 +884,12 @@ static HFONT xrenderdrv_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
TRACE
(
"font transform %f %f %f %f
\n
"
,
lfsz
.
xform
.
eM11
,
lfsz
.
xform
.
eM12
,
lfsz
.
xform
.
eM21
,
lfsz
.
xform
.
eM22
);
if
(
GetGraphicsMode
(
dev
->
hdc
)
==
GM_COMPATIBLE
&&
lfsz
.
xform
.
eM11
*
lfsz
.
xform
.
eM22
<
0
)
lfsz
.
lf
.
lfOrientation
=
-
lfsz
.
lf
.
lfOrientation
;
if
(
GetGraphicsMode
(
dev
->
hdc
)
==
GM_COMPATIBLE
)
{
lfsz
.
lf
.
lfOrientation
=
lfsz
.
lf
.
lfEscapement
;
if
(
lfsz
.
xform
.
eM11
*
lfsz
.
xform
.
eM22
<
0
)
lfsz
.
lf
.
lfOrientation
=
-
lfsz
.
lf
.
lfOrientation
;
}
/* Not used fields, would break hashing */
lfsz
.
xform
.
eDx
=
lfsz
.
xform
.
eDy
=
0
;
...
...
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