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
32f1ac3a
Commit
32f1ac3a
authored
Jan 18, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the exported FONTENUMPROCW as parameter in the EnumDeviceFonts
driver function instead of defining a private function type.
parent
e97fb4b0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
28 deletions
+31
-28
freetype.c
dlls/gdi/freetype.c
+3
-4
gdi_private.h
dlls/gdi/gdi_private.h
+2
-2
builtin.c
dlls/wineps/builtin.c
+3
-3
x11drv.h
dlls/x11drv/x11drv.h
+1
-1
xfont.c
dlls/x11drv/xfont.c
+3
-3
gdi.h
include/gdi.h
+0
-2
font.c
objects/font.c
+19
-13
No files found.
dlls/gdi/freetype.c
View file @
32f1ac3a
...
...
@@ -1507,8 +1507,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf,
* WineEngEnumFonts
*
*/
DWORD
WineEngEnumFonts
(
LPLOGFONTW
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lparam
)
DWORD
WineEngEnumFonts
(
LPLOGFONTW
plf
,
FONTENUMPROCW
proc
,
LPARAM
lparam
)
{
Family
*
family
;
Face
*
face
;
...
...
@@ -1561,7 +1560,7 @@ DWORD WineEngEnumFonts(LPLOGFONTW plf, DEVICEFONTENUMPROC proc,
csi
.
ciCharset
,
type
,
debugstr_w
(
elf
.
elfScript
),
elf
.
elfLogFont
.
lfItalic
,
elf
.
elfLogFont
.
lfWeight
,
ntm
.
ntmTm
.
ntmFlags
);
ret
=
proc
(
&
elf
,
&
ntm
,
type
,
lparam
);
ret
=
proc
(
&
elf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
ntm
,
type
,
lparam
);
if
(
!
ret
)
goto
end
;
}
}
...
...
@@ -1593,7 +1592,7 @@ DWORD WineEngEnumFonts(LPLOGFONTW plf, DEVICEFONTENUMPROC proc,
csi
.
ciCharset
,
type
,
debugstr_w
(
elf
.
elfScript
),
elf
.
elfLogFont
.
lfItalic
,
elf
.
elfLogFont
.
lfWeight
,
ntm
.
ntmTm
.
ntmFlags
);
ret
=
proc
(
&
elf
,
&
ntm
,
type
,
lparam
);
ret
=
proc
(
&
elf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
ntm
,
type
,
lparam
);
if
(
!
ret
)
goto
end
;
}
}
...
...
dlls/gdi/gdi_private.h
View file @
32f1ac3a
...
...
@@ -70,7 +70,7 @@ typedef struct tagDC_FUNCS
INT
(
*
pEndDoc
)(
PHYSDEV
);
INT
(
*
pEndPage
)(
PHYSDEV
);
BOOL
(
*
pEndPath
)(
PHYSDEV
);
BOOL
(
*
pEnumDeviceFonts
)(
PHYSDEV
,
LPLOGFONTW
,
DEVICEFONTENUMPROC
,
LPARAM
);
BOOL
(
*
pEnumDeviceFonts
)(
PHYSDEV
,
LPLOGFONTW
,
FONTENUMPROCW
,
LPARAM
);
INT
(
*
pExcludeClipRect
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
);
INT
(
*
pExtDeviceMode
)(
LPSTR
,
HWND
,
LPDEVMODEA
,
LPSTR
,
LPSTR
,
LPDEVMODEA
,
LPSTR
,
DWORD
);
INT
(
*
pExtEscape
)(
PHYSDEV
,
INT
,
INT
,
LPCVOID
,
INT
,
LPVOID
);
...
...
@@ -217,7 +217,7 @@ extern HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk );
extern
INT
WineEngAddFontResourceEx
(
LPCWSTR
,
DWORD
,
PVOID
);
extern
GdiFont
WineEngCreateFontInstance
(
DC
*
,
HFONT
);
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
DEVICEFONTENUMPROC
,
LPARAM
);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
FONTENUMPROCW
,
LPARAM
);
extern
BOOL
WineEngGetCharWidth
(
GdiFont
,
UINT
,
UINT
,
LPINT
);
extern
DWORD
WineEngGetFontData
(
GdiFont
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
);
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
font
,
LPCWSTR
lpstr
,
INT
count
,
...
...
dlls/wineps/builtin.c
View file @
32f1ac3a
...
...
@@ -396,7 +396,7 @@ static UINT PSDRV_GetFontMetric(HDC hdc, const AFM *afm,
* PSDRV_EnumDeviceFonts
*/
BOOL
PSDRV_EnumDeviceFonts
(
PSDRV_PDEVICE
*
physDev
,
LPLOGFONTW
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
FONTENUMPROCW
proc
,
LPARAM
lp
)
{
ENUMLOGFONTEXW
lf
;
NEWTEXTMETRICEXW
tm
;
...
...
@@ -417,7 +417,7 @@ BOOL PSDRV_EnumDeviceFonts( PSDRV_PDEVICE *physDev, LPLOGFONTW plf,
if
(
family
)
{
for
(
afmle
=
family
->
afmlist
;
afmle
;
afmle
=
afmle
->
next
)
{
TRACE
(
"Got '%s'
\n
"
,
afmle
->
afm
->
FontName
);
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
tm
,
PSDRV_GetFontMetric
(
physDev
->
hdc
,
afmle
->
afm
,
&
tm
,
&
lf
),
lp
))
)
bRet
=
b
;
...
...
@@ -430,7 +430,7 @@ BOOL PSDRV_EnumDeviceFonts( PSDRV_PDEVICE *physDev, LPLOGFONTW plf,
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
afmle
=
family
->
afmlist
;
TRACE
(
"Got '%s'
\n
"
,
afmle
->
afm
->
FontName
);
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
tm
,
PSDRV_GetFontMetric
(
physDev
->
hdc
,
afmle
->
afm
,
&
tm
,
&
lf
),
lp
))
)
bRet
=
b
;
...
...
dlls/x11drv/x11drv.h
View file @
32f1ac3a
...
...
@@ -121,7 +121,7 @@ extern BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
INT
width
,
INT
height
,
X11DRV_PDEVICE
*
physDevSrc
,
INT
xSrc
,
INT
ySrc
,
DWORD
rop
);
extern
BOOL
X11DRV_EnumDeviceFonts
(
X11DRV_PDEVICE
*
physDev
,
LPLOGFONTW
plf
,
DEVICEFONTENUMPROC
dfeproc
,
LPARAM
lp
);
FONTENUMPROCW
dfeproc
,
LPARAM
lp
);
extern
LONG
X11DRV_GetBitmapBits
(
HBITMAP
hbitmap
,
void
*
bits
,
LONG
count
);
extern
BOOL
X11DRV_GetCharWidth
(
X11DRV_PDEVICE
*
physDev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
);
...
...
dlls/x11drv/xfont.c
View file @
32f1ac3a
...
...
@@ -3347,7 +3347,7 @@ HFONT X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont )
* X11DRV_EnumDeviceFonts
*/
BOOL
X11DRV_EnumDeviceFonts
(
X11DRV_PDEVICE
*
physDev
,
LPLOGFONTW
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
FONTENUMPROCW
proc
,
LPARAM
lp
)
{
ENUMLOGFONTEXW
lf
;
NEWTEXTMETRICEXW
tm
;
...
...
@@ -3375,7 +3375,7 @@ BOOL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
if
(
plf
->
lfCharSet
==
DEFAULT_CHARSET
||
plf
->
lfCharSet
==
pfi
->
df
.
dfCharSet
)
{
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
tm
,
XFONT_GetFontMetric
(
pfi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
else
break
;
...
...
@@ -3388,7 +3388,7 @@ BOOL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
{
if
(
pfr
->
fi
)
{
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
.
elfLogFont
,
(
TEXTMETRICW
*
)
&
tm
,
XFONT_GetFontMetric
(
pfr
->
fi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
else
break
;
...
...
include/gdi.h
View file @
32f1ac3a
...
...
@@ -160,8 +160,6 @@ typedef struct tagDC
BOOL
vport2WorldValid
;
/* Is xformVport2World valid? */
}
DC
;
typedef
INT
(
*
DEVICEFONTENUMPROC
)(
LPENUMLOGFONTEXW
,
NEWTEXTMETRICEXW
*
,
DWORD
,
LPARAM
);
/* extra stock object: default 1x1 bitmap for memory DCs */
#define DEFAULT_BITMAP (STOCK_LAST+1)
...
...
objects/font.c
View file @
32f1ac3a
...
...
@@ -569,22 +569,25 @@ static BOOL FONT_DeleteObject( HGDIOBJ handle, void *obj )
*
* Called by the device driver layer to pass font info
* down to the application.
*
* Note: plf is really an ENUMLOGFONTEXW, and ptm is a NEWTEXTMETRICEXW.
* We have to use other types because of the FONTENUMPROCW definition.
*/
static
INT
FONT_EnumInstance16
(
LPENUMLOGFONTEXW
plf
,
NEWTEXTMETRICEX
W
*
ptm
,
DWORD
fType
,
LPARAM
lp
)
static
INT
CALLBACK
FONT_EnumInstance16
(
const
LOGFONTW
*
plf
,
const
TEXTMETRIC
W
*
ptm
,
DWORD
fType
,
LPARAM
lp
)
{
fontEnum16
*
pfe
=
(
fontEnum16
*
)
lp
;
INT
ret
=
1
;
DC
*
dc
;
if
(
pfe
->
lpLogFontParam
->
lfCharSet
==
DEFAULT_CHARSET
||
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
elfLogFont
.
lfCharSet
)
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
lfCharSet
)
{
WORD
args
[
7
];
DWORD
result
;
FONT_EnumLogFontExWTo16
(
plf
,
pfe
->
lpLogFont
);
FONT_NewTextMetricExWTo16
(
ptm
,
pfe
->
lpTextMetric
);
FONT_EnumLogFontExWTo16
(
(
const
ENUMLOGFONTEXW
*
)
plf
,
pfe
->
lpLogFont
);
FONT_NewTextMetricExWTo16
((
const
NEWTEXTMETRICEXW
*
)
ptm
,
pfe
->
lpTextMetric
);
pfe
->
dwFlags
|=
ENUM_CALLED
;
GDI_ReleaseObj
(
pfe
->
hdc
);
/* release the GDI lock */
...
...
@@ -612,9 +615,12 @@ static INT FONT_EnumInstance16( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
/***********************************************************************
* FONT_EnumInstance
*
* Note: plf is really an ENUMLOGFONTEXW, and ptm is a NEWTEXTMETRICEXW.
* We have to use other types because of the FONTENUMPROCW definition.
*/
static
INT
FONT_EnumInstance
(
LPENUMLOGFONTEXW
plf
,
NEWTEXTMETRICEX
W
*
ptm
,
DWORD
fType
,
LPARAM
lp
)
static
INT
CALLBACK
FONT_EnumInstance
(
const
LOGFONTW
*
plf
,
const
TEXTMETRIC
W
*
ptm
,
DWORD
fType
,
LPARAM
lp
)
{
fontEnum32
*
pfe
=
(
fontEnum32
*
)
lp
;
INT
ret
=
1
;
...
...
@@ -622,7 +628,7 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
/* lfCharSet is at the same offset in both LOGFONTA and LOGFONTW */
if
(
pfe
->
lpLogFontParam
->
lfCharSet
==
DEFAULT_CHARSET
||
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
elfLogFont
.
lfCharSet
)
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
lfCharSet
)
{
/* convert font metrics */
ENUMLOGFONTEXA
logfont
;
...
...
@@ -631,14 +637,14 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
pfe
->
dwFlags
|=
ENUM_CALLED
;
if
(
!
(
pfe
->
dwFlags
&
ENUM_UNICODE
))
{
FONT_EnumLogFontExWToA
(
plf
,
&
logfont
);
FONT_NewTextMetricExWToA
(
ptm
,
&
tmA
);
plf
=
(
L
PENUMLOGFONTEXW
)
&
logf
ont
;
ptm
=
(
NEWTEXTMETRICEX
W
*
)
&
tmA
;
FONT_EnumLogFontExWToA
(
(
const
ENUMLOGFONTEXW
*
)
plf
,
&
logfont
);
FONT_NewTextMetricExWToA
(
(
const
NEWTEXTMETRICEXW
*
)
ptm
,
&
tmA
);
plf
=
(
L
OGFONTW
*
)
&
logfont
.
elfLogF
ont
;
ptm
=
(
TEXTMETRIC
W
*
)
&
tmA
;
}
GDI_ReleaseObj
(
pfe
->
hdc
);
/* release the GDI lock */
ret
=
pfe
->
lpEnumFunc
(
&
plf
->
elfLogFont
,
(
TEXTMETRICW
*
)
ptm
,
fType
,
pfe
->
lpData
);
ret
=
pfe
->
lpEnumFunc
(
plf
,
ptm
,
fType
,
pfe
->
lpData
);
/* get the lock again and make sure the DC is still valid */
dc
=
DC_GetDCPtr
(
pfe
->
hdc
);
...
...
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