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
b7c9adcd
Commit
b7c9adcd
authored
May 08, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
May 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipIsStyleAvailable.
parent
7dfc6744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
font.c
dlls/gdiplus/font.c
+28
-2
No files found.
dlls/gdiplus/font.c
View file @
b7c9adcd
...
...
@@ -760,15 +760,41 @@ GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily *family,
return
Ok
;
}
static
INT
CALLBACK
font_has_style_proc
(
const
LOGFONTW
*
elf
,
const
TEXTMETRICW
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
{
INT
fontstyle
=
0
;
if
(
!
ntm
)
return
1
;
if
(
ntm
->
tmWeight
>=
FW_BOLD
)
fontstyle
|=
FontStyleBold
;
if
(
ntm
->
tmItalic
)
fontstyle
|=
FontStyleItalic
;
if
(
ntm
->
tmUnderlined
)
fontstyle
|=
FontStyleUnderline
;
if
(
ntm
->
tmStruckOut
)
fontstyle
|=
FontStyleStrikeout
;
return
(
INT
)
lParam
!=
fontstyle
;
}
GpStatus
WINGDIPAPI
GdipIsStyleAvailable
(
GDIPCONST
GpFontFamily
*
family
,
INT
style
,
BOOL
*
IsStyleAvailable
)
{
FIXME
(
"%p %d %p stub!
\n
"
,
family
,
style
,
IsStyleAvailable
);
HDC
hdc
;
TRACE
(
"%p %d %p
\n
"
,
family
,
style
,
IsStyleAvailable
);
if
(
!
(
family
&&
IsStyleAvailable
))
return
InvalidParameter
;
return
NotImplemented
;
*
IsStyleAvailable
=
FALSE
;
hdc
=
GetDC
(
0
);
if
(
!
EnumFontFamiliesW
(
hdc
,
family
->
FamilyName
,
font_has_style_proc
,
(
LPARAM
)
style
))
*
IsStyleAvailable
=
TRUE
;
ReleaseDC
(
0
,
hdc
);
return
Ok
;
}
/*****************************************************************************
...
...
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