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
2d15ea50
Commit
2d15ea50
authored
Oct 22, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move the GetFontFileData() implementation out of freetype.c.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3b08dd3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
77 deletions
+49
-77
font.c
dlls/gdi32/font.c
+10
-2
freetype.c
dlls/gdi32/freetype.c
+27
-72
gdi_private.h
dlls/gdi32/gdi_private.h
+12
-3
No files found.
dlls/gdi32/font.c
View file @
2d15ea50
...
...
@@ -1044,7 +1044,7 @@ static DWORD CDECL font_GetFontData( PHYSDEV dev, DWORD table, DWORD offset, voi
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetFontData
);
return
dev
->
funcs
->
pGetFontData
(
dev
,
table
,
offset
,
buf
,
size
);
}
return
font_funcs
->
pGetFontD
ata
(
physdev
->
font
,
table
,
offset
,
buf
,
size
);
return
font_funcs
->
get_font_d
ata
(
physdev
->
font
,
table
,
offset
,
buf
,
size
);
}
...
...
@@ -5412,12 +5412,20 @@ BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
BOOL
WINAPI
GetFontFileData
(
DWORD
instance_id
,
DWORD
unknown
,
UINT64
offset
,
void
*
buff
,
DWORD
buff_size
)
{
struct
gdi_font
*
font
;
DWORD
tag
=
0
,
size
;
BOOL
ret
=
FALSE
;
if
(
!
font_funcs
)
return
FALSE
;
EnterCriticalSection
(
&
font_cs
);
if
((
font
=
get_font_from_handle
(
instance_id
)))
ret
=
font_funcs
->
pGetFontFileData
(
font
,
unknown
,
offset
,
buff
,
buff_size
);
{
if
(
font
->
ttc_item_offset
)
tag
=
MS_TTCF_TAG
;
size
=
font_funcs
->
get_font_data
(
font
,
tag
,
0
,
NULL
,
0
);
if
(
size
!=
GDI_ERROR
&&
size
>=
buff_size
&&
offset
<=
size
-
buff_size
)
ret
=
font_funcs
->
get_font_data
(
font
,
tag
,
offset
,
buff
,
buff_size
)
!=
GDI_ERROR
;
else
SetLastError
(
ERROR_INVALID_PARAMETER
);
}
LeaveCriticalSection
(
&
font_cs
);
return
ret
;
}
...
...
dlls/gdi32/freetype.c
View file @
2d15ea50
This diff is collapsed.
Click to expand it.
dlls/gdi32/gdi_private.h
View file @
2d15ea50
...
...
@@ -332,6 +332,7 @@ struct gdi_font
UINT
ntmCellHeight
;
UINT
ntmAvgWidth
;
UINT
aa_flags
;
ULONG
ttc_item_offset
;
/* 0 if font is not a part of TrueType collection */
BOOL
can_use_bitmap
:
1
;
BOOL
fake_italic
:
1
;
BOOL
fake_bold
:
1
;
...
...
@@ -340,12 +341,20 @@ struct gdi_font
struct
font_fileinfo
*
fileinfo
;
};
#define MS_MAKE_TAG(ch1,ch2,ch3,ch4) \
(((DWORD)ch4 << 24) | ((DWORD)ch3 << 16) | ((DWORD)ch2 << 8) | (DWORD)ch1)
#define MS_GASP_TAG MS_MAKE_TAG('g', 'a', 's', 'p')
#define MS_GSUB_TAG MS_MAKE_TAG('G', 'S', 'U', 'B')
#define MS_KERN_TAG MS_MAKE_TAG('k', 'e', 'r', 'n')
#define MS_TTCF_TAG MS_MAKE_TAG('t', 't', 'c', 'f')
#define MS_VDMX_TAG MS_MAKE_TAG('V', 'D', 'M', 'X')
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
*
pGetFontData
)(
struct
gdi_font
*
font
,
DWORD
table
,
DWORD
offset
,
void
*
buf
,
DWORD
size
);
DWORD
(
CDECL
*
pGetFontUnicodeRanges
)(
struct
gdi_font
*
font
,
GLYPHSET
*
glyphset
);
DWORD
(
CDECL
*
pGetGlyphIndices
)(
struct
gdi_font
*
font
,
const
WCHAR
*
str
,
INT
count
,
WORD
*
gi
,
DWORD
flags
);
DWORD
(
CDECL
*
pGetKerningPairs
)(
struct
gdi_font
*
font
,
DWORD
count
,
KERNINGPAIR
*
pairs
);
...
...
@@ -358,10 +367,10 @@ struct font_backend_funcs
HANDLE
(
CDECL
*
pAddFontMemResourceEx
)(
void
*
font
,
DWORD
size
,
PVOID
pdv
,
DWORD
*
count
);
BOOL
(
CDECL
*
pCreateScalableFontResource
)(
DWORD
hidden
,
LPCWSTR
resource
,
LPCWSTR
font_file
,
LPCWSTR
font_path
);
BOOL
(
CDECL
*
pGetFontFileData
)(
struct
gdi_font
*
font
,
DWORD
unknown
,
UINT64
offset
,
void
*
buff
,
DWORD
buff_size
);
BOOL
(
CDECL
*
alloc_font
)(
struct
gdi_font
*
font
);
DWORD
(
CDECL
*
get_font_data
)(
struct
gdi_font
*
gdi_font
,
DWORD
table
,
DWORD
offset
,
void
*
buf
,
DWORD
count
);
DWORD
(
CDECL
*
get_glyph_outline
)(
struct
gdi_font
*
font
,
UINT
glyph
,
UINT
format
,
GLYPHMETRICS
*
gm
,
ABC
*
abc
,
DWORD
buflen
,
void
*
buf
,
const
MAT2
*
mat
);
void
(
CDECL
*
destroy_font
)(
struct
gdi_font
*
font
);
...
...
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