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
c0796ecb
Commit
c0796ecb
authored
Nov 04, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix setting oblique simulation on font creation.
parent
26eed570
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
font.c
dlls/dwrite/font.c
+2
-2
font.c
dlls/dwrite/tests/font.c
+11
-5
No files found.
dlls/dwrite/font.c
View file @
c0796ecb
...
...
@@ -698,7 +698,7 @@ HRESULT convert_fontface_to_logfont(IDWriteFontFace *face, LOGFONTW *logfont)
logfont
->
lfCharSet
=
DEFAULT_CHARSET
;
logfont
->
lfWeight
=
weight
;
logfont
->
lfItalic
=
style
==
DWRITE_FONT_STYLE_ITALIC
||
(
simulations
|
DWRITE_FONT_SIMULATIONS_OBLIQUE
);
logfont
->
lfItalic
=
style
==
DWRITE_FONT_STYLE_ITALIC
||
(
simulations
&
DWRITE_FONT_SIMULATIONS_OBLIQUE
);
logfont
->
lfOutPrecision
=
OUT_OUTLINE_PRECIS
;
/* TODO: set facename */
...
...
@@ -1120,7 +1120,7 @@ static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily *i
DWRITE_FONT_SIMULATIONS
simulations
=
DWRITE_FONT_SIMULATIONS_NONE
;
if
(((
style
==
DWRITE_FONT_STYLE_ITALIC
)
||
(
style
==
DWRITE_FONT_STYLE_OBLIQUE
))
&&
This
->
data
->
fonts
[
found
]
->
style
==
DWRITE_FONT_STYLE_
ITALIC
)
{
This
->
data
->
fonts
[
found
]
->
style
==
DWRITE_FONT_STYLE_
NORMAL
)
{
simulations
=
DWRITE_FONT_SIMULATIONS_OBLIQUE
;
}
return
create_font
(
This
->
data
->
fonts
[
found
],
iface
,
simulations
,
font
);
...
...
dlls/dwrite/tests/font.c
View file @
c0796ecb
...
...
@@ -1126,6 +1126,7 @@ static void test_system_fontcollection(void)
static
void
test_ConvertFontFaceToLOGFONT
(
void
)
{
DWRITE_FONT_SIMULATIONS
sim
;
IDWriteGdiInterop
*
interop
;
IDWriteFontFace
*
fontface
;
IDWriteFactory
*
factory
;
...
...
@@ -1154,6 +1155,13 @@ static void test_ConvertFontFaceToLOGFONT(void)
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
sim
=
IDWriteFont_GetSimulations
(
font
);
ok
(
sim
==
DWRITE_FONT_SIMULATIONS_OBLIQUE
,
"sim %d
\n
"
,
sim
);
sim
=
IDWriteFontFace_GetSimulations
(
fontface
);
ok
(
sim
==
DWRITE_FONT_SIMULATIONS_OBLIQUE
,
"sim %d
\n
"
,
sim
);
IDWriteFont_Release
(
font
);
if
(
0
)
/* crashes on native */
...
...
@@ -1830,7 +1838,6 @@ static void test_GetFirstMatchingFont(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
simulations
=
IDWriteFont_GetSimulations
(
font
);
todo_wine
ok
(
simulations
==
DWRITE_FONT_SIMULATIONS_OBLIQUE
,
"%d
\n
"
,
simulations
);
IDWriteFont_Release
(
font
);
...
...
@@ -2009,12 +2016,10 @@ static void test_GetSimulations(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
simulations
=
IDWriteFont_GetSimulations
(
font
);
todo_wine
ok
(
simulations
==
DWRITE_FONT_SIMULATIONS_OBLIQUE
,
"got %d
\n
"
,
simulations
);
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
simulations
=
IDWriteFontFace_GetSimulations
(
fontface
);
todo_wine
ok
(
simulations
==
DWRITE_FONT_SIMULATIONS_OBLIQUE
,
"got %d
\n
"
,
simulations
);
IDWriteFontFace_Release
(
fontface
);
IDWriteFont_Release
(
font
);
...
...
@@ -2030,11 +2035,12 @@ todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
simulations
=
IDWriteFont_GetSimulations
(
font
);
ok
(
simulations
==
0
,
"got %d
\n
"
,
simulations
);
ok
(
simulations
==
DWRITE_FONT_SIMULATIONS_NONE
,
"got %d
\n
"
,
simulations
);
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
simulations
=
IDWriteFontFace_GetSimulations
(
fontface
);
ok
(
simulations
==
0
,
"got %d
\n
"
,
simulations
);
todo_wine
ok
(
simulations
==
DWRITE_FONT_SIMULATIONS_NONE
,
"got %d
\n
"
,
simulations
);
IDWriteFontFace_Release
(
fontface
);
IDWriteFont_Release
(
font
);
...
...
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