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
54bdbd3c
Commit
54bdbd3c
authored
Oct 29, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Store child font objects directly on the child font list.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86315062
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
116 deletions
+66
-116
font.c
dlls/gdi32/font.c
+8
-5
freetype.c
dlls/gdi32/freetype.c
+57
-110
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/font.c
View file @
54bdbd3c
...
...
@@ -473,6 +473,7 @@ struct gdi_font *alloc_gdi_font( const WCHAR *file, void *data_ptr, SIZE_T data_
font
->
matrix
.
eM11
=
font
->
matrix
.
eM22
=
1
.
0
;
font
->
scale_y
=
1
.
0
;
font
->
kern_count
=
-
1
;
list_init
(
&
font
->
child_fonts
);
if
(
file
)
{
...
...
@@ -501,9 +502,15 @@ struct gdi_font *alloc_gdi_font( const WCHAR *file, void *data_ptr, SIZE_T data_
void
free_gdi_font
(
struct
gdi_font
*
font
)
{
DWORD
i
;
struct
gdi_font
*
child
,
*
child_next
;
if
(
font
->
private
)
font_funcs
->
destroy_font
(
font
);
free_font_handle
(
font
->
handle
);
LIST_FOR_EACH_ENTRY_SAFE
(
child
,
child_next
,
&
font
->
child_fonts
,
struct
gdi_font
,
entry
)
{
list_remove
(
&
child
->
entry
);
free_gdi_font
(
child
);
}
for
(
i
=
0
;
i
<
font
->
gm_size
;
i
++
)
HeapFree
(
GetProcessHeap
(),
0
,
font
->
gm
[
i
]
);
HeapFree
(
GetProcessHeap
(),
0
,
font
->
otm
.
otmpFamilyName
);
HeapFree
(
GetProcessHeap
(),
0
,
font
->
otm
.
otmpStyleName
);
...
...
@@ -1282,17 +1289,13 @@ static BOOL CDECL font_EnumFonts( PHYSDEV dev, LOGFONTW *lf, FONTENUMPROCW proc,
static
BOOL
CDECL
font_FontIsLinked
(
PHYSDEV
dev
)
{
struct
font_physdev
*
physdev
=
get_font_dev
(
dev
);
BOOL
ret
;
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pFontIsLinked
);
return
dev
->
funcs
->
pFontIsLinked
(
dev
);
}
EnterCriticalSection
(
&
font_cs
);
ret
=
font_funcs
->
pFontIsLinked
(
physdev
->
font
);
LeaveCriticalSection
(
&
font_cs
);
return
ret
;
return
!
list_empty
(
&
physdev
->
font
->
child_fonts
);
}
...
...
dlls/gdi32/freetype.c
View file @
54bdbd3c
This diff is collapsed.
Click to expand it.
dlls/gdi32/gdi_private.h
View file @
54bdbd3c
...
...
@@ -317,6 +317,7 @@ struct gdi_font
int
kern_count
;
/* the following members can be accessed without locking, they are never modified after creation */
void
*
private
;
/* font backend private data */
struct
list
child_fonts
;
DWORD
handle
;
DWORD
cache_num
;
DWORD
hash
;
...
...
@@ -368,7 +369,6 @@ struct gdi_font
struct
font_backend_funcs
{
BOOL
(
CDECL
*
pEnumFonts
)(
LOGFONTW
*
lf
,
FONTENUMPROCW
proc
,
LPARAM
lparam
);
BOOL
(
CDECL
*
pFontIsLinked
)(
struct
gdi_font
*
font
);
struct
gdi_font
*
(
CDECL
*
pSelectFont
)(
DC
*
dc
,
HFONT
hfont
,
UINT
*
aa_flags
,
UINT
default_aa_flags
);
INT
(
CDECL
*
add_font
)(
const
WCHAR
*
file
,
DWORD
flags
);
...
...
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