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
33eefa24
Commit
33eefa24
authored
Mar 07, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Search SystemLinked fonts when looking for a valid replacement.
parent
e499a844
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
freetype.c
dlls/gdi32/freetype.c
+49
-1
No files found.
dlls/gdi32/freetype.c
View file @
33eefa24
...
...
@@ -740,7 +740,25 @@ static Family *find_family_from_name(const WCHAR *name)
return
NULL
;
}
static
Face
*
find_face_from_path_index
(
const
CHAR
*
file_name
,
const
INT
index
)
{
Family
*
family
;
Face
*
face
;
TRACE
(
"looking for file %s index %i
\n
"
,
debugstr_a
(
file_name
),
index
);
LIST_FOR_EACH_ENTRY
(
family
,
&
font_list
,
Family
,
entry
)
{
LIST_FOR_EACH_ENTRY
(
face
,
&
family
->
faces
,
Face
,
entry
)
{
if
(
!
strcasecmp
(
face
->
file
,
file_name
)
&&
face
->
face_index
==
index
)
return
face
;
}
}
return
NULL
;
}
static
void
DumpSubstList
(
void
)
{
FontSubst
*
psub
;
...
...
@@ -2714,6 +2732,9 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
family
=
NULL
;
if
(
lf
.
lfFaceName
[
0
]
!=
'\0'
)
{
FontSubst
*
psub
;
SYSTEM_LINKS
*
font_link
;
CHILD_FONT
*
font_link_entry
;
psub
=
get_font_subst
(
&
font_subst_list
,
lf
.
lfFaceName
,
lf
.
lfCharSet
);
if
(
psub
)
{
...
...
@@ -2739,6 +2760,33 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
}
}
}
/*
* Try check the SystemLink list first for a replacement font.
* We may find good replacements there.
*/
LIST_FOR_EACH_ENTRY
(
font_link
,
&
system_links
,
SYSTEM_LINKS
,
entry
)
{
if
(
!
strcmpW
(
font_link
->
font_name
,
lf
.
lfFaceName
))
{
TRACE
(
"found entry in system list
\n
"
);
LIST_FOR_EACH_ENTRY
(
font_link_entry
,
&
font_link
->
links
,
CHILD_FONT
,
entry
)
{
face
=
find_face_from_path_index
(
font_link_entry
->
file_name
,
font_link_entry
->
index
);
if
(
face
)
{
family
=
face
->
family
;
if
(
csi
.
fs
.
fsCsb
[
0
]
&
(
face
->
fs
.
fsCsb
[
0
]
|
face
->
fs_links
.
fsCsb
[
0
]))
{
if
(
face
->
scalable
||
can_use_bitmap
)
goto
found
;
}
}
}
}
}
}
/* If requested charset was DEFAULT_CHARSET then try using 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