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
e27a633b
Commit
e27a633b
authored
Mar 27, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper to create a family.
parent
7ad330de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
freetype.c
dlls/gdi32/freetype.c
+21
-7
No files found.
dlls/gdi32/freetype.c
View file @
e27a633b
...
@@ -1520,6 +1520,21 @@ static void get_family_names( FT_Face ft_face, WCHAR **name, WCHAR **english, BO
...
@@ -1520,6 +1520,21 @@ static void get_family_names( FT_Face ft_face, WCHAR **name, WCHAR **english, BO
}
}
}
}
/****************************************************************
* NB This function stores the ptrs to the strings to save copying.
* Don't free them after calling.
*/
static
Family
*
create_family
(
WCHAR
*
name
,
WCHAR
*
english_name
)
{
Family
*
family
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
family
)
);
family
->
FamilyName
=
name
;
family
->
EnglishName
=
english_name
;
list_init
(
&
family
->
faces
);
family
->
replacement
=
&
family
->
faces
;
return
family
;
}
static
Family
*
get_family
(
FT_Face
ft_face
,
BOOL
vertical
)
static
Family
*
get_family
(
FT_Face
ft_face
,
BOOL
vertical
)
{
{
Family
*
family
;
Family
*
family
;
...
@@ -1531,11 +1546,7 @@ static Family *get_family( FT_Face ft_face, BOOL vertical )
...
@@ -1531,11 +1546,7 @@ static Family *get_family( FT_Face ft_face, BOOL vertical )
if
(
!
family
)
if
(
!
family
)
{
{
family
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
family
)
);
family
=
create_family
(
name
,
english_name
);
family
->
FamilyName
=
strdupW
(
name
);
family
->
EnglishName
=
english_name
?
strdupW
(
english_name
)
:
NULL
;
list_init
(
&
family
->
faces
);
family
->
replacement
=
&
family
->
faces
;
list_add_tail
(
&
font_list
,
&
family
->
entry
);
list_add_tail
(
&
font_list
,
&
family
->
entry
);
if
(
english_name
)
if
(
english_name
)
...
@@ -1548,8 +1559,11 @@ static Family *get_family( FT_Face ft_face, BOOL vertical )
...
@@ -1548,8 +1559,11 @@ static Family *get_family( FT_Face ft_face, BOOL vertical )
add_font_subst
(
&
font_subst_list
,
subst
,
0
);
add_font_subst
(
&
font_subst_list
,
subst
,
0
);
}
}
}
}
HeapFree
(
GetProcessHeap
(),
0
,
name
);
else
HeapFree
(
GetProcessHeap
(),
0
,
english_name
);
{
HeapFree
(
GetProcessHeap
(),
0
,
name
);
HeapFree
(
GetProcessHeap
(),
0
,
english_name
);
}
return
family
;
return
family
;
}
}
...
...
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