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
d2dce849
Commit
d2dce849
authored
May 06, 2014
by
Alex Henrie
Committed by
Alexandre Julliard
May 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Simplify family_matches and face_matches.
parent
a27a1214
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
freetype.c
dlls/gdi32/freetype.c
+11
-13
No files found.
dlls/gdi32/freetype.c
View file @
d2dce849
...
...
@@ -5709,25 +5709,25 @@ static void GetEnumStructs(Face *face, const WCHAR *family_name, LPENUMLOGFONTEX
free_font
(
font
);
}
static
BOOL
family_matches
(
Family
*
family
,
const
LOGFONTW
*
lf
)
static
BOOL
family_matches
(
Family
*
family
,
const
WCHAR
*
face_name
)
{
Face
*
face
;
const
struct
list
*
face_list
;
if
(
!
strcmpiW
(
lf
->
lfFaceN
ame
,
family
->
FamilyName
))
return
TRUE
;
if
(
!
strcmpiW
(
face_n
ame
,
family
->
FamilyName
))
return
TRUE
;
face_list
=
get_face_list_from_family
(
family
);
LIST_FOR_EACH_ENTRY
(
face
,
face_list
,
Face
,
entry
)
if
(
face
->
FullName
&&
!
strcmpiW
(
lf
->
lfFaceN
ame
,
face
->
FullName
))
return
TRUE
;
if
(
face
->
FullName
&&
!
strcmpiW
(
face_n
ame
,
face
->
FullName
))
return
TRUE
;
return
FALSE
;
}
static
BOOL
face_matches
(
const
WCHAR
*
family_name
,
Face
*
face
,
const
LOGFONTW
*
lf
)
static
BOOL
face_matches
(
const
WCHAR
*
family_name
,
Face
*
face
,
const
WCHAR
*
face_name
)
{
if
(
!
strcmpiW
(
lf
->
lfFaceN
ame
,
family_name
))
return
TRUE
;
if
(
!
strcmpiW
(
face_n
ame
,
family_name
))
return
TRUE
;
return
(
face
->
FullName
&&
!
strcmpiW
(
lf
->
lfFaceN
ame
,
face
->
FullName
));
return
(
face
->
FullName
&&
!
strcmpiW
(
face_n
ame
,
face
->
FullName
));
}
static
BOOL
enum_face_charsets
(
const
Family
*
family
,
Face
*
face
,
struct
enum_charset_list
*
list
,
...
...
@@ -5805,22 +5805,20 @@ static BOOL freetype_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc,
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
if
(
plf
->
lfFaceName
[
0
])
{
FontSubst
*
psub
;
psub
=
get_font_subst
(
&
font_subst_list
,
plf
->
lfFaceName
,
plf
->
lfCharSet
);
WCHAR
*
face_name
=
plf
->
lfFaceName
;
FontSubst
*
psub
=
get_font_subst
(
&
font_subst_list
,
plf
->
lfFaceName
,
plf
->
lfCharSet
);
if
(
psub
)
{
TRACE
(
"substituting %s -> %s
\n
"
,
debugstr_w
(
plf
->
lfFaceName
),
debugstr_w
(
psub
->
to
.
name
));
lf
=
*
plf
;
strcpyW
(
lf
.
lfFaceName
,
psub
->
to
.
name
);
plf
=
&
lf
;
face_name
=
psub
->
to
.
name
;
}
LIST_FOR_EACH_ENTRY
(
family
,
&
font_list
,
Family
,
entry
)
{
if
(
!
family_matches
(
family
,
plf
))
continue
;
if
(
!
family_matches
(
family
,
face_name
))
continue
;
face_list
=
get_face_list_from_family
(
family
);
LIST_FOR_EACH_ENTRY
(
face
,
face_list
,
Face
,
entry
)
{
if
(
!
face_matches
(
family
->
FamilyName
,
face
,
plf
))
continue
;
if
(
!
face_matches
(
family
->
FamilyName
,
face
,
face_name
))
continue
;
if
(
!
enum_face_charsets
(
family
,
face
,
&
enum_charsets
,
proc
,
lparam
))
return
FALSE
;
}
}
...
...
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