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
adcce5d7
Commit
adcce5d7
authored
May 10, 2011
by
Grazvydas Ignotas
Committed by
Alexandre Julliard
May 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement font selection by its full name.
parent
03741026
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
freetype.c
dlls/gdi32/freetype.c
+19
-0
font.c
dlls/gdi32/tests/font.c
+0
-1
No files found.
dlls/gdi32/freetype.c
View file @
adcce5d7
...
...
@@ -262,6 +262,7 @@ struct enum_data
typedef
struct
tagFace
{
struct
list
entry
;
WCHAR
*
StyleName
;
const
WCHAR
*
FullName
;
char
*
file
;
void
*
font_data_ptr
;
DWORD
font_data_size
;
...
...
@@ -1461,6 +1462,7 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_
face
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
face
));
face
->
cached_enum_data
=
NULL
;
face
->
StyleName
=
StyleW
;
face
->
FullName
=
get_face_name
(
ft_face
,
TT_NAME_ID_FULL_NAME
,
TT_MS_LANGID_ENGLISH_UNITED_STATES
);
if
(
file
)
{
face
->
file
=
strdupA
(
file
);
...
...
@@ -3610,6 +3612,20 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
}
}
/* Search by full face name. */
LIST_FOR_EACH
(
family_elem_ptr
,
&
font_list
)
{
family
=
LIST_ENTRY
(
family_elem_ptr
,
Family
,
entry
);
LIST_FOR_EACH
(
face_elem_ptr
,
&
family
->
faces
)
{
face
=
LIST_ENTRY
(
face_elem_ptr
,
Face
,
entry
);
if
(
face
->
FullName
&&
!
strcmpiW
(
face
->
FullName
,
FaceName
)
&&
((
csi
.
fs
.
fsCsb
[
0
]
&
(
face
->
fs
.
fsCsb
[
0
]
|
face
->
fs_links
.
fsCsb
[
0
]))
||
!
csi
.
fs
.
fsCsb
[
0
]))
{
if
(
face
->
scalable
||
can_use_bitmap
)
goto
found_face
;
}
}
}
/*
* Try check the SystemLink list first for a replacement font.
* We may find good replacements there.
...
...
@@ -3763,6 +3779,9 @@ found:
ret
->
fake_italic
=
(
it
&&
!
(
face
->
ntmFlags
&
NTM_ITALIC
));
ret
->
fake_bold
=
(
bd
&&
!
(
face
->
ntmFlags
&
NTM_BOLD
));
found_face:
height
=
lf
.
lfHeight
;
ret
->
fs
=
face
->
fs
;
if
(
csi
.
fs
.
fsCsb
[
0
])
{
...
...
dlls/gdi32/tests/font.c
View file @
adcce5d7
...
...
@@ -3771,7 +3771,6 @@ static void test_fullname(void)
buf
[
0
]
=
0
;
ok
(
get_ttf_nametable_entry
(
hdc
,
TT_NAME_ID_FULL_NAME
,
buf
,
sizeof
(
buf
)),
"face full name could not be read
\n
"
);
todo_wine
ok
(
!
lstrcmpA
(
buf
,
TestName
[
i
]),
"font full names don't match: %s != %s
\n
"
,
TestName
[
i
],
buf
);
SelectObject
(
hdc
,
of
);
DeleteObject
(
hfont
);
...
...
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