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
9ae3f1dc
Commit
9ae3f1dc
authored
Apr 04, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Apr 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use a function to add entries to the substitution list
(based on a patch by Byeong-Sik Jeon).
parent
d8a2fb97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
freetype.c
dlls/gdi/freetype.c
+36
-1
No files found.
dlls/gdi/freetype.c
View file @
9ae3f1dc
...
@@ -770,6 +770,41 @@ static FontSubst *get_font_subst(const struct list *subst_list, const WCHAR *fro
...
@@ -770,6 +770,41 @@ static FontSubst *get_font_subst(const struct list *subst_list, const WCHAR *fro
return
NULL
;
return
NULL
;
}
}
#define ADD_FONT_SUBST_FORCE 1
static
BOOL
add_font_subst
(
struct
list
*
subst_list
,
FontSubst
*
subst
,
INT
flags
)
{
FontSubst
*
from_exist
,
*
to_exist
;
from_exist
=
get_font_subst
(
subst_list
,
subst
->
from
.
name
,
subst
->
from
.
charset
);
if
(
from_exist
&&
(
flags
&
ADD_FONT_SUBST_FORCE
))
{
list_remove
(
&
from_exist
->
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
&
from_exist
->
from
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
&
from_exist
->
to
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
from_exist
);
from_exist
=
NULL
;
}
if
(
!
from_exist
)
{
to_exist
=
get_font_subst
(
subst_list
,
subst
->
to
.
name
,
subst
->
to
.
charset
);
if
(
to_exist
)
{
HeapFree
(
GetProcessHeap
(),
0
,
subst
->
to
.
name
);
subst
->
to
.
name
=
strdupW
(
to_exist
->
to
.
name
);
}
list_add_tail
(
subst_list
,
&
subst
->
entry
);
return
TRUE
;
}
return
FALSE
;
}
static
void
split_subst_info
(
NameCs
*
nc
,
LPSTR
str
)
static
void
split_subst_info
(
NameCs
*
nc
,
LPSTR
str
)
{
{
CHAR
*
p
=
strrchr
(
str
,
','
);
CHAR
*
p
=
strrchr
(
str
,
','
);
...
@@ -834,7 +869,7 @@ static void LoadSubstList(void)
...
@@ -834,7 +869,7 @@ static void LoadSubstList(void)
HeapFree
(
GetProcessHeap
(),
0
,
psub
->
from
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
psub
->
from
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
psub
);
HeapFree
(
GetProcessHeap
(),
0
,
psub
);
}
else
{
}
else
{
list_add_head
(
&
font_subst_list
,
&
psub
->
entry
);
add_font_subst
(
&
font_subst_list
,
psub
,
0
);
}
}
/* reset dlen and vlen */
/* reset dlen and vlen */
dlen
=
datalen
;
dlen
=
datalen
;
...
...
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