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
0c968201
Commit
0c968201
authored
Oct 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetKerningPairs as a standard driver entry point.
parent
d63651fe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
19 deletions
+23
-19
font.c
dlls/gdi32/font.c
+4
-4
freetype.c
dlls/gdi32/freetype.c
+19
-14
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/font.c
View file @
0c968201
...
...
@@ -2664,7 +2664,8 @@ DWORD WINAPI GetKerningPairsW( HDC hDC, DWORD cPairs,
LPKERNINGPAIR
lpKerningPairs
)
{
DC
*
dc
;
DWORD
ret
=
0
;
DWORD
ret
;
PHYSDEV
dev
;
TRACE
(
"(%p,%d,%p)
\n
"
,
hDC
,
cPairs
,
lpKerningPairs
);
...
...
@@ -2677,9 +2678,8 @@ DWORD WINAPI GetKerningPairsW( HDC hDC, DWORD cPairs,
dc
=
get_dc_ptr
(
hDC
);
if
(
!
dc
)
return
0
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetKerningPairs
(
dc
->
gdiFont
,
cPairs
,
lpKerningPairs
);
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetKerningPairs
);
ret
=
dev
->
funcs
->
pGetKerningPairs
(
dev
,
cPairs
,
lpKerningPairs
);
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/freetype.c
View file @
0c968201
...
...
@@ -6896,7 +6896,10 @@ static DWORD parse_format0_kern_subtable(GdiFont *font,
return
nPairs
;
}
DWORD
WineEngGetKerningPairs
(
GdiFont
*
font
,
DWORD
cPairs
,
KERNINGPAIR
*
kern_pair
)
/*************************************************************
* freetype_GetKerningPairs
*/
static
DWORD
freetype_GetKerningPairs
(
PHYSDEV
dev
,
DWORD
cPairs
,
KERNINGPAIR
*
kern_pair
)
{
DWORD
length
;
void
*
buf
;
...
...
@@ -6904,6 +6907,14 @@ DWORD WineEngGetKerningPairs(GdiFont *font, DWORD cPairs, KERNINGPAIR *kern_pair
const
struct
TT_kern_subtable
*
tt_kern_subtable
;
USHORT
i
,
nTables
;
USHORT
*
glyph_to_char
;
GdiFont
*
font
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
(
font
=
physdev
->
font
))
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetKerningPairs
);
return
dev
->
funcs
->
pGetKerningPairs
(
dev
,
cPairs
,
kern_pair
);
}
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
...
...
@@ -6913,11 +6924,11 @@ DWORD WineEngGetKerningPairs(GdiFont *font, DWORD cPairs, KERNINGPAIR *kern_pair
{
cPairs
=
min
(
cPairs
,
font
->
total_kern_pairs
);
memcpy
(
kern_pair
,
font
->
kern_pairs
,
cPairs
*
sizeof
(
*
kern_pair
));
LeaveCriticalSection
(
&
freetype_cs
);
return
cPairs
;
}
else
cPairs
=
font
->
total_kern_pairs
;
LeaveCriticalSection
(
&
freetype_cs
);
return
font
->
total_kern_p
airs
;
return
cP
airs
;
}
font
->
total_kern_pairs
=
0
;
...
...
@@ -7038,11 +7049,11 @@ DWORD WineEngGetKerningPairs(GdiFont *font, DWORD cPairs, KERNINGPAIR *kern_pair
{
cPairs
=
min
(
cPairs
,
font
->
total_kern_pairs
);
memcpy
(
kern_pair
,
font
->
kern_pairs
,
cPairs
*
sizeof
(
*
kern_pair
));
LeaveCriticalSection
(
&
freetype_cs
);
return
cPairs
;
}
else
cPairs
=
font
->
total_kern_pairs
;
LeaveCriticalSection
(
&
freetype_cs
);
return
font
->
total_kern_p
airs
;
return
cP
airs
;
}
static
const
struct
gdi_dc_funcs
freetype_funcs
=
...
...
@@ -7097,7 +7108,7 @@ static const struct gdi_dc_funcs freetype_funcs =
freetype_GetGlyphOutline
,
/* pGetGlyphOutline */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetImage */
NULL
,
/* pGetKerningPairs */
freetype_GetKerningPairs
,
/* pGetKerningPairs */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetOutlineTextMetrics */
NULL
,
/* pGetPixel */
...
...
@@ -7267,12 +7278,6 @@ BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
return
TRUE
;
}
DWORD
WineEngGetKerningPairs
(
GdiFont
*
font
,
DWORD
cPairs
,
KERNINGPAIR
*
kern_pair
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
0
;
}
BOOL
WineEngRealizationInfo
(
GdiFont
*
font
,
realization_info_t
*
info
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
...
...
dlls/gdi32/gdi_private.h
View file @
0c968201
...
...
@@ -293,7 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern
HANDLE
WineEngAddFontMemResourceEx
(
PVOID
,
DWORD
,
PVOID
,
LPDWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetFontData
(
GdiFont
*
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetKerningPairs
(
GdiFont
*
,
DWORD
,
KERNINGPAIR
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
DECLSPEC_HIDDEN
;
extern
UINT
WineEngGetOutlineTextMetrics
(
GdiFont
*
,
UINT
,
LPOUTLINETEXTMETRICW
)
DECLSPEC_HIDDEN
;
extern
UINT
WineEngGetTextCharsetInfo
(
GdiFont
*
font
,
LPFONTSIGNATURE
fs
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
...
...
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