Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
74ea8d8c
Commit
74ea8d8c
authored
Oct 30, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Make the family replacement point to the family object.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d27a9d77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
font.c
dlls/gdi32/font.c
+4
-2
freetype.c
dlls/gdi32/freetype.c
+2
-4
gdi_private.h
dlls/gdi32/gdi_private.h
+6
-6
No files found.
dlls/gdi32/font.c
View file @
74ea8d8c
...
...
@@ -517,7 +517,7 @@ struct gdi_font_family *create_family( const WCHAR *name, const WCHAR *second_na
}
else
family
->
second_name
[
0
]
=
0
;
list_init
(
&
family
->
faces
);
family
->
replacement
=
&
family
->
faces
;
family
->
replacement
=
NULL
;
list_add_tail
(
&
font_list
,
&
family
->
entry
);
return
family
;
}
...
...
@@ -527,6 +527,7 @@ void release_family( struct gdi_font_family *family )
if
(
--
family
->
refcount
)
return
;
assert
(
list_empty
(
&
family
->
faces
));
list_remove
(
&
family
->
entry
);
if
(
family
->
replacement
)
release_family
(
family
->
replacement
);
HeapFree
(
GetProcessHeap
(),
0
,
family
);
}
...
...
@@ -564,7 +565,8 @@ static BOOL add_family_replacement( const WCHAR *new_name, const WCHAR *replace
}
if
(
!
(
new_family
=
create_family
(
new_name
,
NULL
)))
return
FALSE
;
new_family
->
replacement
=
&
family
->
faces
;
new_family
->
replacement
=
family
;
family
->
refcount
++
;
TRACE
(
"mapping %s to %s
\n
"
,
debugstr_w
(
replace
),
debugstr_w
(
new_name
)
);
/* also add replacement for vertical font if necessary */
...
...
dlls/gdi32/freetype.c
View file @
74ea8d8c
...
...
@@ -662,10 +662,8 @@ static BOOL is_subpixel_rendering_enabled( void )
static
const
struct
list
*
get_face_list_from_family
(
const
Family
*
family
)
{
if
(
!
list_empty
(
&
family
->
faces
))
return
&
family
->
faces
;
else
return
family
->
replacement
;
if
(
family
->
replacement
)
return
&
family
->
replacement
->
faces
;
return
&
family
->
faces
;
}
static
Face
*
find_face_from_filename
(
const
WCHAR
*
file_name
,
const
WCHAR
*
face_name
)
...
...
dlls/gdi32/gdi_private.h
View file @
74ea8d8c
...
...
@@ -307,12 +307,12 @@ struct glyph_metrics;
struct
gdi_font_family
{
struct
list
entry
;
unsigned
int
refcount
;
WCHAR
family_name
[
LF_FACESIZE
];
WCHAR
second_name
[
LF_FACESIZE
];
struct
list
faces
;
struct
list
*
replacement
;
struct
list
entry
;
unsigned
int
refcount
;
WCHAR
family_name
[
LF_FACESIZE
];
WCHAR
second_name
[
LF_FACESIZE
];
struct
list
faces
;
struct
gdi_font_family
*
replacement
;
};
struct
bitmap_font_size
...
...
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