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
71eb1644
Commit
71eb1644
authored
Oct 24, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Move internal helper get_log_fontW() out of public GdipGetLogFontW() export.
parent
16d5f457
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
17 deletions
+42
-17
font.c
dlls/gdiplus/font.c
+10
-15
graphics.c
dlls/gdiplus/graphics.c
+32
-2
No files found.
dlls/gdiplus/font.c
View file @
71eb1644
...
...
@@ -449,10 +449,18 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics,
return
Ok
;
}
void
get_log_fontW
(
const
GpFont
*
font
,
GpGraphics
*
graphics
,
LOGFONTW
*
lf
)
/*******************************************************************************
* GdipGetLogFontW [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipGetLogFontW
(
GpFont
*
font
,
GpGraphics
*
graphics
,
LOGFONTW
*
lf
)
{
REAL
height
;
TRACE
(
"(%p, %p, %p)
\n
"
,
font
,
graphics
,
lf
);
if
(
!
font
||
!
graphics
||
!
lf
)
return
InvalidParameter
;
if
(
font
->
unit
==
UnitPixel
)
{
height
=
units_to_pixels
(
font
->
emSize
,
graphics
->
unit
,
graphics
->
yres
);
...
...
@@ -481,21 +489,8 @@ void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf)
lf
->
lfQuality
=
DEFAULT_QUALITY
;
lf
->
lfPitchAndFamily
=
0
;
strcpyW
(
lf
->
lfFaceName
,
font
->
family
->
FamilyName
);
}
/*******************************************************************************
* GdipGetLogFontW [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipGetLogFontW
(
GpFont
*
font
,
GpGraphics
*
graphics
,
LOGFONTW
*
lfw
)
{
TRACE
(
"(%p, %p, %p)
\n
"
,
font
,
graphics
,
lfw
);
if
(
!
font
||
!
graphics
||
!
lfw
)
return
InvalidParameter
;
get_log_fontW
(
font
,
graphics
,
lfw
);
TRACE
(
"=> %s,%d
\n
"
,
debugstr_w
(
lfw
->
lfFaceName
),
lfw
->
lfHeight
);
TRACE
(
"=> %s,%d
\n
"
,
debugstr_w
(
lf
->
lfFaceName
),
lf
->
lfHeight
);
return
Ok
;
}
...
...
dlls/gdiplus/graphics.c
View file @
71eb1644
...
...
@@ -2133,6 +2133,38 @@ end:
return
stat
;
}
void
get_log_fontW
(
const
GpFont
*
font
,
GpGraphics
*
graphics
,
LOGFONTW
*
lf
)
{
REAL
height
;
if
(
font
->
unit
==
UnitPixel
)
{
height
=
units_to_pixels
(
font
->
emSize
,
graphics
->
unit
,
graphics
->
yres
);
}
else
{
if
(
graphics
->
unit
==
UnitDisplay
||
graphics
->
unit
==
UnitPixel
)
height
=
units_to_pixels
(
font
->
emSize
,
font
->
unit
,
graphics
->
xres
);
else
height
=
units_to_pixels
(
font
->
emSize
,
font
->
unit
,
graphics
->
yres
);
}
lf
->
lfHeight
=
-
(
height
+
0
.
5
);
lf
->
lfWidth
=
0
;
lf
->
lfEscapement
=
0
;
lf
->
lfOrientation
=
0
;
lf
->
lfWeight
=
font
->
otm
.
otmTextMetrics
.
tmWeight
;
lf
->
lfItalic
=
font
->
otm
.
otmTextMetrics
.
tmItalic
?
1
:
0
;
lf
->
lfUnderline
=
font
->
otm
.
otmTextMetrics
.
tmUnderlined
?
1
:
0
;
lf
->
lfStrikeOut
=
font
->
otm
.
otmTextMetrics
.
tmStruckOut
?
1
:
0
;
lf
->
lfCharSet
=
font
->
otm
.
otmTextMetrics
.
tmCharSet
;
lf
->
lfOutPrecision
=
OUT_DEFAULT_PRECIS
;
lf
->
lfClipPrecision
=
CLIP_DEFAULT_PRECIS
;
lf
->
lfQuality
=
DEFAULT_QUALITY
;
lf
->
lfPitchAndFamily
=
0
;
strcpyW
(
lf
->
lfFaceName
,
font
->
family
->
FamilyName
);
}
static
void
get_font_hfont
(
GpGraphics
*
graphics
,
GDIPCONST
GpFont
*
font
,
GDIPCONST
GpStringFormat
*
format
,
HFONT
*
hfont
)
{
...
...
@@ -2153,8 +2185,6 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font,
unit_scale
=
units_scale
(
font
->
unit
,
graphics
->
unit
,
res
);
font_height
=
font
->
emSize
*
unit_scale
;
if
(
graphics
->
unit
!=
UnitDisplay
)
font_height
/=
graphics
->
scale
;
}
pt
[
0
].
X
=
0
.
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