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
e6ab9d30
Commit
e6ab9d30
authored
Oct 24, 1999
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Oct 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that all calls use the extended structures which are a
superset of the regular structures.
parent
9f295f12
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
18 deletions
+44
-18
xfont.c
graphics/x11drv/xfont.c
+8
-2
gdi.h
include/gdi.h
+1
-1
x11font.h
include/x11font.h
+1
-1
font.c
objects/font.c
+34
-14
No files found.
graphics/x11drv/xfont.c
View file @
e6ab9d30
...
...
@@ -1109,6 +1109,12 @@ static UINT XFONT_GetFontMetric( const fontInfo* pfi, const LPENUMLOGFONTEX16 pL
lstrcpynA
(
plf
->
lfFaceName
,
pfi
->
df
.
dfFace
,
LF_FACESIZE
);
#undef plf
/* FIXME: fill in rest of plF values
lstrcpynA(plF->elfFullName, , LF_FULLFACESIZE);
lstrcpynA(plF->elfStyle, , LF_FACESIZE);
lstrcpynA(plF->elfScript, , LF_FACESIZE);
*/
pTM
->
tmAscent
=
pfi
->
df
.
dfAscent
;
pTM
->
tmDescent
=
pTM
->
tmHeight
-
pTM
->
tmAscent
;
pTM
->
tmInternalLeading
=
pfi
->
df
.
dfInternalLeading
;
...
...
@@ -2996,7 +3002,7 @@ BOOL X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
release the crit section, font list will
have to be retraversed on return */
if
(
(
b
=
(
*
proc
)(
(
LPENUMLOGFONT16
)
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
XFONT_GetFontMetric
(
pfi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
else
break
;
...
...
@@ -3008,7 +3014,7 @@ BOOL X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
{
if
(
pfr
->
fi
)
{
if
(
(
b
=
(
*
proc
)(
(
LPENUMLOGFONT16
)
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
XFONT_GetFontMetric
(
pfr
->
fi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
else
break
;
...
...
include/gdi.h
View file @
e6ab9d30
...
...
@@ -165,7 +165,7 @@ typedef struct tagDC
/* Device functions for the Wine driver interface */
typedef
INT
(
*
DEVICEFONTENUMPROC
)(
LPENUMLOGFONT16
,
LPNEWTEXTMETRIC16
,
UINT16
,
LPARAM
);
typedef
INT
(
*
DEVICEFONTENUMPROC
)(
LPENUMLOGFONT
EX
16
,
LPNEWTEXTMETRIC16
,
UINT16
,
LPARAM
);
typedef
struct
tagDC_FUNCS
{
...
...
include/x11font.h
View file @
e6ab9d30
...
...
@@ -201,7 +201,7 @@ typedef struct
typedef
struct
{
LPLOGFONTW
lpLogFontParam
;
FONTENUMPROCW
lpEnumFunc
;
FONTENUMPROC
EX
W
lpEnumFunc
;
LPARAM
lpData
;
LPNEWTEXTMETRICEXW
lpTextMetric
;
...
...
objects/font.c
View file @
e6ab9d30
...
...
@@ -36,7 +36,7 @@ typedef struct
typedef
struct
{
LPLOGFONTW
lpLogFontParam
;
FONTENUMPROC
W
lpEnumFunc
;
FONTENUMPROC
EXW
lpEnumFunc
;
LPARAM
lpData
;
LPNEWTEXTMETRICEXW
lpTextMetric
;
...
...
@@ -132,6 +132,22 @@ void FONT_LogFont16To32W( const LPLOGFONT16 font16, LPLOGFONTW font32 )
lstrcpynAtoW
(
font32
->
lfFaceName
,
font16
->
lfFaceName
,
LF_FACESIZE
);
}
void
FONT_EnumLogFontEx16To32A
(
const
LPENUMLOGFONTEX16
font16
,
LPENUMLOGFONTEXA
font32
)
{
FONT_LogFont16To32A
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTA
)
font32
);
lstrcpynA
(
font32
->
elfFullName
,
font16
->
elfFullName
,
LF_FULLFACESIZE
);
lstrcpynA
(
font32
->
elfStyle
,
font16
->
elfStyle
,
LF_FACESIZE
);
lstrcpynA
(
font32
->
elfScript
,
font16
->
elfScript
,
LF_FACESIZE
);
}
void
FONT_EnumLogFontEx16To32W
(
const
LPENUMLOGFONTEX16
font16
,
LPENUMLOGFONTEXW
font32
)
{
FONT_LogFont16To32W
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTW
)
font32
);
lstrcpynAtoW
(
font32
->
elfFullName
,
font16
->
elfFullName
,
LF_FULLFACESIZE
);
lstrcpynAtoW
(
font32
->
elfStyle
,
font16
->
elfStyle
,
LF_FACESIZE
);
lstrcpynAtoW
(
font32
->
elfScript
,
font16
->
elfScript
,
LF_FACESIZE
);
}
/***********************************************************************
* TEXTMETRIC conversion functions.
*/
...
...
@@ -429,7 +445,7 @@ INT FONT_GetObjectW( FONTOBJ *font, INT count, LPSTR buffer )
* Called by the device driver layer to pass font info
* down to the application.
*/
static
INT
FONT_EnumInstance16
(
LPENUMLOGFONT16
plf
,
static
INT
FONT_EnumInstance16
(
LPENUMLOGFONT
EX
16
plf
,
LPNEWTEXTMETRIC16
ptm
,
UINT16
fType
,
LPARAM
lp
)
{
#define pfe ((fontEnum16*)lp)
...
...
@@ -448,7 +464,7 @@ static INT FONT_EnumInstance16( LPENUMLOGFONT16 plf,
/***********************************************************************
* FONT_EnumInstance
*/
static
INT
FONT_EnumInstance
(
LPENUMLOGFONT16
plf
,
static
INT
FONT_EnumInstance
(
LPENUMLOGFONT
EX
16
plf
,
LPNEWTEXTMETRIC16
ptm
,
UINT16
fType
,
LPARAM
lp
)
{
/* lfCharSet is at the same offset in both LOGFONT32A and LOGFONT32W */
...
...
@@ -461,17 +477,21 @@ static INT FONT_EnumInstance( LPENUMLOGFONT16 plf,
if
(
pfe
->
dwFlags
&
ENUM_UNICODE
)
{
FONT_
LogFont16To32W
(
&
plf
->
elfLogFont
,
(
LPLOGFONTW
)(
pfe
->
lpLogFont
)
);
FONT_
EnumLogFontEx16To32W
(
plf
,
pfe
->
lpLogFont
);
FONT_TextMetric16to32W
(
(
LPTEXTMETRIC16
)
ptm
,
(
LPTEXTMETRICW
)(
pfe
->
lpTextMetric
)
);
return
pfe
->
lpEnumFunc
(
pfe
->
lpLogFont
,
pfe
->
lpTextMetric
,
fType
,
pfe
->
lpData
);
}
else
{
FONT_LogFont16To32A
(
&
plf
->
elfLogFont
,
(
LPLOGFONTA
)
pfe
->
lpLogFont
);
ENUMLOGFONTEXA
logfont
;
FONT_EnumLogFontEx16To32A
(
plf
,
&
logfont
);
FONT_TextMetric16to32A
(
(
LPTEXTMETRIC16
)
ptm
,
(
LPTEXTMETRICA
)
pfe
->
lpTextMetric
);
}
return
pfe
->
lpEnumFunc
(
(
LPENUMLOGFONTW
)
pfe
->
lpLogFont
,
(
LPNEWTEXTMETRICW
)
pfe
->
lpTextMetric
,
fType
,
pfe
->
lpData
);
return
pfe
->
lpEnumFunc
(
(
LPENUMLOGFONTEXW
)
&
logfont
,
pfe
->
lpTextMetric
,
fType
,
pfe
->
lpData
);
}
}
#undef pfe
return
1
;
...
...
@@ -519,7 +539,7 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
/***********************************************************************
* FONT_EnumFontFamiliesEx
*/
static
INT
FONT_EnumFontFamiliesEx
(
HDC
hDC
,
LPLOGFONTW
plf
,
FONTENUMPROCW
efproc
,
static
INT
FONT_EnumFontFamiliesEx
(
HDC
hDC
,
LPLOGFONTW
plf
,
FONTENUMPROC
EX
W
efproc
,
LPARAM
lParam
,
DWORD
dwUnicode
)
{
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hDC
,
DC_MAGIC
);
...
...
@@ -563,8 +583,7 @@ INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
FONTENUMPROCEXW
efproc
,
LPARAM
lParam
,
DWORD
dwFlags
)
{
return
FONT_EnumFontFamiliesEx
(
hDC
,
plf
,
(
FONTENUMPROCW
)
efproc
,
lParam
,
ENUM_UNICODE
);
return
FONT_EnumFontFamiliesEx
(
hDC
,
plf
,
efproc
,
lParam
,
ENUM_UNICODE
);
}
/***********************************************************************
...
...
@@ -575,7 +594,7 @@ INT WINAPI EnumFontFamiliesExA( HDC hDC, LPLOGFONTA plf,
LPARAM
lParam
,
DWORD
dwFlags
)
{
return
FONT_EnumFontFamiliesEx
(
hDC
,
(
LPLOGFONTW
)
plf
,
(
FONTENUMPROCW
)
efproc
,
lParam
,
0
);
(
FONTENUMPROC
EX
W
)
efproc
,
lParam
,
0
);
}
/***********************************************************************
...
...
@@ -606,7 +625,7 @@ INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily,
else
lf
.
lfFaceName
[
0
]
=
lf
.
lfFaceName
[
1
]
=
'\0'
;
return
FONT_EnumFontFamiliesEx
(
hDC
,
(
LPLOGFONTW
)
&
lf
,
(
FONTENUMPROCW
)
efproc
,
lpData
,
0
);
(
FONTENUMPROC
EX
W
)
efproc
,
lpData
,
0
);
}
/***********************************************************************
...
...
@@ -621,7 +640,8 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
if
(
lpFamily
)
lstrcpynW
(
lf
.
lfFaceName
,
lpFamily
,
LF_FACESIZE
);
else
lf
.
lfFaceName
[
0
]
=
0
;
return
FONT_EnumFontFamiliesEx
(
hDC
,
&
lf
,
efproc
,
lpData
,
ENUM_UNICODE
);
return
FONT_EnumFontFamiliesEx
(
hDC
,
&
lf
,
(
FONTENUMPROCEXW
)
efproc
,
lpData
,
ENUM_UNICODE
);
}
/***********************************************************************
...
...
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