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
63484057
Commit
63484057
authored
Jan 14, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid creating a family object just to retrieve the font data.
parent
afee133b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
freetype.c
dlls/gdi32/freetype.c
+10
-11
No files found.
dlls/gdi32/freetype.c
View file @
63484057
...
...
@@ -2983,14 +2983,13 @@ struct fontdir
#include <poppack.h>
static
void
GetEnumStructs
(
Face
*
face
,
LPENUMLOGFONTEXW
pelf
,
static
void
GetEnumStructs
(
Face
*
face
,
const
WCHAR
*
family_name
,
LPENUMLOGFONTEXW
pelf
,
NEWTEXTMETRICEXW
*
pntm
,
LPDWORD
ptype
);
static
BOOL
get_fontdir
(
const
char
*
unix_name
,
struct
fontdir
*
fd
)
{
FT_Face
ft_face
=
new_ft_face
(
unix_name
,
NULL
,
0
,
0
,
FALSE
);
Face
*
face
;
Family
*
family
;
WCHAR
*
name
,
*
english_name
;
ENUMLOGFONTEXW
elf
;
NEWTEXTMETRICEXW
ntm
;
...
...
@@ -2999,12 +2998,12 @@ static BOOL get_fontdir( const char *unix_name, struct fontdir *fd )
if
(
!
ft_face
)
return
FALSE
;
face
=
create_face
(
ft_face
,
0
,
unix_name
,
NULL
,
0
,
0
,
FALSE
,
0
);
get_family_names
(
ft_face
,
&
name
,
&
english_name
,
FALSE
);
family
=
create_family
(
name
,
english_name
);
insert_face_in_family_list
(
face
,
family
);
pFT_Done_Face
(
ft_face
);
GetEnumStructs
(
face
,
&
elf
,
&
ntm
,
&
type
);
free_family
(
family
);
GetEnumStructs
(
face
,
name
,
&
elf
,
&
ntm
,
&
type
);
free_face
(
face
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
HeapFree
(
GetProcessHeap
(),
0
,
english_name
);
if
((
type
&
TRUETYPE_FONTTYPE
)
==
0
)
return
FALSE
;
...
...
@@ -5091,7 +5090,7 @@ static DWORD create_enum_charset_list(DWORD charset, struct enum_charset_list *l
return
n
;
}
static
void
GetEnumStructs
(
Face
*
face
,
LPENUMLOGFONTEXW
pelf
,
static
void
GetEnumStructs
(
Face
*
face
,
const
WCHAR
*
family_name
,
LPENUMLOGFONTEXW
pelf
,
NEWTEXTMETRICEXW
*
pntm
,
LPDWORD
ptype
)
{
GdiFont
*
font
;
...
...
@@ -5123,7 +5122,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf,
return
;
}
font
->
name
=
strdupW
(
face
->
family
->
FamilyName
);
font
->
name
=
strdupW
(
family_name
);
font
->
ntmFlags
=
face
->
ntmFlags
;
if
(
get_outline_text_metrics
(
font
))
...
...
@@ -5152,11 +5151,11 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf,
pntm
->
ntmTm
.
ntmCellHeight
=
pntm
->
ntmTm
.
tmHeight
;
pntm
->
ntmTm
.
ntmAvgWidth
=
pntm
->
ntmTm
.
tmAveCharWidth
;
lstrcpynW
(
pelf
->
elfLogFont
.
lfFaceName
,
fa
ce
->
family
->
FamilyN
ame
,
LF_FACESIZE
);
lstrcpynW
(
pelf
->
elfLogFont
.
lfFaceName
,
fa
mily_n
ame
,
LF_FACESIZE
);
if
(
face
->
FullName
)
lstrcpynW
(
pelf
->
elfFullName
,
face
->
FullName
,
LF_FULLFACESIZE
);
else
lstrcpynW
(
pelf
->
elfFullName
,
fa
ce
->
family
->
FamilyN
ame
,
LF_FULLFACESIZE
);
lstrcpynW
(
pelf
->
elfFullName
,
fa
mily_n
ame
,
LF_FULLFACESIZE
);
lstrcpynW
(
pelf
->
elfStyle
,
face
->
StyleName
,
LF_FACESIZE
);
}
...
...
@@ -5227,7 +5226,7 @@ static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_cha
DWORD
type
=
0
;
int
i
;
GetEnumStructs
(
face
,
&
elf
,
&
ntm
,
&
type
);
GetEnumStructs
(
face
,
face
->
family
->
FamilyName
,
&
elf
,
&
ntm
,
&
type
);
for
(
i
=
0
;
i
<
list
->
total
;
i
++
)
{
if
(
!
face
->
scalable
&&
face
->
fs
.
fsCsb
[
0
]
==
0
)
{
/* OEM bitmap */
elf
.
elfLogFont
.
lfCharSet
=
ntm
.
ntmTm
.
tmCharSet
=
OEM_CHARSET
;
...
...
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