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
37494499
Commit
37494499
authored
Oct 28, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move part of the GetFontUnicodeRanges() implementation out of freetype.c.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
85458d80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
font.c
dlls/gdi32/font.c
+11
-1
freetype.c
dlls/gdi32/freetype.c
+7
-21
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/font.c
View file @
37494499
...
...
@@ -1118,13 +1118,23 @@ static BOOL CDECL font_GetFontRealizationInfo( PHYSDEV dev, void *ptr )
static
DWORD
CDECL
font_GetFontUnicodeRanges
(
PHYSDEV
dev
,
GLYPHSET
*
glyphset
)
{
struct
font_physdev
*
physdev
=
get_font_dev
(
dev
);
DWORD
size
,
num_ranges
;
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetFontUnicodeRanges
);
return
dev
->
funcs
->
pGetFontUnicodeRanges
(
dev
,
glyphset
);
}
return
font_funcs
->
pGetFontUnicodeRanges
(
physdev
->
font
,
glyphset
);
num_ranges
=
font_funcs
->
get_unicode_ranges
(
physdev
->
font
,
glyphset
);
size
=
offsetof
(
GLYPHSET
,
ranges
[
num_ranges
]
);
if
(
glyphset
)
{
glyphset
->
cbThis
=
size
;
glyphset
->
cRanges
=
num_ranges
;
glyphset
->
flAccel
=
0
;
}
return
size
;
}
...
...
dlls/gdi32/freetype.c
View file @
37494499
...
...
@@ -6680,12 +6680,16 @@ static BOOL CDECL freetype_GetCharWidthInfo( struct gdi_font *gdi_font, struct c
}
/* Retrieve a list of supported Unicode ranges for a given font.
/*************************************************************
* freetype_get_unicode_ranges
*
* Retrieve a list of supported Unicode ranges for a given font.
* Can be called with NULL gs to calculate the buffer size. Returns
* the number of ranges found.
*/
static
DWORD
get_font_unicode_ranges
(
FT_Face
face
,
GLYPHSET
*
gs
)
static
DWORD
CDECL
freetype_get_unicode_ranges
(
struct
gdi_font
*
font
,
GLYPHSET
*
gs
)
{
FT_Face
face
=
get_font_ptr
(
font
)
->
ft_face
;
DWORD
num_ranges
=
0
;
if
(
face
->
charmap
->
encoding
==
FT_ENCODING_UNICODE
)
...
...
@@ -6745,24 +6749,6 @@ static DWORD get_font_unicode_ranges(FT_Face face, GLYPHSET *gs)
}
/*************************************************************
* freetype_GetFontUnicodeRanges
*/
static
DWORD
CDECL
freetype_GetFontUnicodeRanges
(
struct
gdi_font
*
font
,
GLYPHSET
*
glyphset
)
{
DWORD
size
,
num_ranges
;
num_ranges
=
get_font_unicode_ranges
(
get_font_ptr
(
font
)
->
ft_face
,
glyphset
);
size
=
sizeof
(
GLYPHSET
)
+
sizeof
(
WCRANGE
)
*
(
num_ranges
-
1
);
if
(
glyphset
)
{
glyphset
->
cbThis
=
size
;
glyphset
->
cRanges
=
num_ranges
;
glyphset
->
flAccel
=
0
;
}
return
size
;
}
/*************************************************************
* freetype_FontIsLinked
*/
static
BOOL
CDECL
freetype_FontIsLinked
(
struct
gdi_font
*
font
)
...
...
@@ -6988,7 +6974,6 @@ static const struct font_backend_funcs font_funcs =
freetype_EnumFonts
,
freetype_FontIsLinked
,
freetype_GetCharWidthInfo
,
freetype_GetFontUnicodeRanges
,
freetype_SelectFont
,
freetype_add_font
,
freetype_add_mem_font
,
...
...
@@ -6998,6 +6983,7 @@ static const struct font_backend_funcs font_funcs =
freetype_get_glyph_index
,
freetype_get_default_glyph
,
freetype_get_glyph_outline
,
freetype_get_unicode_ranges
,
freetype_set_outline_text_metrics
,
freetype_set_bitmap_text_metrics
,
freetype_get_kerning_pairs
,
...
...
dlls/gdi32/gdi_private.h
View file @
37494499
...
...
@@ -367,7 +367,6 @@ struct font_backend_funcs
BOOL
(
CDECL
*
pEnumFonts
)(
LOGFONTW
*
lf
,
FONTENUMPROCW
proc
,
LPARAM
lparam
);
BOOL
(
CDECL
*
pFontIsLinked
)(
struct
gdi_font
*
font
);
BOOL
(
CDECL
*
pGetCharWidthInfo
)(
struct
gdi_font
*
font
,
struct
char_width_info
*
info
);
DWORD
(
CDECL
*
pGetFontUnicodeRanges
)(
struct
gdi_font
*
font
,
GLYPHSET
*
glyphset
);
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
);
...
...
@@ -381,6 +380,7 @@ struct font_backend_funcs
UINT
(
CDECL
*
get_default_glyph
)(
struct
gdi_font
*
gdi_font
);
DWORD
(
CDECL
*
get_glyph_outline
)(
struct
gdi_font
*
font
,
UINT
glyph
,
UINT
format
,
GLYPHMETRICS
*
gm
,
ABC
*
abc
,
DWORD
buflen
,
void
*
buf
,
const
MAT2
*
mat
);
DWORD
(
CDECL
*
get_unicode_ranges
)(
struct
gdi_font
*
font
,
GLYPHSET
*
gs
);
BOOL
(
CDECL
*
set_outline_text_metrics
)(
struct
gdi_font
*
font
);
BOOL
(
CDECL
*
set_bitmap_text_metrics
)(
struct
gdi_font
*
font
);
DWORD
(
CDECL
*
get_kerning_pairs
)(
struct
gdi_font
*
gdi_font
,
KERNINGPAIR
**
kern_pair
);
...
...
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