Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2aa85eed
Commit
2aa85eed
authored
Feb 14, 2001
by
Huw D M Davies
Committed by
Alexandre Julliard
Feb 14, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change FONTOBJ to use LOGFONTW rather than LOGFONT16.
Updated parameters of DEVICEFONTENUMPROC.
parent
1da34891
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
505 additions
and
333 deletions
+505
-333
font.c
dlls/wineps/font.c
+38
-31
psdrv.h
dlls/wineps/psdrv.h
+2
-3
objects.c
graphics/enhmetafiledrv/objects.c
+1
-1
objects.c
graphics/metafiledrv/objects.c
+3
-1
font.c
graphics/win16drv/font.c
+40
-11
xfont.c
graphics/x11drv/xfont.c
+56
-36
font.h
include/font.h
+13
-11
gdi.h
include/gdi.h
+3
-2
win16drv.h
include/win16drv.h
+2
-2
x11drv.h
include/x11drv.h
+1
-1
font.c
objects/font.c
+317
-189
gdiobj.c
objects/gdiobj.c
+29
-45
No files found.
dlls/wineps/font.c
View file @
2aa85eed
...
@@ -22,7 +22,7 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
...
@@ -22,7 +22,7 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
{
{
HFONT16
prevfont
=
dc
->
hFont
;
HFONT16
prevfont
=
dc
->
hFont
;
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
LOGFONT
16
*
lf
=
&
(
font
->
logfont
);
LOGFONT
W
*
lf
=
&
(
font
->
logfont
);
BOOL
bd
=
FALSE
,
it
=
FALSE
;
BOOL
bd
=
FALSE
,
it
=
FALSE
;
AFMLISTENTRY
*
afmle
;
AFMLISTENTRY
*
afmle
;
AFM
*
afm
;
AFM
*
afm
;
...
@@ -30,8 +30,9 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
...
@@ -30,8 +30,9 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
char
FaceName
[
LF_FACESIZE
];
char
FaceName
[
LF_FACESIZE
];
TRACE
(
"FaceName = '%s' Height = %d Italic = %d Weight = %d
\n
"
,
TRACE
(
"FaceName = '%s' Height = %ld Italic = %d Weight = %ld
\n
"
,
lf
->
lfFaceName
,
lf
->
lfHeight
,
lf
->
lfItalic
,
lf
->
lfWeight
);
debugstr_w
(
lf
->
lfFaceName
),
lf
->
lfHeight
,
lf
->
lfItalic
,
lf
->
lfWeight
);
dc
->
hFont
=
hfont
;
dc
->
hFont
=
hfont
;
...
@@ -39,7 +40,8 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
...
@@ -39,7 +40,8 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
it
=
TRUE
;
it
=
TRUE
;
if
(
lf
->
lfWeight
>
550
)
if
(
lf
->
lfWeight
>
550
)
bd
=
TRUE
;
bd
=
TRUE
;
strcpy
(
FaceName
,
lf
->
lfFaceName
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lf
->
lfFaceName
,
-
1
,
FaceName
,
sizeof
(
FaceName
),
NULL
,
NULL
);
if
(
FaceName
[
0
]
==
'\0'
)
{
if
(
FaceName
[
0
]
==
'\0'
)
{
switch
(
lf
->
lfPitchAndFamily
&
0xf0
)
{
switch
(
lf
->
lfPitchAndFamily
&
0xf0
)
{
...
@@ -270,8 +272,8 @@ BOOL PSDRV_SetFont( DC *dc )
...
@@ -270,8 +272,8 @@ BOOL PSDRV_SetFont( DC *dc )
/***********************************************************************
/***********************************************************************
* PSDRV_GetFontMetric
* PSDRV_GetFontMetric
*/
*/
static
UINT
PSDRV_GetFontMetric
(
HDC
hdc
,
AFM
*
pafm
,
NEWTEXTMETRIC
16
*
pTM
,
static
UINT
PSDRV_GetFontMetric
(
HDC
hdc
,
AFM
*
pafm
,
NEWTEXTMETRIC
EXW
*
pTM
,
ENUMLOGFONTEX16
*
pLF
,
INT16
size
)
ENUMLOGFONTEXW
*
pLF
,
INT16
size
)
{
{
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
...
@@ -282,52 +284,55 @@ static UINT PSDRV_GetFontMetric(HDC hdc, AFM *pafm, NEWTEXTMETRIC16 *pTM,
...
@@ -282,52 +284,55 @@ static UINT PSDRV_GetFontMetric(HDC hdc, AFM *pafm, NEWTEXTMETRIC16 *pTM,
memset
(
pLF
,
0
,
sizeof
(
*
pLF
)
);
memset
(
pLF
,
0
,
sizeof
(
*
pLF
)
);
memset
(
pTM
,
0
,
sizeof
(
*
pTM
)
);
memset
(
pTM
,
0
,
sizeof
(
*
pTM
)
);
#define plf ((LPLOGFONT16)pLF)
#define plf ((LPLOGFONTW)pLF)
plf
->
lfHeight
=
pTM
->
tmHeight
=
size
;
#define ptm ((LPNEWTEXTMETRICW)pTM)
plf
->
lfWidth
=
pTM
->
tmAveCharWidth
=
pafm
->
CharWidths
[
120
]
*
scale
;
plf
->
lfHeight
=
ptm
->
tmHeight
=
size
;
plf
->
lfWeight
=
pTM
->
tmWeight
=
pafm
->
Weight
;
plf
->
lfWidth
=
ptm
->
tmAveCharWidth
=
pafm
->
CharWidths
[
120
]
*
scale
;
plf
->
lfItalic
=
pTM
->
tmItalic
=
pafm
->
ItalicAngle
!=
0
.
0
;
plf
->
lfWeight
=
ptm
->
tmWeight
=
pafm
->
Weight
;
plf
->
lfUnderline
=
pTM
->
tmUnderlined
=
0
;
plf
->
lfItalic
=
ptm
->
tmItalic
=
pafm
->
ItalicAngle
!=
0
.
0
;
plf
->
lfStrikeOut
=
pTM
->
tmStruckOut
=
0
;
plf
->
lfUnderline
=
ptm
->
tmUnderlined
=
0
;
plf
->
lfCharSet
=
pTM
->
tmCharSet
=
ANSI_CHARSET
;
plf
->
lfStrikeOut
=
ptm
->
tmStruckOut
=
0
;
plf
->
lfCharSet
=
ptm
->
tmCharSet
=
ANSI_CHARSET
;
/* convert pitch values */
/* convert pitch values */
p
TM
->
tmPitchAndFamily
=
pafm
->
IsFixedPitch
?
0
:
TMPF_FIXED_PITCH
;
p
tm
->
tmPitchAndFamily
=
pafm
->
IsFixedPitch
?
0
:
TMPF_FIXED_PITCH
;
p
TM
->
tmPitchAndFamily
|=
TMPF_DEVICE
;
p
tm
->
tmPitchAndFamily
|=
TMPF_DEVICE
;
plf
->
lfPitchAndFamily
=
0
;
plf
->
lfPitchAndFamily
=
0
;
lstrcpynA
(
plf
->
lfFaceName
,
pafm
->
FamilyName
,
LF_FACESIZE
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pafm
->
FamilyName
,
-
1
,
plf
->
lfFaceName
,
LF_FACESIZE
);
#undef plf
#undef plf
p
TM
->
tmAscent
=
pafm
->
FullAscender
*
scale
;
p
tm
->
tmAscent
=
pafm
->
FullAscender
*
scale
;
p
TM
->
tmDescent
=
-
pafm
->
Descender
*
scale
;
p
tm
->
tmDescent
=
-
pafm
->
Descender
*
scale
;
p
TM
->
tmInternalLeading
=
(
pafm
->
FullAscender
-
pafm
->
Ascender
)
*
scale
;
p
tm
->
tmInternalLeading
=
(
pafm
->
FullAscender
-
pafm
->
Ascender
)
*
scale
;
p
TM
->
tmMaxCharWidth
=
pafm
->
CharWidths
[
77
]
*
scale
;
p
tm
->
tmMaxCharWidth
=
pafm
->
CharWidths
[
77
]
*
scale
;
p
TM
->
tmDigitizedAspectX
=
dc
->
devCaps
->
logPixelsY
;
p
tm
->
tmDigitizedAspectX
=
dc
->
devCaps
->
logPixelsY
;
p
TM
->
tmDigitizedAspectY
=
dc
->
devCaps
->
logPixelsX
;
p
tm
->
tmDigitizedAspectY
=
dc
->
devCaps
->
logPixelsX
;
*
(
INT
*
)
&
p
TM
->
tmFirstChar
=
32
;
*
(
INT
*
)
&
p
tm
->
tmFirstChar
=
32
;
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
/* return font type */
/* return font type */
return
DEVICE_FONTTYPE
;
return
DEVICE_FONTTYPE
;
#undef ptm
}
}
/***********************************************************************
/***********************************************************************
* PSDRV_EnumDeviceFonts
* PSDRV_EnumDeviceFonts
*/
*/
BOOL
PSDRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
BOOL
PSDRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
{
{
ENUMLOGFONTEX
16
lf
;
ENUMLOGFONTEX
W
lf
;
NEWTEXTMETRIC
16
tm
;
NEWTEXTMETRIC
EXW
tm
;
BOOL
b
,
bRet
=
0
;
BOOL
b
,
bRet
=
0
;
AFMLISTENTRY
*
afmle
;
AFMLISTENTRY
*
afmle
;
FONTFAMILY
*
family
;
FONTFAMILY
*
family
;
PSDRV_PDEVICE
*
physDev
;
PSDRV_PDEVICE
*
physDev
;
char
FaceName
[
LF_FACESIZE
];
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
)
return
FALSE
;
...
@@ -336,9 +341,11 @@ BOOL PSDRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
...
@@ -336,9 +341,11 @@ BOOL PSDRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
if
(
plf
->
lfFaceName
[
0
]
)
{
if
(
plf
->
lfFaceName
[
0
]
)
{
TRACE
(
"lfFaceName = '%s'
\n
"
,
plf
->
lfFaceName
);
WideCharToMultiByte
(
CP_ACP
,
0
,
plf
->
lfFaceName
,
-
1
,
FaceName
,
sizeof
(
FaceName
),
NULL
,
NULL
);
TRACE
(
"lfFaceName = '%s'
\n
"
,
FaceName
);
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
if
(
!
strncmp
(
plf
->
lf
FaceName
,
family
->
FamilyName
,
if
(
!
strncmp
(
FaceName
,
family
->
FamilyName
,
strlen
(
family
->
FamilyName
)))
strlen
(
family
->
FamilyName
)))
break
;
break
;
}
}
...
...
dlls/wineps/psdrv.h
View file @
2aa85eed
...
@@ -36,7 +36,7 @@ typedef struct _tagAFM {
...
@@ -36,7 +36,7 @@ typedef struct _tagAFM {
char
*
FullName
;
char
*
FullName
;
char
*
FamilyName
;
char
*
FamilyName
;
char
*
EncodingScheme
;
char
*
EncodingScheme
;
int
Weight
;
/* FW_NORMAL etc. */
LONG
Weight
;
/* FW_NORMAL etc. */
float
ItalicAngle
;
float
ItalicAngle
;
BOOL
IsFixedPitch
;
BOOL
IsFixedPitch
;
float
UnderlinePosition
;
float
UnderlinePosition
;
...
@@ -271,7 +271,6 @@ extern void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
...
@@ -271,7 +271,6 @@ extern void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
COLORREF
wincolor
);
COLORREF
wincolor
);
extern
char
PSDRV_UnicodeToANSI
(
int
u
);
extern
char
PSDRV_UnicodeToANSI
(
int
u
);
extern
INT
PSDRV_WriteHeader
(
DC
*
dc
,
LPCSTR
title
);
extern
INT
PSDRV_WriteHeader
(
DC
*
dc
,
LPCSTR
title
);
extern
INT
PSDRV_WriteFooter
(
DC
*
dc
);
extern
INT
PSDRV_WriteFooter
(
DC
*
dc
);
extern
INT
PSDRV_WriteNewPage
(
DC
*
dc
);
extern
INT
PSDRV_WriteNewPage
(
DC
*
dc
);
...
@@ -329,7 +328,7 @@ extern BOOL PSDRV_Ellipse( DC *dc, INT left, INT top, INT right,
...
@@ -329,7 +328,7 @@ extern BOOL PSDRV_Ellipse( DC *dc, INT left, INT top, INT right,
INT
bottom
);
INT
bottom
);
extern
INT
PSDRV_EndDoc
(
DC
*
dc
);
extern
INT
PSDRV_EndDoc
(
DC
*
dc
);
extern
INT
PSDRV_EndPage
(
DC
*
dc
);
extern
INT
PSDRV_EndPage
(
DC
*
dc
);
extern
BOOL
PSDRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
extern
BOOL
PSDRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
);
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
);
extern
INT
PSDRV_Escape
(
DC
*
dc
,
INT
nEscape
,
INT
cbInput
,
extern
INT
PSDRV_Escape
(
DC
*
dc
,
INT
nEscape
,
INT
cbInput
,
SEGPTR
lpInData
,
SEGPTR
lpOutData
);
SEGPTR
lpInData
,
SEGPTR
lpOutData
);
...
...
graphics/enhmetafiledrv/objects.c
View file @
2aa85eed
...
@@ -147,7 +147,7 @@ static BOOL EMFDRV_CreateFontIndirect(DC *dc, HFONT hFont )
...
@@ -147,7 +147,7 @@ static BOOL EMFDRV_CreateFontIndirect(DC *dc, HFONT hFont )
emr
.
emr
.
iType
=
EMR_EXTCREATEFONTINDIRECTW
;
emr
.
emr
.
iType
=
EMR_EXTCREATEFONTINDIRECTW
;
emr
.
emr
.
nSize
=
(
sizeof
(
emr
)
+
3
)
/
4
*
4
;
emr
.
emr
.
nSize
=
(
sizeof
(
emr
)
+
3
)
/
4
*
4
;
emr
.
ihFont
=
index
=
EMFDRV_AddHandleDC
(
dc
);
emr
.
ihFont
=
index
=
EMFDRV_AddHandleDC
(
dc
);
FONT_LogFont16To32W
(
&
(
fontObj
->
logfont
),
&
(
emr
.
elfw
.
elfLogFont
)
);
memcpy
(
&
(
emr
.
elfw
.
elfLogFont
),
&
(
fontObj
->
logfont
),
sizeof
(
LOGFONTW
)
);
emr
.
elfw
.
elfFullName
[
0
]
=
'\0'
;
emr
.
elfw
.
elfFullName
[
0
]
=
'\0'
;
emr
.
elfw
.
elfStyle
[
0
]
=
'\0'
;
emr
.
elfw
.
elfStyle
[
0
]
=
'\0'
;
emr
.
elfw
.
elfVersion
=
0
;
emr
.
elfw
.
elfVersion
=
0
;
...
...
graphics/metafiledrv/objects.c
View file @
2aa85eed
...
@@ -185,7 +185,9 @@ static HFONT16 MFDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
...
@@ -185,7 +185,9 @@ static HFONT16 MFDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
FONTOBJ
*
font
)
FONTOBJ
*
font
)
{
{
HFONT16
prevHandle
=
dc
->
hFont
;
HFONT16
prevHandle
=
dc
->
hFont
;
if
(
MFDRV_CreateFontIndirect
(
dc
,
hfont
,
&
(
font
->
logfont
)))
LOGFONT16
lf16
;
FONT_LogFontWTo16
(
&
(
font
->
logfont
),
&
lf16
);
if
(
MFDRV_CreateFontIndirect
(
dc
,
hfont
,
&
lf16
))
return
prevHandle
;
return
prevHandle
;
return
0
;
return
0
;
}
}
...
...
graphics/win16drv/font.c
View file @
2aa85eed
...
@@ -56,7 +56,7 @@ BOOL WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRICA *metrics )
...
@@ -56,7 +56,7 @@ BOOL WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRICA *metrics )
TRACE
(
"%04x
\n
"
,
dc
->
hSelf
);
TRACE
(
"%04x
\n
"
,
dc
->
hSelf
);
FONT_TextMetric16
to32
A
(
&
physDev
->
tm
,
metrics
);
FONT_TextMetric16
To
A
(
&
physDev
->
tm
,
metrics
);
TRACE
(
TRACE
(
"H %ld, A %ld, D %ld, Int %ld, Ext %ld, AW %ld, MW %ld, W %ld
\n
"
,
"H %ld, A %ld, D %ld, Int %ld, Ext %ld, AW %ld, MW %ld, W %ld
\n
"
,
...
@@ -80,8 +80,8 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
...
@@ -80,8 +80,8 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
dc
->
hFont
=
hfont
;
dc
->
hFont
=
hfont
;
TRACE
(
"WIN16DRV_FONT_SelectObject '%s' h=%d
\n
"
,
TRACE
(
"WIN16DRV_FONT_SelectObject '%s' h=%
l
d
\n
"
,
font
->
logfont
.
lfFaceName
,
font
->
logfont
.
lfHeight
);
debugstr_w
(
font
->
logfont
.
lfFaceName
)
,
font
->
logfont
.
lfHeight
);
if
(
physDev
->
FontInfo
)
if
(
physDev
->
FontInfo
)
...
@@ -92,7 +92,7 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
...
@@ -92,7 +92,7 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
physDev
->
FontInfo
,
0
);
physDev
->
FontInfo
,
0
);
}
}
memcpy
(
&
physDev
->
lf
,
&
font
->
logfont
,
sizeof
(
LOGFONT16
)
);
FONT_LogFontWTo16
(
&
font
->
logfont
,
&
physDev
->
lf
);
nSize
=
PRTDRV_RealizeObject
(
physDev
->
segptrPDEVICE
,
DRVOBJ_FONT
,
nSize
=
PRTDRV_RealizeObject
(
physDev
->
segptrPDEVICE
,
DRVOBJ_FONT
,
&
physDev
->
lf
,
0
,
0
);
&
physDev
->
lf
,
0
,
0
);
...
@@ -150,7 +150,7 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
...
@@ -150,7 +150,7 @@ HFONT WIN16DRV_FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font)
}
}
/***********************************************************************
/***********************************************************************
* GetCharWidth32A (GDI32.
155
)
* GetCharWidth32A (GDI32.
@
)
*/
*/
BOOL
WIN16DRV_GetCharWidth
(
DC
*
dc
,
UINT
firstChar
,
UINT
lastChar
,
BOOL
WIN16DRV_GetCharWidth
(
DC
*
dc
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
LPINT
buffer
)
...
@@ -181,13 +181,14 @@ BOOL WIN16DRV_GetCharWidth( DC *dc, UINT firstChar, UINT lastChar,
...
@@ -181,13 +181,14 @@ BOOL WIN16DRV_GetCharWidth( DC *dc, UINT firstChar, UINT lastChar,
* WIN16DRV_EnumDeviceFonts
* WIN16DRV_EnumDeviceFonts
*/
*/
BOOL
WIN16DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
BOOL
WIN16DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
{
{
WIN16DRV_PDEVICE
*
physDev
;
WIN16DRV_PDEVICE
*
physDev
;
WORD
wRet
;
WORD
wRet
;
WEPFC
wepfc
;
WEPFC
wepfc
;
DC
*
dc
;
DC
*
dc
;
char
*
FaceNameA
=
NULL
;
/* EnumDFontCallback is GDI.158 */
/* EnumDFontCallback is GDI.158 */
FARPROC16
pfnCallback
=
GetProcAddress16
(
GetModuleHandle16
(
"GDI"
),
(
LPCSTR
)
158
);
FARPROC16
pfnCallback
=
GetProcAddress16
(
GetModuleHandle16
(
"GDI"
),
(
LPCSTR
)
158
);
...
@@ -196,11 +197,20 @@ BOOL WIN16DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
...
@@ -196,11 +197,20 @@ BOOL WIN16DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
/* FIXME!! */
/* FIXME!! */
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
wepfc
.
proc
=
(
int
(
*
)(
LPENUMLOGFONT16
,
LPNEWTEXTMETRIC16
,
UINT16
,
LPARAM
))
proc
;
wepfc
.
proc
=
proc
;
wepfc
.
lp
=
lp
;
wepfc
.
lp
=
lp
;
wRet
=
PRTDRV_EnumDFonts
(
physDev
->
segptrPDEVICE
,
plf
->
lfFaceName
[
0
]
?
if
(
plf
->
lfFaceName
[
0
])
{
plf
->
lfFaceName
:
NULL
,
pfnCallback
,
&
wepfc
);
INT
len
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
plf
->
lfFaceName
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
FaceNameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
plf
->
lfFaceName
,
-
1
,
FaceNameA
,
len
,
NULL
,
NULL
);
}
wRet
=
PRTDRV_EnumDFonts
(
physDev
->
segptrPDEVICE
,
FaceNameA
,
pfnCallback
,
&
wepfc
);
if
(
FaceNameA
)
HeapFree
(
GetProcessHeap
(),
0
,
FaceNameA
);
return
wRet
;
return
wRet
;
}
}
...
@@ -218,8 +228,27 @@ WORD WINAPI EnumCallback16(LPENUMLOGFONT16 lpLogFont,
...
@@ -218,8 +228,27 @@ WORD WINAPI EnumCallback16(LPENUMLOGFONT16 lpLogFont,
LPNEWTEXTMETRIC16
lpTextMetrics
,
LPNEWTEXTMETRIC16
lpTextMetrics
,
WORD
wFontType
,
LONG
lpClientData
)
WORD
wFontType
,
LONG
lpClientData
)
{
{
ENUMLOGFONTEXW
lfW
;
ENUMLOGFONTEX16
lf16
;
NEWTEXTMETRICEXW
tmW
;
NEWTEXTMETRICEX16
tm16
;
TRACE
(
"In EnumCallback16 plf=%p
\n
"
,
lpLogFont
);
TRACE
(
"In EnumCallback16 plf=%p
\n
"
,
lpLogFont
);
return
(
*
(((
WEPFC
*
)
lpClientData
)
->
proc
))(
lpLogFont
,
lpTextMetrics
,
wFontType
,
((
WEPFC
*
)
lpClientData
)
->
lp
);
/* we have a ENUMLOGFONT16 which is a subset of ENUMLOGFONTEX16,
so we copy it into one of these and then convert to ENUMLOGFONTEXW */
memset
(
&
lf16
,
0
,
sizeof
(
lf16
));
memcpy
(
&
lf16
,
lpLogFont
,
sizeof
(
*
lpLogFont
));
FONT_EnumLogFontEx16ToW
(
&
lf16
,
&
lfW
);
/* and a similar idea for NEWTEXTMETRIC16 */
memset
(
&
tm16
,
0
,
sizeof
(
tm16
));
memcpy
(
&
tm16
,
lpTextMetrics
,
sizeof
(
*
lpTextMetrics
));
FONT_NewTextMetricEx16ToW
(
&
tm16
,
&
tmW
);
return
(
*
(((
WEPFC
*
)
lpClientData
)
->
proc
))(
&
lfW
,
&
tmW
,
wFontType
,
((
WEPFC
*
)
lpClientData
)
->
lp
);
}
}
graphics/x11drv/xfont.c
View file @
2aa85eed
...
@@ -1156,50 +1156,61 @@ static void XFONT_SetFontMetric(fontInfo* fi, const fontResource* fr, XFontStruc
...
@@ -1156,50 +1156,61 @@ static void XFONT_SetFontMetric(fontInfo* fi, const fontResource* fr, XFontStruc
*
*
* Retrieve font metric info (enumeration).
* Retrieve font metric info (enumeration).
*/
*/
static
UINT
XFONT_GetFontMetric
(
const
fontInfo
*
pfi
,
const
LPENUMLOGFONTEX16
pLF
,
static
UINT
XFONT_GetFontMetric
(
const
fontInfo
*
pfi
,
const
LPNEWTEXTMETRIC16
pTM
)
const
LPENUMLOGFONTEXW
pLF
,
const
LPNEWTEXTMETRICEXW
pTM
)
{
{
memset
(
pLF
,
0
,
sizeof
(
*
pLF
)
);
memset
(
pLF
,
0
,
sizeof
(
*
pLF
)
);
memset
(
pTM
,
0
,
sizeof
(
*
pTM
)
);
memset
(
pTM
,
0
,
sizeof
(
*
pTM
)
);
#define plf ((LPLOGFONT16)pLF)
#define plf ((LPLOGFONTW)pLF)
plf
->
lfHeight
=
pTM
->
tmHeight
=
pfi
->
df
.
dfPixHeight
;
#define ptm ((LPNEWTEXTMETRICW)pTM)
plf
->
lfWidth
=
pTM
->
tmAveCharWidth
=
pfi
->
df
.
dfAvgWidth
;
plf
->
lfHeight
=
ptm
->
tmHeight
=
pfi
->
df
.
dfPixHeight
;
plf
->
lfWeight
=
pTM
->
tmWeight
=
pfi
->
df
.
dfWeight
;
plf
->
lfWidth
=
ptm
->
tmAveCharWidth
=
pfi
->
df
.
dfAvgWidth
;
plf
->
lfItalic
=
pTM
->
tmItalic
=
pfi
->
df
.
dfItalic
;
plf
->
lfWeight
=
ptm
->
tmWeight
=
pfi
->
df
.
dfWeight
;
plf
->
lfUnderline
=
pTM
->
tmUnderlined
=
pfi
->
df
.
dfUnderline
;
plf
->
lfItalic
=
ptm
->
tmItalic
=
pfi
->
df
.
dfItalic
;
plf
->
lfStrikeOut
=
pTM
->
tmStruckOut
=
pfi
->
df
.
dfStrikeOut
;
plf
->
lfUnderline
=
ptm
->
tmUnderlined
=
pfi
->
df
.
dfUnderline
;
plf
->
lfCharSet
=
pTM
->
tmCharSet
=
pfi
->
df
.
dfCharSet
;
plf
->
lfStrikeOut
=
ptm
->
tmStruckOut
=
pfi
->
df
.
dfStrikeOut
;
plf
->
lfCharSet
=
ptm
->
tmCharSet
=
pfi
->
df
.
dfCharSet
;
/* convert pitch values */
/* convert pitch values */
p
TM
->
tmPitchAndFamily
=
pfi
->
df
.
dfPitchAndFamily
;
p
tm
->
tmPitchAndFamily
=
pfi
->
df
.
dfPitchAndFamily
;
plf
->
lfPitchAndFamily
=
(
pfi
->
df
.
dfPitchAndFamily
&
0xF1
)
+
1
;
plf
->
lfPitchAndFamily
=
(
pfi
->
df
.
dfPitchAndFamily
&
0xF1
)
+
1
;
lstrcpynA
(
plf
->
lfFaceName
,
pfi
->
df
.
dfFace
,
LF_FACESIZE
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pfi
->
df
.
dfFace
,
-
1
,
plf
->
lfFaceName
,
LF_FACESIZE
);
/* FIXME: fill in rest of plF values */
strcpyW
(
pLF
->
elfFullName
,
plf
->
lfFaceName
);
MultiByteToWideChar
(
CP_ACP
,
0
,
"Regular"
,
-
1
,
pLF
->
elfStyle
,
LF_FACESIZE
);
MultiByteToWideChar
(
CP_ACP
,
0
,
plf
->
lfCharSet
==
SYMBOL_CHARSET
?
"Symbol"
:
"Roman"
,
-
1
,
pLF
->
elfScript
,
LF_FACESIZE
);
#undef plf
#undef plf
/* FIXME: fill in rest of plF values
ptm
->
tmAscent
=
pfi
->
df
.
dfAscent
;
lstrcpynA(plF->elfFullName, , LF_FULLFACESIZE);
ptm
->
tmDescent
=
ptm
->
tmHeight
-
ptm
->
tmAscent
;
lstrcpynA(plF->elfStyle, , LF_FACESIZE);
ptm
->
tmInternalLeading
=
pfi
->
df
.
dfInternalLeading
;
lstrcpynA(plF->elfScript, , LF_FACESIZE);
ptm
->
tmMaxCharWidth
=
pfi
->
df
.
dfMaxWidth
;
*/
ptm
->
tmDigitizedAspectX
=
pfi
->
df
.
dfHorizRes
;
ptm
->
tmDigitizedAspectY
=
pfi
->
df
.
dfVertRes
;
pTM
->
tmAscent
=
pfi
->
df
.
dfAscent
;
ptm
->
tmFirstChar
=
pfi
->
df
.
dfFirstChar
;
pTM
->
tmDescent
=
pTM
->
tmHeight
-
pTM
->
tmAscent
;
ptm
->
tmLastChar
=
pfi
->
df
.
dfLastChar
;
pTM
->
tmInternalLeading
=
pfi
->
df
.
dfInternalLeading
;
ptm
->
tmDefaultChar
=
pfi
->
df
.
dfDefaultChar
;
pTM
->
tmMaxCharWidth
=
pfi
->
df
.
dfMaxWidth
;
ptm
->
tmBreakChar
=
pfi
->
df
.
dfBreakChar
;
pTM
->
tmDigitizedAspectX
=
pfi
->
df
.
dfHorizRes
;
pTM
->
tmDigitizedAspectY
=
pfi
->
df
.
dfVertRes
;
pTM
->
tmFirstChar
=
pfi
->
df
.
dfFirstChar
;
TRACE
(
"Calling Enum proc with FaceName '%s' FullName '%s'
\n
"
,
pTM
->
tmLastChar
=
pfi
->
df
.
dfLastChar
;
debugstr_w
(
pLF
->
elfLogFont
.
lfFaceName
),
pTM
->
tmDefaultChar
=
pfi
->
df
.
dfDefaultChar
;
debugstr_w
(
pLF
->
elfFullName
));
pTM
->
tmBreakChar
=
pfi
->
df
.
dfBreakChar
;
TRACE
(
"CharSet = %d type = %d
\n
"
,
ptm
->
tmCharSet
,
pfi
->
df
.
dfType
);
/* return font type */
/* return font type */
return
pfi
->
df
.
dfType
;
return
pfi
->
df
.
dfType
;
#undef ptm
}
}
...
@@ -3049,7 +3060,7 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
...
@@ -3049,7 +3060,7 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
if
(
CHECK_PFONT
(
physDev
->
font
)
)
if
(
CHECK_PFONT
(
physDev
->
font
)
)
XFONT_ReleaseCacheEntry
(
__PFONT
(
physDev
->
font
)
);
XFONT_ReleaseCacheEntry
(
__PFONT
(
physDev
->
font
)
);
lf
=
font
->
logfont
;
FONT_LogFontWTo16
(
&
font
->
logfont
,
&
lf
)
;
/* Make sure we don't change the sign when converting to device coords */
/* Make sure we don't change the sign when converting to device coords */
/* FIXME - check that the other drivers do this correctly */
/* FIXME - check that the other drivers do this correctly */
...
@@ -3085,9 +3096,11 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
...
@@ -3085,9 +3096,11 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
* so that GetTextFace can get the correct face name
* so that GetTextFace can get the correct face name
*/
*/
if
(
alias
&&
!
strcmp
(
faceMatched
,
lf
.
lfFaceName
))
if
(
alias
&&
!
strcmp
(
faceMatched
,
lf
.
lfFaceName
))
strcpy
(
font
->
logfont
.
lfFaceName
,
alias
);
MultiByteToWideChar
(
CP_ACP
,
0
,
alias
,
-
1
,
font
->
logfont
.
lfFaceName
,
LF_FACESIZE
);
else
else
strcpy
(
font
->
logfont
.
lfFaceName
,
faceMatched
);
MultiByteToWideChar
(
CP_ACP
,
0
,
faceMatched
,
-
1
,
font
->
logfont
.
lfFaceName
,
LF_FACESIZE
);
/*
/*
* In X, some encodings may have the same lfFaceName.
* In X, some encodings may have the same lfFaceName.
...
@@ -3112,18 +3125,22 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
...
@@ -3112,18 +3125,22 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
*
*
* X11DRV_EnumDeviceFonts
* X11DRV_EnumDeviceFonts
*/
*/
BOOL
X11DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
BOOL
X11DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
)
{
{
ENUMLOGFONTEX
16
lf
;
ENUMLOGFONTEX
W
lf
;
NEWTEXTMETRIC
16
tm
;
NEWTEXTMETRIC
EXW
tm
;
fontResource
*
pfr
=
fontList
;
fontResource
*
pfr
=
fontList
;
BOOL
b
,
bRet
=
0
;
BOOL
b
,
bRet
=
0
;
LOGFONT16
lf16
;
if
(
plf
->
lfFaceName
[
0
]
)
FONT_LogFontWTo16
(
plf
,
&
lf16
);
if
(
lf16
.
lfFaceName
[
0
]
)
{
{
/* enum all entries in this resource */
/* enum all entries in this resource */
pfr
=
XFONT_FindFIList
(
pfr
,
plf
->
lfFaceName
);
pfr
=
XFONT_FindFIList
(
pfr
,
lf16
.
lfFaceName
);
if
(
pfr
)
if
(
pfr
)
{
{
fontInfo
*
pfi
;
fontInfo
*
pfi
;
...
@@ -3133,6 +3150,8 @@ BOOL X11DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
...
@@ -3133,6 +3150,8 @@ BOOL X11DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
release the crit section, font list will
release the crit section, font list will
have to be retraversed on return */
have to be retraversed on return */
if
(
lf16
.
lfCharSet
==
DEFAULT_CHARSET
||
lf16
.
lfCharSet
==
pfi
->
df
.
dfCharSet
)
{
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
&
lf
,
&
tm
,
XFONT_GetFontMetric
(
pfi
,
&
lf
,
&
tm
),
lp
))
)
XFONT_GetFontMetric
(
pfi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
bRet
=
b
;
...
@@ -3140,6 +3159,7 @@ BOOL X11DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
...
@@ -3140,6 +3159,7 @@ BOOL X11DRV_EnumDeviceFonts( HDC hdc, LPLOGFONT16 plf,
}
}
}
}
}
}
}
else
/* enum first entry in each resource */
else
/* enum first entry in each resource */
for
(
;
pfr
;
pfr
=
pfr
->
next
)
for
(
;
pfr
;
pfr
=
pfr
->
next
)
{
{
...
...
include/font.h
View file @
2aa85eed
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
typedef
struct
typedef
struct
{
{
GDIOBJHDR
header
;
GDIOBJHDR
header
;
LOGFONT
16
logfont
WINE_PACKED
;
LOGFONT
W
logfont
;
}
FONTOBJ
;
}
FONTOBJ
;
typedef
struct
{
typedef
struct
{
...
@@ -59,16 +59,18 @@ extern BOOL FONT_Init( UINT16* pTextCaps );
...
@@ -59,16 +59,18 @@ extern BOOL FONT_Init( UINT16* pTextCaps );
extern
INT16
FONT_GetObject16
(
FONTOBJ
*
font
,
INT16
count
,
LPSTR
buffer
);
extern
INT16
FONT_GetObject16
(
FONTOBJ
*
font
,
INT16
count
,
LPSTR
buffer
);
extern
INT
FONT_GetObjectA
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
);
extern
INT
FONT_GetObjectA
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
);
extern
INT
FONT_GetObjectW
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
);
extern
INT
FONT_GetObjectW
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
);
extern
void
FONT_LogFont32ATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
);
extern
void
FONT_LogFontATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
);
extern
void
FONT_LogFont32WTo16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
);
extern
void
FONT_LogFontWTo16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
);
extern
void
FONT_LogFont16To32A
(
const
LPLOGFONT16
font16
,
LPLOGFONTA
font32
);
extern
void
FONT_LogFont16ToA
(
const
LOGFONT16
*
font16
,
LPLOGFONTA
font32
);
extern
void
FONT_LogFont16To32W
(
const
LPLOGFONT16
font16
,
LPLOGFONTW
font32
);
extern
void
FONT_LogFont16ToW
(
const
LOGFONT16
*
font16
,
LPLOGFONTW
font32
);
extern
void
FONT_TextMetric32Ato16
(
const
LPTEXTMETRICA
ptm32
,
LPTEXTMETRIC16
ptm16
);
extern
void
FONT_TextMetricATo16
(
const
TEXTMETRICA
*
ptm32
,
LPTEXTMETRIC16
ptm16
);
extern
void
FONT_TextMetric32Wto16
(
const
LPTEXTMETRICW
ptm32
,
LPTEXTMETRIC16
ptm16
);
extern
void
FONT_TextMetricWTo16
(
const
TEXTMETRICW
*
ptm32
,
LPTEXTMETRIC16
ptm16
);
extern
void
FONT_TextMetric16to32A
(
const
LPTEXTMETRIC16
ptm16
,
LPTEXTMETRICA
ptm32
);
extern
void
FONT_TextMetric16ToA
(
const
TEXTMETRIC16
*
ptm16
,
LPTEXTMETRICA
ptm32
);
extern
void
FONT_TextMetric16to32W
(
const
LPTEXTMETRIC16
ptm16
,
LPTEXTMETRICW
ptm32
);
extern
void
FONT_TextMetric16ToW
(
const
TEXTMETRIC16
*
ptm16
,
LPTEXTMETRICW
ptm32
);
extern
void
FONT_TextMetric32Ato32W
(
const
LPTEXTMETRICA
ptm32A
,
LPTEXTMETRICW
ptm32W
);
extern
void
FONT_TextMetricAToW
(
const
TEXTMETRICA
*
ptm32A
,
LPTEXTMETRICW
ptm32W
);
extern
void
FONT_NewTextMetricEx16ToW
(
const
NEWTEXTMETRICEX16
*
,
LPNEWTEXTMETRICEXW
);
extern
void
FONT_EnumLogFontEx16ToW
(
const
ENUMLOGFONTEX16
*
,
LPENUMLOGFONTEXW
);
extern
BOOL
ENGINE_InitFonts
(
void
);
#endif
/* __WINE_FONT_H */
#endif
/* __WINE_FONT_H */
include/gdi.h
View file @
2aa85eed
...
@@ -155,7 +155,8 @@ typedef struct tagDC
...
@@ -155,7 +155,8 @@ typedef struct tagDC
/* Device functions for the Wine driver interface */
/* Device functions for the Wine driver interface */
typedef
INT
(
*
DEVICEFONTENUMPROC
)(
LPENUMLOGFONTEX16
,
LPNEWTEXTMETRIC16
,
UINT16
,
LPARAM
);
typedef
INT
(
*
DEVICEFONTENUMPROC
)(
LPENUMLOGFONTEXW
,
LPNEWTEXTMETRICEXW
,
DWORD
,
LPARAM
);
typedef
struct
tagDC_FUNCS
typedef
struct
tagDC_FUNCS
{
{
...
@@ -184,7 +185,7 @@ typedef struct tagDC_FUNCS
...
@@ -184,7 +185,7 @@ typedef struct tagDC_FUNCS
INT
(
*
pEndDoc
)(
DC
*
);
INT
(
*
pEndDoc
)(
DC
*
);
INT
(
*
pEndPage
)(
DC
*
);
INT
(
*
pEndPage
)(
DC
*
);
BOOL
(
*
pEndPath
)(
DC
*
);
BOOL
(
*
pEndPath
)(
DC
*
);
BOOL
(
*
pEnumDeviceFonts
)(
HDC
,
LPLOGFONT
16
,
DEVICEFONTENUMPROC
,
LPARAM
);
BOOL
(
*
pEnumDeviceFonts
)(
HDC
,
LPLOGFONT
W
,
DEVICEFONTENUMPROC
,
LPARAM
);
INT
(
*
pEscape
)(
DC
*
,
INT
,
INT
,
SEGPTR
,
SEGPTR
);
INT
(
*
pEscape
)(
DC
*
,
INT
,
INT
,
SEGPTR
,
SEGPTR
);
INT
(
*
pExcludeClipRect
)(
DC
*
,
INT
,
INT
,
INT
,
INT
);
INT
(
*
pExcludeClipRect
)(
DC
*
,
INT
,
INT
,
INT
,
INT
);
INT
(
*
pExtDeviceMode
)(
LPSTR
,
HWND
,
LPDEVMODEA
,
LPSTR
,
LPSTR
,
LPDEVMODEA
,
INT
(
*
pExtDeviceMode
)(
LPSTR
,
HWND
,
LPDEVMODEA
,
LPSTR
,
LPSTR
,
LPDEVMODEA
,
...
...
include/win16drv.h
View file @
2aa85eed
...
@@ -137,7 +137,7 @@ typedef struct DRAWMODE
...
@@ -137,7 +137,7 @@ typedef struct DRAWMODE
typedef
struct
WINE_ENUM_PRINTER_FONT_CALLBACK
typedef
struct
WINE_ENUM_PRINTER_FONT_CALLBACK
{
{
int
(
*
proc
)(
LPENUMLOGFONT16
,
LPNEWTEXTMETRIC16
,
UINT16
,
LPARAM
)
;
DEVICEFONTENUMPROC
proc
;
LPARAM
lp
;
LPARAM
lp
;
}
WEPFC
;
}
WEPFC
;
...
@@ -224,7 +224,7 @@ extern HGDIOBJ WIN16DRV_SelectObject( DC *dc, HGDIOBJ handle );
...
@@ -224,7 +224,7 @@ extern HGDIOBJ WIN16DRV_SelectObject( DC *dc, HGDIOBJ handle );
extern
BOOL
WIN16DRV_PatBlt
(
struct
tagDC
*
dc
,
INT
left
,
INT
top
,
extern
BOOL
WIN16DRV_PatBlt
(
struct
tagDC
*
dc
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
);
INT
width
,
INT
height
,
DWORD
rop
);
extern
BOOL
WIN16DRV_Ellipse
(
DC
*
dc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
extern
BOOL
WIN16DRV_Ellipse
(
DC
*
dc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
extern
BOOL
WIN16DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
extern
BOOL
WIN16DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
);
DEVICEFONTENUMPROC
proc
,
LPARAM
lp
);
extern
INT
WIN16DRV_ExtDeviceMode
(
LPSTR
lpszDriver
,
HWND
hwnd
,
extern
INT
WIN16DRV_ExtDeviceMode
(
LPSTR
lpszDriver
,
HWND
hwnd
,
...
...
include/x11drv.h
View file @
2aa85eed
...
@@ -92,7 +92,7 @@ extern const DC_FUNCTIONS X11DRV_DC_Funcs;
...
@@ -92,7 +92,7 @@ extern const DC_FUNCTIONS X11DRV_DC_Funcs;
extern
BOOL
X11DRV_BitBlt
(
struct
tagDC
*
dcDst
,
INT
xDst
,
INT
yDst
,
extern
BOOL
X11DRV_BitBlt
(
struct
tagDC
*
dcDst
,
INT
xDst
,
INT
yDst
,
INT
width
,
INT
height
,
struct
tagDC
*
dcSrc
,
INT
width
,
INT
height
,
struct
tagDC
*
dcSrc
,
INT
xSrc
,
INT
ySrc
,
DWORD
rop
);
INT
xSrc
,
INT
ySrc
,
DWORD
rop
);
extern
BOOL
X11DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
16
plf
,
extern
BOOL
X11DRV_EnumDeviceFonts
(
HDC
hdc
,
LPLOGFONT
W
plf
,
DEVICEFONTENUMPROC
dfeproc
,
LPARAM
lp
);
DEVICEFONTENUMPROC
dfeproc
,
LPARAM
lp
);
extern
BOOL
X11DRV_GetCharWidth
(
struct
tagDC
*
dc
,
UINT
firstChar
,
extern
BOOL
X11DRV_GetCharWidth
(
struct
tagDC
*
dc
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
);
UINT
lastChar
,
LPINT
buffer
);
...
...
objects/font.c
View file @
2aa85eed
...
@@ -39,8 +39,6 @@ typedef struct
...
@@ -39,8 +39,6 @@ typedef struct
FONTENUMPROCEXW
lpEnumFunc
;
FONTENUMPROCEXW
lpEnumFunc
;
LPARAM
lpData
;
LPARAM
lpData
;
LPNEWTEXTMETRICEXW
lpTextMetric
;
LPENUMLOGFONTEXW
lpLogFont
;
DWORD
dwFlags
;
DWORD
dwFlags
;
}
fontEnum32
;
}
fontEnum32
;
...
@@ -92,7 +90,7 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
...
@@ -92,7 +90,7 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
/***********************************************************************
/***********************************************************************
* LOGFONT conversion functions.
* LOGFONT conversion functions.
*/
*/
void
FONT_LogFont
32
ATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
)
void
FONT_LogFontATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
)
{
{
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfWidth
=
font32
->
lfWidth
;
...
@@ -110,7 +108,7 @@ void FONT_LogFont32ATo16( const LOGFONTA* font32, LPLOGFONT16 font16 )
...
@@ -110,7 +108,7 @@ void FONT_LogFont32ATo16( const LOGFONTA* font32, LPLOGFONT16 font16 )
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
}
void
FONT_LogFont
32
WTo16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
)
void
FONT_LogFontWTo16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
)
{
{
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfWidth
=
font32
->
lfWidth
;
...
@@ -130,7 +128,7 @@ void FONT_LogFont32WTo16( const LOGFONTW* font32, LPLOGFONT16 font16 )
...
@@ -130,7 +128,7 @@ void FONT_LogFont32WTo16( const LOGFONTW* font32, LPLOGFONT16 font16 )
font16
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
font16
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
}
void
FONT_LogFont16To
32A
(
const
LPLOGFONT16
font16
,
LPLOGFONTA
font32
)
void
FONT_LogFont16To
A
(
const
LOGFONT16
*
font16
,
LPLOGFONTA
font32
)
{
{
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfWidth
=
font16
->
lfWidth
;
font32
->
lfWidth
=
font16
->
lfWidth
;
...
@@ -148,7 +146,7 @@ void FONT_LogFont16To32A( const LPLOGFONT16 font16, LPLOGFONTA font32 )
...
@@ -148,7 +146,7 @@ void FONT_LogFont16To32A( const LPLOGFONT16 font16, LPLOGFONTA font32 )
lstrcpynA
(
font32
->
lfFaceName
,
font16
->
lfFaceName
,
LF_FACESIZE
);
lstrcpynA
(
font32
->
lfFaceName
,
font16
->
lfFaceName
,
LF_FACESIZE
);
}
}
void
FONT_LogFont16To
32W
(
const
LPLOGFONT16
font16
,
LPLOGFONTW
font32
)
void
FONT_LogFont16To
W
(
const
LOGFONT16
*
font16
,
LPLOGFONTW
font32
)
{
{
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfWidth
=
font16
->
lfWidth
;
font32
->
lfWidth
=
font16
->
lfWidth
;
...
@@ -167,17 +165,31 @@ void FONT_LogFont16To32W( const LPLOGFONT16 font16, LPLOGFONTW font32 )
...
@@ -167,17 +165,31 @@ void FONT_LogFont16To32W( const LPLOGFONT16 font16, LPLOGFONTW font32 )
font32
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
font32
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
}
void
FONT_
EnumLogFontEx16To32A
(
const
LPENUMLOGFONTEX16
font16
,
LPENUMLOGFONTEXA
font32
)
void
FONT_
LogFontAToW
(
const
LOGFONTA
*
fontA
,
LPLOGFONTW
fontW
)
{
{
FONT_LogFont16To32A
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTA
)
font32
);
memcpy
(
fontW
,
fontA
,
sizeof
(
LOGFONTA
)
-
LF_FACESIZE
);
MultiByteToWideChar
(
CP_ACP
,
0
,
fontA
->
lfFaceName
,
-
1
,
fontW
->
lfFaceName
,
LF_FACESIZE
);
}
void
FONT_LogFontWToA
(
const
LOGFONTW
*
fontW
,
LPLOGFONTA
fontA
)
{
memcpy
(
fontA
,
fontW
,
sizeof
(
LOGFONTA
)
-
LF_FACESIZE
);
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
lfFaceName
,
-
1
,
fontA
->
lfFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
}
void
FONT_EnumLogFontEx16ToA
(
const
ENUMLOGFONTEX16
*
font16
,
LPENUMLOGFONTEXA
font32
)
{
FONT_LogFont16ToA
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTA
)
font32
);
lstrcpynA
(
font32
->
elfFullName
,
font16
->
elfFullName
,
LF_FULLFACESIZE
);
lstrcpynA
(
font32
->
elfFullName
,
font16
->
elfFullName
,
LF_FULLFACESIZE
);
lstrcpynA
(
font32
->
elfStyle
,
font16
->
elfStyle
,
LF_FACESIZE
);
lstrcpynA
(
font32
->
elfStyle
,
font16
->
elfStyle
,
LF_FACESIZE
);
lstrcpynA
(
font32
->
elfScript
,
font16
->
elfScript
,
LF_FACESIZE
);
lstrcpynA
(
font32
->
elfScript
,
font16
->
elfScript
,
LF_FACESIZE
);
}
}
void
FONT_EnumLogFontEx16To
32W
(
const
LPENUMLOGFONTEX16
font16
,
LPENUMLOGFONTEXW
font32
)
void
FONT_EnumLogFontEx16To
W
(
const
ENUMLOGFONTEX16
*
font16
,
LPENUMLOGFONTEXW
font32
)
{
{
FONT_LogFont16To
32
W
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTW
)
font32
);
FONT_LogFont16ToW
(
(
LPLOGFONT16
)
font16
,
(
LPLOGFONTW
)
font32
);
MultiByteToWideChar
(
CP_ACP
,
0
,
font16
->
elfFullName
,
-
1
,
font32
->
elfFullName
,
LF_FULLFACESIZE
);
MultiByteToWideChar
(
CP_ACP
,
0
,
font16
->
elfFullName
,
-
1
,
font32
->
elfFullName
,
LF_FULLFACESIZE
);
font32
->
elfFullName
[
LF_FULLFACESIZE
-
1
]
=
0
;
font32
->
elfFullName
[
LF_FULLFACESIZE
-
1
]
=
0
;
...
@@ -187,10 +199,40 @@ void FONT_EnumLogFontEx16To32W( const LPENUMLOGFONTEX16 font16, LPENUMLOGFONTEXW
...
@@ -187,10 +199,40 @@ void FONT_EnumLogFontEx16To32W( const LPENUMLOGFONTEX16 font16, LPENUMLOGFONTEXW
font32
->
elfScript
[
LF_FACESIZE
-
1
]
=
0
;
font32
->
elfScript
[
LF_FACESIZE
-
1
]
=
0
;
}
}
void
FONT_EnumLogFontExWTo16
(
const
ENUMLOGFONTEXW
*
fontW
,
LPENUMLOGFONTEX16
font16
)
{
FONT_LogFontWTo16
(
(
LPLOGFONTW
)
fontW
,
(
LPLOGFONT16
)
font16
);
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfFullName
,
-
1
,
font16
->
elfFullName
,
LF_FULLFACESIZE
,
NULL
,
NULL
);
font16
->
elfFullName
[
LF_FULLFACESIZE
-
1
]
=
'\0'
;
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfStyle
,
-
1
,
font16
->
elfStyle
,
LF_FACESIZE
,
NULL
,
NULL
);
font16
->
elfStyle
[
LF_FACESIZE
-
1
]
=
'\0'
;
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfScript
,
-
1
,
font16
->
elfScript
,
LF_FACESIZE
,
NULL
,
NULL
);
font16
->
elfScript
[
LF_FACESIZE
-
1
]
=
'\0'
;
}
void
FONT_EnumLogFontExWToA
(
const
ENUMLOGFONTEXW
*
fontW
,
LPENUMLOGFONTEXA
fontA
)
{
FONT_LogFontWToA
(
(
LPLOGFONTW
)
fontW
,
(
LPLOGFONTA
)
fontA
);
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfFullName
,
-
1
,
fontA
->
elfFullName
,
LF_FULLFACESIZE
,
NULL
,
NULL
);
fontA
->
elfFullName
[
LF_FULLFACESIZE
-
1
]
=
'\0'
;
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfStyle
,
-
1
,
fontA
->
elfStyle
,
LF_FACESIZE
,
NULL
,
NULL
);
fontA
->
elfStyle
[
LF_FACESIZE
-
1
]
=
'\0'
;
WideCharToMultiByte
(
CP_ACP
,
0
,
fontW
->
elfScript
,
-
1
,
fontA
->
elfScript
,
LF_FACESIZE
,
NULL
,
NULL
);
fontA
->
elfScript
[
LF_FACESIZE
-
1
]
=
'\0'
;
}
/***********************************************************************
/***********************************************************************
* TEXTMETRIC conversion functions.
* TEXTMETRIC conversion functions.
*/
*/
void
FONT_TextMetric
32Ato16
(
const
LPTEXTMETRICA
ptm32
,
LPTEXTMETRIC16
ptm16
)
void
FONT_TextMetric
ATo16
(
const
TEXTMETRICA
*
ptm32
,
LPTEXTMETRIC16
ptm16
)
{
{
ptm16
->
tmHeight
=
ptm32
->
tmHeight
;
ptm16
->
tmHeight
=
ptm32
->
tmHeight
;
ptm16
->
tmAscent
=
ptm32
->
tmAscent
;
ptm16
->
tmAscent
=
ptm32
->
tmAscent
;
...
@@ -214,7 +256,7 @@ void FONT_TextMetric32Ato16(const LPTEXTMETRICA ptm32, LPTEXTMETRIC16 ptm16 )
...
@@ -214,7 +256,7 @@ void FONT_TextMetric32Ato16(const LPTEXTMETRICA ptm32, LPTEXTMETRIC16 ptm16 )
ptm16
->
tmCharSet
=
ptm32
->
tmCharSet
;
ptm16
->
tmCharSet
=
ptm32
->
tmCharSet
;
}
}
void
FONT_TextMetric
32Wto16
(
const
LPTEXTMETRICW
ptm32
,
LPTEXTMETRIC16
ptm16
)
void
FONT_TextMetric
WTo16
(
const
TEXTMETRICW
*
ptm32
,
LPTEXTMETRIC16
ptm16
)
{
{
ptm16
->
tmHeight
=
ptm32
->
tmHeight
;
ptm16
->
tmHeight
=
ptm32
->
tmHeight
;
ptm16
->
tmAscent
=
ptm32
->
tmAscent
;
ptm16
->
tmAscent
=
ptm32
->
tmAscent
;
...
@@ -238,7 +280,7 @@ void FONT_TextMetric32Wto16(const LPTEXTMETRICW ptm32, LPTEXTMETRIC16 ptm16 )
...
@@ -238,7 +280,7 @@ void FONT_TextMetric32Wto16(const LPTEXTMETRICW ptm32, LPTEXTMETRIC16 ptm16 )
ptm16
->
tmCharSet
=
ptm32
->
tmCharSet
;
ptm16
->
tmCharSet
=
ptm32
->
tmCharSet
;
}
}
void
FONT_TextMetric16
to32A
(
const
LPTEXTMETRIC16
ptm16
,
LPTEXTMETRICA
ptm32
)
void
FONT_TextMetric16
ToA
(
const
TEXTMETRIC16
*
ptm16
,
LPTEXTMETRICA
ptm32
)
{
{
ptm32
->
tmHeight
=
ptm16
->
tmHeight
;
ptm32
->
tmHeight
=
ptm16
->
tmHeight
;
ptm32
->
tmAscent
=
ptm16
->
tmAscent
;
ptm32
->
tmAscent
=
ptm16
->
tmAscent
;
...
@@ -262,7 +304,7 @@ void FONT_TextMetric16to32A(const LPTEXTMETRIC16 ptm16, LPTEXTMETRICA ptm32 )
...
@@ -262,7 +304,7 @@ void FONT_TextMetric16to32A(const LPTEXTMETRIC16 ptm16, LPTEXTMETRICA ptm32 )
ptm32
->
tmCharSet
=
ptm16
->
tmCharSet
;
ptm32
->
tmCharSet
=
ptm16
->
tmCharSet
;
}
}
void
FONT_TextMetric16
to32W
(
const
LPTEXTMETRIC16
ptm16
,
LPTEXTMETRICW
ptm32
)
void
FONT_TextMetric16
ToW
(
const
TEXTMETRIC16
*
ptm16
,
LPTEXTMETRICW
ptm32
)
{
{
ptm32
->
tmHeight
=
ptm16
->
tmHeight
;
ptm32
->
tmHeight
=
ptm16
->
tmHeight
;
ptm32
->
tmAscent
=
ptm16
->
tmAscent
;
ptm32
->
tmAscent
=
ptm16
->
tmAscent
;
...
@@ -286,7 +328,7 @@ void FONT_TextMetric16to32W(const LPTEXTMETRIC16 ptm16, LPTEXTMETRICW ptm32 )
...
@@ -286,7 +328,7 @@ void FONT_TextMetric16to32W(const LPTEXTMETRIC16 ptm16, LPTEXTMETRICW ptm32 )
ptm32
->
tmCharSet
=
ptm16
->
tmCharSet
;
ptm32
->
tmCharSet
=
ptm16
->
tmCharSet
;
}
}
void
FONT_TextMetric
32Ato32W
(
const
LPTEXTMETRICA
ptm32A
,
LPTEXTMETRICW
ptm32W
)
void
FONT_TextMetric
AToW
(
const
TEXTMETRICA
*
ptm32A
,
LPTEXTMETRICW
ptm32W
)
{
{
ptm32W
->
tmHeight
=
ptm32A
->
tmHeight
;
ptm32W
->
tmHeight
=
ptm32A
->
tmHeight
;
ptm32W
->
tmAscent
=
ptm32A
->
tmAscent
;
ptm32W
->
tmAscent
=
ptm32A
->
tmAscent
;
...
@@ -310,33 +352,123 @@ void FONT_TextMetric32Ato32W(const LPTEXTMETRICA ptm32A, LPTEXTMETRICW ptm32W )
...
@@ -310,33 +352,123 @@ void FONT_TextMetric32Ato32W(const LPTEXTMETRICA ptm32A, LPTEXTMETRICW ptm32W )
ptm32W
->
tmCharSet
=
ptm32A
->
tmCharSet
;
ptm32W
->
tmCharSet
=
ptm32A
->
tmCharSet
;
}
}
void
FONT_TextMetricWToA
(
const
TEXTMETRICW
*
ptmW
,
LPTEXTMETRICA
ptmA
)
{
ptmA
->
tmHeight
=
ptmW
->
tmHeight
;
ptmA
->
tmAscent
=
ptmW
->
tmAscent
;
ptmA
->
tmDescent
=
ptmW
->
tmDescent
;
ptmA
->
tmInternalLeading
=
ptmW
->
tmInternalLeading
;
ptmA
->
tmExternalLeading
=
ptmW
->
tmExternalLeading
;
ptmA
->
tmAveCharWidth
=
ptmW
->
tmAveCharWidth
;
ptmA
->
tmMaxCharWidth
=
ptmW
->
tmMaxCharWidth
;
ptmA
->
tmWeight
=
ptmW
->
tmWeight
;
ptmA
->
tmOverhang
=
ptmW
->
tmOverhang
;
ptmA
->
tmDigitizedAspectX
=
ptmW
->
tmDigitizedAspectX
;
ptmA
->
tmDigitizedAspectY
=
ptmW
->
tmDigitizedAspectY
;
ptmA
->
tmFirstChar
=
ptmW
->
tmFirstChar
;
ptmA
->
tmLastChar
=
ptmW
->
tmLastChar
;
ptmA
->
tmDefaultChar
=
ptmW
->
tmDefaultChar
;
ptmA
->
tmBreakChar
=
ptmW
->
tmBreakChar
;
ptmA
->
tmItalic
=
ptmW
->
tmItalic
;
ptmA
->
tmUnderlined
=
ptmW
->
tmUnderlined
;
ptmA
->
tmStruckOut
=
ptmW
->
tmStruckOut
;
ptmA
->
tmPitchAndFamily
=
ptmW
->
tmPitchAndFamily
;
ptmA
->
tmCharSet
=
ptmW
->
tmCharSet
;
}
void
FONT_NewTextMetricExWTo16
(
const
NEWTEXTMETRICEXW
*
ptmW
,
LPNEWTEXTMETRICEX16
ptm16
)
{
FONT_TextMetricWTo16
((
LPTEXTMETRICW
)
ptmW
,
(
LPTEXTMETRIC16
)
ptm16
);
ptm16
->
ntmetm
.
ntmFlags
=
ptmW
->
ntmetm
.
ntmFlags
;
ptm16
->
ntmetm
.
ntmSizeEM
=
ptmW
->
ntmetm
.
ntmSizeEM
;
ptm16
->
ntmetm
.
ntmCellHeight
=
ptmW
->
ntmetm
.
ntmCellHeight
;
ptm16
->
ntmetm
.
ntmAvgWidth
=
ptmW
->
ntmetm
.
ntmAvgWidth
;
memcpy
(
&
ptm16
->
ntmeFontSignature
,
&
ptmW
->
ntmeFontSignature
,
sizeof
(
FONTSIGNATURE
));
}
void
FONT_NewTextMetricExWToA
(
const
NEWTEXTMETRICEXW
*
ptmW
,
LPNEWTEXTMETRICEXA
ptmA
)
{
FONT_TextMetricWToA
((
LPTEXTMETRICW
)
ptmW
,
(
LPTEXTMETRICA
)
ptmA
);
ptmA
->
ntmetm
.
ntmFlags
=
ptmW
->
ntmetm
.
ntmFlags
;
ptmA
->
ntmetm
.
ntmSizeEM
=
ptmW
->
ntmetm
.
ntmSizeEM
;
ptmA
->
ntmetm
.
ntmCellHeight
=
ptmW
->
ntmetm
.
ntmCellHeight
;
ptmA
->
ntmetm
.
ntmAvgWidth
=
ptmW
->
ntmetm
.
ntmAvgWidth
;
memcpy
(
&
ptmA
->
ntmeFontSignature
,
&
ptmW
->
ntmeFontSignature
,
sizeof
(
FONTSIGNATURE
));
}
void
FONT_NewTextMetricEx16ToW
(
const
NEWTEXTMETRICEX16
*
ptm16
,
LPNEWTEXTMETRICEXW
ptmW
)
{
FONT_TextMetric16ToW
((
LPTEXTMETRIC16
)
ptm16
,
(
LPTEXTMETRICW
)
ptmW
);
ptmW
->
ntmetm
.
ntmFlags
=
ptm16
->
ntmetm
.
ntmFlags
;
ptmW
->
ntmetm
.
ntmSizeEM
=
ptm16
->
ntmetm
.
ntmSizeEM
;
ptmW
->
ntmetm
.
ntmCellHeight
=
ptm16
->
ntmetm
.
ntmCellHeight
;
ptmW
->
ntmetm
.
ntmAvgWidth
=
ptm16
->
ntmetm
.
ntmAvgWidth
;
memcpy
(
&
ptmW
->
ntmeFontSignature
,
&
ptm16
->
ntmeFontSignature
,
sizeof
(
FONTSIGNATURE
));
}
/***********************************************************************
/***********************************************************************
* CreateFontIndirect16 (GDI.57)
* CreateFontIndirect16 (GDI.57)
*/
*/
HFONT16
WINAPI
CreateFontIndirect16
(
const
LOGFONT16
*
font
)
HFONT16
WINAPI
CreateFontIndirect16
(
const
LOGFONT16
*
plf16
)
{
LOGFONTW
lfW
;
if
(
plf16
)
{
FONT_LogFont16ToW
(
plf16
,
&
lfW
);
return
CreateFontIndirectW
(
&
lfW
);
}
else
{
return
CreateFontIndirectW
(
NULL
);
}
}
/***********************************************************************
* CreateFontIndirectA (GDI32.@)
*/
HFONT
WINAPI
CreateFontIndirectA
(
const
LOGFONTA
*
plfA
)
{
LOGFONTW
lfW
;
if
(
plfA
)
{
FONT_LogFontAToW
(
plfA
,
&
lfW
);
return
CreateFontIndirectW
(
&
lfW
);
}
else
return
CreateFontIndirectW
(
NULL
);
}
/***********************************************************************
* CreateFontIndirectW (GDI32.@)
*/
HFONT
WINAPI
CreateFontIndirectW
(
const
LOGFONTW
*
plf
)
{
{
HFONT
hFont
=
0
;
HFONT
hFont
=
0
;
if
(
font
)
if
(
plf
)
{
{
FONTOBJ
*
fontPtr
;
FONTOBJ
*
fontPtr
;
if
((
fontPtr
=
GDI_AllocObject
(
sizeof
(
FONTOBJ
),
FONT_MAGIC
,
&
hFont
)))
if
((
fontPtr
=
GDI_AllocObject
(
sizeof
(
FONTOBJ
),
FONT_MAGIC
,
&
hFont
)))
{
{
memcpy
(
&
fontPtr
->
logfont
,
font
,
sizeof
(
LOGFONT16
)
);
memcpy
(
&
fontPtr
->
logfont
,
plf
,
sizeof
(
LOGFONTW
)
);
TRACE
(
"(%
i %i %i %i
) '%s' %s %s => %04x
\n
"
,
TRACE
(
"(%
ld %ld %ld %ld
) '%s' %s %s => %04x
\n
"
,
font
->
lfHeight
,
font
->
lfWidth
,
plf
->
lfHeight
,
plf
->
lfWidth
,
font
->
lfEscapement
,
font
->
lfOrientation
,
plf
->
lfEscapement
,
plf
->
lfOrientation
,
font
->
lfFaceName
?
font
->
lfFaceName
:
"NULL"
,
debugstr_w
(
plf
->
lfFaceName
)
,
font
->
lfWeight
>
400
?
"Bold"
:
""
,
plf
->
lfWeight
>
400
?
"Bold"
:
""
,
font
->
lfItalic
?
"Italic"
:
""
,
hFont
);
plf
->
lfItalic
?
"Italic"
:
""
,
hFont
);
if
(
font
->
lfEscapement
!=
font
->
lfOrientation
)
{
if
(
plf
->
lfEscapement
!=
plf
->
lfOrientation
)
{
/* this should really depend on whether GM_ADVANCED is set */
/* this should really depend on whether GM_ADVANCED is set */
fontPtr
->
logfont
.
lfOrientation
=
fontPtr
->
logfont
.
lfEscapement
;
fontPtr
->
logfont
.
lfOrientation
=
fontPtr
->
logfont
.
lfEscapement
;
WARN
(
"orientation angle %f set to "
WARN
(
"orientation angle %f set to "
"escapement angle %f for new font %04x
\n
"
,
"escapement angle %f for new font %04x
\n
"
,
font
->
lfOrientation
/
10
.,
font
->
lfEscapement
/
10
.,
hFont
);
plf
->
lfOrientation
/
10
.,
plf
->
lfEscapement
/
10
.,
hFont
);
}
}
GDI_ReleaseObj
(
hFont
);
GDI_ReleaseObj
(
hFont
);
}
}
...
@@ -347,35 +479,6 @@ HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *font )
...
@@ -347,35 +479,6 @@ HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *font )
}
}
/***********************************************************************
/***********************************************************************
* CreateFontIndirectA (GDI32.44)
*/
HFONT
WINAPI
CreateFontIndirectA
(
const
LOGFONTA
*
font
)
{
LOGFONT16
font16
;
if
(
font
)
{
FONT_LogFont32ATo16
(
font
,
&
font16
);
return
CreateFontIndirect16
(
&
font16
);
}
else
return
CreateFontIndirect16
(
NULL
);
}
/***********************************************************************
* CreateFontIndirectW (GDI32.45)
*/
HFONT
WINAPI
CreateFontIndirectW
(
const
LOGFONTW
*
font
)
{
LOGFONT16
font16
;
if
(
font
)
{
FONT_LogFont32WTo16
(
font
,
&
font16
);
return
CreateFontIndirect16
(
&
font16
);
}
else
return
CreateFontIndirect16
(
NULL
);
}
/***********************************************************************
* CreateFont16 (GDI.56)
* CreateFont16 (GDI.56)
*/
*/
HFONT16
WINAPI
CreateFont16
(
INT16
height
,
INT16
width
,
INT16
esc
,
INT16
orient
,
HFONT16
WINAPI
CreateFont16
(
INT16
height
,
INT16
width
,
INT16
esc
,
INT16
orient
,
...
@@ -386,8 +489,6 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
...
@@ -386,8 +489,6 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
{
{
LOGFONT16
logfont
;
LOGFONT16
logfont
;
TRACE
(
"('%s',%d,%d)
\n
"
,
(
name
?
name
:
"(null)"
)
,
height
,
width
);
logfont
.
lfHeight
=
height
;
logfont
.
lfHeight
=
height
;
logfont
.
lfWidth
=
width
;
logfont
.
lfWidth
=
width
;
logfont
.
lfEscapement
=
esc
;
logfont
.
lfEscapement
=
esc
;
...
@@ -411,7 +512,7 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
...
@@ -411,7 +512,7 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
}
}
/*************************************************************************
/*************************************************************************
* CreateFontA (GDI32.
43
)
* CreateFontA (GDI32.
@
)
*/
*/
HFONT
WINAPI
CreateFontA
(
INT
height
,
INT
width
,
INT
esc
,
HFONT
WINAPI
CreateFontA
(
INT
height
,
INT
width
,
INT
esc
,
INT
orient
,
INT
weight
,
DWORD
italic
,
INT
orient
,
INT
weight
,
DWORD
italic
,
...
@@ -419,13 +520,32 @@ HFONT WINAPI CreateFontA( INT height, INT width, INT esc,
...
@@ -419,13 +520,32 @@ HFONT WINAPI CreateFontA( INT height, INT width, INT esc,
DWORD
outpres
,
DWORD
clippres
,
DWORD
quality
,
DWORD
outpres
,
DWORD
clippres
,
DWORD
quality
,
DWORD
pitch
,
LPCSTR
name
)
DWORD
pitch
,
LPCSTR
name
)
{
{
return
(
HFONT
)
CreateFont16
(
height
,
width
,
esc
,
orient
,
weight
,
italic
,
LOGFONTA
logfont
;
underline
,
strikeout
,
charset
,
outpres
,
clippres
,
quality
,
pitch
,
name
);
logfont
.
lfHeight
=
height
;
logfont
.
lfWidth
=
width
;
logfont
.
lfEscapement
=
esc
;
logfont
.
lfOrientation
=
orient
;
logfont
.
lfWeight
=
weight
;
logfont
.
lfItalic
=
italic
;
logfont
.
lfUnderline
=
underline
;
logfont
.
lfStrikeOut
=
strikeout
;
logfont
.
lfCharSet
=
charset
;
logfont
.
lfOutPrecision
=
outpres
;
logfont
.
lfClipPrecision
=
clippres
;
logfont
.
lfQuality
=
quality
;
logfont
.
lfPitchAndFamily
=
pitch
;
if
(
name
)
lstrcpynA
(
logfont
.
lfFaceName
,
name
,
sizeof
(
logfont
.
lfFaceName
));
else
logfont
.
lfFaceName
[
0
]
=
'\0'
;
return
CreateFontIndirectA
(
&
logfont
);
}
}
/*************************************************************************
/*************************************************************************
* CreateFontW (GDI32.
46
)
* CreateFontW (GDI32.
@
)
*/
*/
HFONT
WINAPI
CreateFontW
(
INT
height
,
INT
width
,
INT
esc
,
HFONT
WINAPI
CreateFontW
(
INT
height
,
INT
width
,
INT
esc
,
INT
orient
,
INT
weight
,
DWORD
italic
,
INT
orient
,
INT
weight
,
DWORD
italic
,
...
@@ -433,13 +553,29 @@ HFONT WINAPI CreateFontW( INT height, INT width, INT esc,
...
@@ -433,13 +553,29 @@ HFONT WINAPI CreateFontW( INT height, INT width, INT esc,
DWORD
outpres
,
DWORD
clippres
,
DWORD
quality
,
DWORD
outpres
,
DWORD
clippres
,
DWORD
quality
,
DWORD
pitch
,
LPCWSTR
name
)
DWORD
pitch
,
LPCWSTR
name
)
{
{
LPSTR
namea
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
name
);
LOGFONTW
logfont
;
HFONT
ret
=
(
HFONT
)
CreateFont16
(
height
,
width
,
esc
,
orient
,
weight
,
italic
,
underline
,
strikeout
,
charset
,
logfont
.
lfHeight
=
height
;
outpres
,
clippres
,
quality
,
pitch
,
logfont
.
lfWidth
=
width
;
namea
);
logfont
.
lfEscapement
=
esc
;
if
(
namea
)
HeapFree
(
GetProcessHeap
(),
0
,
namea
);
logfont
.
lfOrientation
=
orient
;
return
ret
;
logfont
.
lfWeight
=
weight
;
logfont
.
lfItalic
=
italic
;
logfont
.
lfUnderline
=
underline
;
logfont
.
lfStrikeOut
=
strikeout
;
logfont
.
lfCharSet
=
charset
;
logfont
.
lfOutPrecision
=
outpres
;
logfont
.
lfClipPrecision
=
clippres
;
logfont
.
lfQuality
=
quality
;
logfont
.
lfPitchAndFamily
=
pitch
;
if
(
name
)
lstrcpynW
(
logfont
.
lfFaceName
,
name
,
sizeof
(
logfont
.
lfFaceName
)
/
sizeof
(
WCHAR
));
else
logfont
.
lfFaceName
[
0
]
=
'\0'
;
return
CreateFontIndirectW
(
&
logfont
);
}
}
...
@@ -448,8 +584,12 @@ HFONT WINAPI CreateFontW( INT height, INT width, INT esc,
...
@@ -448,8 +584,12 @@ HFONT WINAPI CreateFontW( INT height, INT width, INT esc,
*/
*/
INT16
FONT_GetObject16
(
FONTOBJ
*
font
,
INT16
count
,
LPSTR
buffer
)
INT16
FONT_GetObject16
(
FONTOBJ
*
font
,
INT16
count
,
LPSTR
buffer
)
{
{
LOGFONT16
lf16
;
FONT_LogFontWTo16
(
&
font
->
logfont
,
&
lf16
);
if
(
count
>
sizeof
(
LOGFONT16
))
count
=
sizeof
(
LOGFONT16
);
if
(
count
>
sizeof
(
LOGFONT16
))
count
=
sizeof
(
LOGFONT16
);
memcpy
(
buffer
,
&
font
->
logfont
,
count
);
memcpy
(
buffer
,
&
lf16
,
count
);
return
count
;
return
count
;
}
}
...
@@ -458,12 +598,12 @@ INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer )
...
@@ -458,12 +598,12 @@ INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer )
*/
*/
INT
FONT_GetObjectA
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
)
INT
FONT_GetObjectA
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
)
{
{
LOGFONTA
fnt32
;
LOGFONTA
lfA
;
FONT_LogFont
16To32A
(
&
font
->
logfont
,
&
fnt32
);
FONT_LogFont
WToA
(
&
font
->
logfont
,
&
lfA
);
if
(
count
>
sizeof
(
fnt32
))
count
=
sizeof
(
fnt32
);
if
(
count
>
sizeof
(
lfA
))
count
=
sizeof
(
lfA
);
memcpy
(
buffer
,
&
fnt32
,
count
);
memcpy
(
buffer
,
&
lfA
,
count
);
return
count
;
return
count
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -471,12 +611,8 @@ INT FONT_GetObjectA( FONTOBJ *font, INT count, LPSTR buffer )
...
@@ -471,12 +611,8 @@ INT FONT_GetObjectA( FONTOBJ *font, INT count, LPSTR buffer )
*/
*/
INT
FONT_GetObjectW
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
)
INT
FONT_GetObjectW
(
FONTOBJ
*
font
,
INT
count
,
LPSTR
buffer
)
{
{
LOGFONTW
fnt32
;
if
(
count
>
sizeof
(
LOGFONTW
))
count
=
sizeof
(
LOGFONTW
);
memcpy
(
buffer
,
&
font
->
logfont
,
count
);
FONT_LogFont16To32W
(
&
font
->
logfont
,
&
fnt32
);
if
(
count
>
sizeof
(
fnt32
))
count
=
sizeof
(
fnt32
);
memcpy
(
buffer
,
&
fnt32
,
count
);
return
count
;
return
count
;
}
}
...
@@ -487,17 +623,17 @@ INT FONT_GetObjectW( FONTOBJ *font, INT count, LPSTR buffer )
...
@@ -487,17 +623,17 @@ INT FONT_GetObjectW( FONTOBJ *font, INT count, LPSTR buffer )
* Called by the device driver layer to pass font info
* Called by the device driver layer to pass font info
* down to the application.
* down to the application.
*/
*/
static
INT
FONT_EnumInstance16
(
LPENUMLOGFONTEX
16
plf
,
static
INT
FONT_EnumInstance16
(
LPENUMLOGFONTEX
W
plf
,
LPNEWTEXTMETRICEXW
ptm
,
LPNEWTEXTMETRIC16
ptm
,
UINT16
fType
,
LPARAM
lp
)
DWORD
fType
,
LPARAM
lp
)
{
{
#define pfe ((fontEnum16*)lp)
#define pfe ((fontEnum16*)lp)
if
(
pfe
->
lpLogFontParam
->
lfCharSet
==
DEFAULT_CHARSET
||
if
(
pfe
->
lpLogFontParam
->
lfCharSet
==
DEFAULT_CHARSET
||
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
elfLogFont
.
lfCharSet
)
pfe
->
lpLogFontParam
->
lfCharSet
==
plf
->
elfLogFont
.
lfCharSet
)
{
{
memcpy
(
pfe
->
lpLogFont
,
plf
,
sizeof
(
ENUMLOGFONT16
)
);
FONT_EnumLogFontExWTo16
(
plf
,
pfe
->
lpLogFont
);
memcpy
(
pfe
->
lpTextMetric
,
ptm
,
sizeof
(
NEWTEXTMETRIC16
)
);
FONT_NewTextMetricExWTo16
(
ptm
,
pfe
->
lpTextMetric
);
return
pfe
->
lpEnumFunc
(
pfe
->
segLogFont
,
pfe
->
segTextMetric
,
return
pfe
->
lpEnumFunc
(
pfe
->
segLogFont
,
pfe
->
segTextMetric
,
fType
,
(
LPARAM
)(
pfe
->
lpData
)
);
(
UINT16
)
fType
,
(
LPARAM
)(
pfe
->
lpData
)
);
}
}
#undef pfe
#undef pfe
return
1
;
return
1
;
...
@@ -506,8 +642,8 @@ static INT FONT_EnumInstance16( LPENUMLOGFONTEX16 plf,
...
@@ -506,8 +642,8 @@ static INT FONT_EnumInstance16( LPENUMLOGFONTEX16 plf,
/***********************************************************************
/***********************************************************************
* FONT_EnumInstance
* FONT_EnumInstance
*/
*/
static
INT
FONT_EnumInstance
(
LPENUMLOGFONTEX
16
plf
,
static
INT
FONT_EnumInstance
(
LPENUMLOGFONTEX
W
plf
,
LPNEWTEXTMETRICEXW
ptm
,
LPNEWTEXTMETRIC16
ptm
,
UINT16
fType
,
LPARAM
lp
)
DWORD
fType
,
LPARAM
lp
)
{
{
/* lfCharSet is at the same offset in both LOGFONTA and LOGFONTW */
/* lfCharSet is at the same offset in both LOGFONTA and LOGFONTW */
...
@@ -519,20 +655,19 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEX16 plf,
...
@@ -519,20 +655,19 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEX16 plf,
if
(
pfe
->
dwFlags
&
ENUM_UNICODE
)
if
(
pfe
->
dwFlags
&
ENUM_UNICODE
)
{
{
FONT_EnumLogFontEx16To32W
(
plf
,
pfe
->
lpLogFont
);
return
pfe
->
lpEnumFunc
(
plf
,
ptm
,
fType
,
pfe
->
lpData
);
FONT_TextMetric16to32W
(
(
LPTEXTMETRIC16
)
ptm
,
(
LPTEXTMETRICW
)(
pfe
->
lpTextMetric
)
);
return
pfe
->
lpEnumFunc
(
pfe
->
lpLogFont
,
pfe
->
lpTextMetric
,
fType
,
pfe
->
lpData
);
}
}
else
else
{
{
ENUMLOGFONTEXA
logfont
;
ENUMLOGFONTEXA
logfont
;
NEWTEXTMETRICEXA
tmA
;
FONT_EnumLogFontEx
16To32
A
(
plf
,
&
logfont
);
FONT_EnumLogFontEx
WTo
A
(
plf
,
&
logfont
);
FONT_
TextMetric16to32A
(
(
LPTEXTMETRIC16
)
ptm
,
(
LPTEXTMETRICA
)
pfe
->
lpTextMetric
);
FONT_
NewTextMetricExWToA
(
ptm
,
&
tmA
);
return
pfe
->
lpEnumFunc
(
(
LPENUMLOGFONTEXW
)
&
logfont
,
return
pfe
->
lpEnumFunc
(
(
LPENUMLOGFONTEXW
)
&
logfont
,
pfe
->
lpTextMetric
,
fType
,
pfe
->
lpData
);
(
LPNEWTEXTMETRICEXW
)
&
tmA
,
fType
,
pfe
->
lpData
);
}
}
}
}
#undef pfe
#undef pfe
...
@@ -546,7 +681,7 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
...
@@ -546,7 +681,7 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
FONTENUMPROCEX16
efproc
,
LPARAM
lParam
,
FONTENUMPROCEX16
efproc
,
LPARAM
lParam
,
DWORD
dwFlags
)
DWORD
dwFlags
)
{
{
BOOL
(
*
enum_func
)(
HDC
,
LPLOGFONT
16
,
DEVICEFONTENUMPROC
,
LPARAM
);
BOOL
(
*
enum_func
)(
HDC
,
LPLOGFONT
W
,
DEVICEFONTENUMPROC
,
LPARAM
);
INT16
retVal
=
0
;
INT16
retVal
=
0
;
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
...
@@ -563,6 +698,8 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
...
@@ -563,6 +698,8 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
if
(
lplf16
)
if
(
lplf16
)
{
{
fontEnum16
fe16
;
fontEnum16
fe16
;
LOGFONTW
lfW
;
FONT_LogFont16ToW
(
plf
,
&
lfW
);
fe16
.
lpLogFontParam
=
plf
;
fe16
.
lpLogFontParam
=
plf
;
fe16
.
lpEnumFunc
=
efproc
;
fe16
.
lpEnumFunc
=
efproc
;
...
@@ -573,7 +710,8 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
...
@@ -573,7 +710,8 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
fe16
.
segTextMetric
=
SEGPTR_GET
(
lptm16
);
fe16
.
segTextMetric
=
SEGPTR_GET
(
lptm16
);
fe16
.
segLogFont
=
SEGPTR_GET
(
lplf16
);
fe16
.
segLogFont
=
SEGPTR_GET
(
lplf16
);
retVal
=
enum_func
(
hDC
,
plf
,
FONT_EnumInstance16
,
(
LPARAM
)
&
fe16
);
retVal
=
enum_func
(
hDC
,
&
lfW
,
FONT_EnumInstance16
,
(
LPARAM
)
&
fe16
);
SEGPTR_FREE
(
lplf16
);
SEGPTR_FREE
(
lplf16
);
}
}
SEGPTR_FREE
(
lptm16
);
SEGPTR_FREE
(
lptm16
);
...
@@ -585,10 +723,11 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
...
@@ -585,10 +723,11 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
/***********************************************************************
/***********************************************************************
* FONT_EnumFontFamiliesEx
* FONT_EnumFontFamiliesEx
*/
*/
static
INT
FONT_EnumFontFamiliesEx
(
HDC
hDC
,
LPLOGFONTW
plf
,
FONTENUMPROCEXW
efproc
,
static
INT
FONT_EnumFontFamiliesEx
(
HDC
hDC
,
LPLOGFONTW
plf
,
FONTENUMPROCEXW
efproc
,
LPARAM
lParam
,
DWORD
dwUnicode
)
LPARAM
lParam
,
DWORD
dwUnicode
)
{
{
BOOL
(
*
enum_func
)(
HDC
,
LPLOGFONT
16
,
DEVICEFONTENUMPROC
,
LPARAM
);
BOOL
(
*
enum_func
)(
HDC
,
LPLOGFONT
W
,
DEVICEFONTENUMPROC
,
LPARAM
);
INT
ret
=
0
;
INT
ret
=
0
;
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
...
@@ -598,42 +737,21 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf, FONTENUMPROCEXW efp
...
@@ -598,42 +737,21 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf, FONTENUMPROCEXW efp
if
(
enum_func
)
if
(
enum_func
)
{
{
LOGFONT16
lf16
;
NEWTEXTMETRICEXW
tm32w
;
ENUMLOGFONTEXW
lf32w
;
fontEnum32
fe32
;
fontEnum32
fe32
;
fe32
.
lpLogFontParam
=
plf
;
fe32
.
lpLogFontParam
=
plf
;
fe32
.
lpEnumFunc
=
efproc
;
fe32
.
lpEnumFunc
=
efproc
;
fe32
.
lpData
=
lParam
;
fe32
.
lpData
=
lParam
;
fe32
.
lpTextMetric
=
&
tm32w
;
fe32
.
lpLogFont
=
&
lf32w
;
fe32
.
dwFlags
=
dwUnicode
;
fe32
.
dwFlags
=
dwUnicode
;
/* the only difference between LOGFONT32A and LOGFONT32W is in the lfFaceName */
ret
=
enum_func
(
hDC
,
plf
,
FONT_EnumInstance
,
(
LPARAM
)
&
fe32
);
if
(
plf
->
lfFaceName
[
0
]
)
{
if
(
dwUnicode
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
plf
->
lfFaceName
,
-
1
,
lf16
.
lfFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
lf16
.
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
else
lstrcpynA
(
lf16
.
lfFaceName
,
(
LPCSTR
)
plf
->
lfFaceName
,
LF_FACESIZE
);
}
else
lf16
.
lfFaceName
[
0
]
=
'\0'
;
lf16
.
lfCharSet
=
plf
->
lfCharSet
;
ret
=
enum_func
(
hDC
,
&
lf16
,
FONT_EnumInstance
,
(
LPARAM
)
&
fe32
);
}
}
return
ret
;
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
* EnumFontFamiliesExW (GDI32.
82
)
* EnumFontFamiliesExW (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontFamiliesExW
(
HDC
hDC
,
LPLOGFONTW
plf
,
INT
WINAPI
EnumFontFamiliesExW
(
HDC
hDC
,
LPLOGFONTW
plf
,
FONTENUMPROCEXW
efproc
,
FONTENUMPROCEXW
efproc
,
...
@@ -643,13 +761,16 @@ INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
...
@@ -643,13 +761,16 @@ INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
}
}
/***********************************************************************
/***********************************************************************
* EnumFontFamiliesExA (GDI32.
81
)
* EnumFontFamiliesExA (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontFamiliesExA
(
HDC
hDC
,
LPLOGFONTA
plf
,
INT
WINAPI
EnumFontFamiliesExA
(
HDC
hDC
,
LPLOGFONTA
plf
,
FONTENUMPROCEXA
efproc
,
FONTENUMPROCEXA
efproc
,
LPARAM
lParam
,
DWORD
dwFlags
)
LPARAM
lParam
,
DWORD
dwFlags
)
{
{
return
FONT_EnumFontFamiliesEx
(
hDC
,
(
LPLOGFONTW
)
plf
,
LOGFONTW
lfW
;
FONT_LogFontAToW
(
plf
,
&
lfW
);
return
FONT_EnumFontFamiliesEx
(
hDC
,
&
lfW
,
(
FONTENUMPROCEXW
)
efproc
,
lParam
,
0
);
(
FONTENUMPROCEXW
)
efproc
,
lParam
,
0
);
}
}
...
@@ -669,7 +790,7 @@ INT16 WINAPI EnumFontFamilies16( HDC16 hDC, LPCSTR lpFamily,
...
@@ -669,7 +790,7 @@ INT16 WINAPI EnumFontFamilies16( HDC16 hDC, LPCSTR lpFamily,
}
}
/***********************************************************************
/***********************************************************************
* EnumFontFamiliesA (GDI32.
80
)
* EnumFontFamiliesA (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontFamiliesA
(
HDC
hDC
,
LPCSTR
lpFamily
,
INT
WINAPI
EnumFontFamiliesA
(
HDC
hDC
,
LPCSTR
lpFamily
,
FONTENUMPROCA
efproc
,
LPARAM
lpData
)
FONTENUMPROCA
efproc
,
LPARAM
lpData
)
...
@@ -680,12 +801,11 @@ INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily,
...
@@ -680,12 +801,11 @@ INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily,
if
(
lpFamily
)
lstrcpynA
(
lf
.
lfFaceName
,
lpFamily
,
LF_FACESIZE
);
if
(
lpFamily
)
lstrcpynA
(
lf
.
lfFaceName
,
lpFamily
,
LF_FACESIZE
);
else
lf
.
lfFaceName
[
0
]
=
lf
.
lfFaceName
[
1
]
=
'\0'
;
else
lf
.
lfFaceName
[
0
]
=
lf
.
lfFaceName
[
1
]
=
'\0'
;
return
FONT_EnumFontFamiliesEx
(
hDC
,
(
LPLOGFONTW
)
&
lf
,
return
EnumFontFamiliesExA
(
hDC
,
&
lf
,
(
FONTENUMPROCEXA
)
efproc
,
lpData
,
0
);
(
FONTENUMPROCEXW
)
efproc
,
lpData
,
0
);
}
}
/***********************************************************************
/***********************************************************************
* EnumFontFamiliesW (GDI32.
83
)
* EnumFontFamiliesW (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontFamiliesW
(
HDC
hDC
,
LPCWSTR
lpFamily
,
INT
WINAPI
EnumFontFamiliesW
(
HDC
hDC
,
LPCWSTR
lpFamily
,
FONTENUMPROCW
efproc
,
LPARAM
lpData
)
FONTENUMPROCW
efproc
,
LPARAM
lpData
)
...
@@ -696,8 +816,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
...
@@ -696,8 +816,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
if
(
lpFamily
)
lstrcpynW
(
lf
.
lfFaceName
,
lpFamily
,
LF_FACESIZE
);
if
(
lpFamily
)
lstrcpynW
(
lf
.
lfFaceName
,
lpFamily
,
LF_FACESIZE
);
else
lf
.
lfFaceName
[
0
]
=
0
;
else
lf
.
lfFaceName
[
0
]
=
0
;
return
FONT_EnumFontFamiliesEx
(
hDC
,
&
lf
,
(
FONTENUMPROCEXW
)
efproc
,
return
EnumFontFamiliesExW
(
hDC
,
&
lf
,
(
FONTENUMPROCEXW
)
efproc
,
lpData
,
0
);
lpData
,
ENUM_UNICODE
);
}
}
/***********************************************************************
/***********************************************************************
...
@@ -710,7 +829,7 @@ INT16 WINAPI EnumFonts16( HDC16 hDC, LPCSTR lpName, FONTENUMPROC16 efproc,
...
@@ -710,7 +829,7 @@ INT16 WINAPI EnumFonts16( HDC16 hDC, LPCSTR lpName, FONTENUMPROC16 efproc,
}
}
/***********************************************************************
/***********************************************************************
* EnumFontsA (GDI32.
84
)
* EnumFontsA (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontsA
(
HDC
hDC
,
LPCSTR
lpName
,
FONTENUMPROCA
efproc
,
INT
WINAPI
EnumFontsA
(
HDC
hDC
,
LPCSTR
lpName
,
FONTENUMPROCA
efproc
,
LPARAM
lpData
)
LPARAM
lpData
)
...
@@ -719,7 +838,7 @@ INT WINAPI EnumFontsA( HDC hDC, LPCSTR lpName, FONTENUMPROCA efproc,
...
@@ -719,7 +838,7 @@ INT WINAPI EnumFontsA( HDC hDC, LPCSTR lpName, FONTENUMPROCA efproc,
}
}
/***********************************************************************
/***********************************************************************
* EnumFontsW (GDI32.
85
)
* EnumFontsW (GDI32.
@
)
*/
*/
INT
WINAPI
EnumFontsW
(
HDC
hDC
,
LPCWSTR
lpName
,
FONTENUMPROCW
efproc
,
INT
WINAPI
EnumFontsW
(
HDC
hDC
,
LPCWSTR
lpName
,
FONTENUMPROCW
efproc
,
LPARAM
lpData
)
LPARAM
lpData
)
...
@@ -738,7 +857,7 @@ INT16 WINAPI GetTextCharacterExtra16( HDC16 hdc )
...
@@ -738,7 +857,7 @@ INT16 WINAPI GetTextCharacterExtra16( HDC16 hdc )
/***********************************************************************
/***********************************************************************
* GetTextCharacterExtra (GDI32.
225
)
* GetTextCharacterExtra (GDI32.
@
)
*/
*/
INT
WINAPI
GetTextCharacterExtra
(
HDC
hdc
)
INT
WINAPI
GetTextCharacterExtra
(
HDC
hdc
)
{
{
...
@@ -762,7 +881,7 @@ INT16 WINAPI SetTextCharacterExtra16( HDC16 hdc, INT16 extra )
...
@@ -762,7 +881,7 @@ INT16 WINAPI SetTextCharacterExtra16( HDC16 hdc, INT16 extra )
/***********************************************************************
/***********************************************************************
* SetTextCharacterExtra (GDI32.
337
)
* SetTextCharacterExtra (GDI32.
@
)
*/
*/
INT
WINAPI
SetTextCharacterExtra
(
HDC
hdc
,
INT
extra
)
INT
WINAPI
SetTextCharacterExtra
(
HDC
hdc
,
INT
extra
)
{
{
...
@@ -792,7 +911,7 @@ INT16 WINAPI SetTextJustification16( HDC16 hdc, INT16 extra, INT16 breaks )
...
@@ -792,7 +911,7 @@ INT16 WINAPI SetTextJustification16( HDC16 hdc, INT16 extra, INT16 breaks )
/***********************************************************************
/***********************************************************************
* SetTextJustification (GDI32.
339
)
* SetTextJustification (GDI32.
@
)
*/
*/
BOOL
WINAPI
SetTextJustification
(
HDC
hdc
,
INT
extra
,
INT
breaks
)
BOOL
WINAPI
SetTextJustification
(
HDC
hdc
,
INT
extra
,
INT
breaks
)
{
{
...
@@ -832,10 +951,28 @@ INT16 WINAPI GetTextFace16( HDC16 hdc, INT16 count, LPSTR name )
...
@@ -832,10 +951,28 @@ INT16 WINAPI GetTextFace16( HDC16 hdc, INT16 count, LPSTR name )
}
}
/***********************************************************************
/***********************************************************************
* GetTextFaceA (GDI32.
234
)
* GetTextFaceA (GDI32.
@
)
*/
*/
INT
WINAPI
GetTextFaceA
(
HDC
hdc
,
INT
count
,
LPSTR
name
)
INT
WINAPI
GetTextFaceA
(
HDC
hdc
,
INT
count
,
LPSTR
name
)
{
{
INT
res
=
GetTextFaceW
(
hdc
,
0
,
NULL
);
LPWSTR
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
res
*
2
);
GetTextFaceW
(
hdc
,
res
,
nameW
);
if
(
name
)
res
=
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
-
1
,
name
,
count
,
NULL
,
NULL
);
else
res
=
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
return
res
;
}
/***********************************************************************
* GetTextFaceW (GDI32.@)
*/
INT
WINAPI
GetTextFaceW
(
HDC
hdc
,
INT
count
,
LPWSTR
name
)
{
FONTOBJ
*
font
;
FONTOBJ
*
font
;
INT
ret
=
0
;
INT
ret
=
0
;
...
@@ -846,28 +983,16 @@ INT WINAPI GetTextFaceA( HDC hdc, INT count, LPSTR name )
...
@@ -846,28 +983,16 @@ INT WINAPI GetTextFaceA( HDC hdc, INT count, LPSTR name )
{
{
if
(
name
)
if
(
name
)
{
{
lstrcpyn
A
(
name
,
font
->
logfont
.
lfFaceName
,
count
);
lstrcpyn
W
(
name
,
font
->
logfont
.
lfFaceName
,
count
);
ret
=
strlen
(
name
);
ret
=
strlen
W
(
name
);
}
}
else
ret
=
strlen
(
font
->
logfont
.
lfFaceName
)
+
1
;
else
ret
=
strlen
W
(
font
->
logfont
.
lfFaceName
)
+
1
;
GDI_ReleaseObj
(
dc
->
hFont
);
GDI_ReleaseObj
(
dc
->
hFont
);
}
}
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
return
ret
;
return
ret
;
}
}
/***********************************************************************
* GetTextFaceW (GDI32.235)
*/
INT
WINAPI
GetTextFaceW
(
HDC
hdc
,
INT
count
,
LPWSTR
name
)
{
LPSTR
nameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
);
INT
res
=
GetTextFaceA
(
hdc
,
count
,
nameA
);
if
(
name
)
res
=
MultiByteToWideChar
(
CP_ACP
,
0
,
nameA
,
-
1
,
name
,
count
);
HeapFree
(
GetProcessHeap
(),
0
,
nameA
);
return
res
;
}
/***********************************************************************
/***********************************************************************
* GetTextExtent16 (GDI.91)
* GetTextExtent16 (GDI.91)
...
@@ -901,7 +1026,7 @@ BOOL16 WINAPI GetTextExtentPoint16( HDC16 hdc, LPCSTR str, INT16 count,
...
@@ -901,7 +1026,7 @@ BOOL16 WINAPI GetTextExtentPoint16( HDC16 hdc, LPCSTR str, INT16 count,
/***********************************************************************
/***********************************************************************
* GetTextExtentPoint32A (GDI32.
230
)
* GetTextExtentPoint32A (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextExtentPoint32A
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
BOOL
WINAPI
GetTextExtentPoint32A
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
LPSIZE
size
)
LPSIZE
size
)
...
@@ -934,7 +1059,7 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
...
@@ -934,7 +1059,7 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
/***********************************************************************
/***********************************************************************
* GetTextExtentPoint32W [GDI32.
231
] Computes width/height for a string
* GetTextExtentPoint32W [GDI32.
@
] Computes width/height for a string
*
*
* Computes width and height of the specified string.
* Computes width and height of the specified string.
*
*
...
@@ -963,7 +1088,7 @@ BOOL WINAPI GetTextExtentPoint32W(
...
@@ -963,7 +1088,7 @@ BOOL WINAPI GetTextExtentPoint32W(
/***********************************************************************
/***********************************************************************
* GetTextExtentPointA (GDI32.
232
)
* GetTextExtentPointA (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextExtentPointA
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
BOOL
WINAPI
GetTextExtentPointA
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
LPSIZE
size
)
LPSIZE
size
)
...
@@ -973,7 +1098,7 @@ BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
...
@@ -973,7 +1098,7 @@ BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
}
}
/***********************************************************************
/***********************************************************************
* GetTextExtentPointW (GDI32.
233
)
* GetTextExtentPointW (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextExtentPointW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
BOOL
WINAPI
GetTextExtentPointW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
LPSIZE
size
)
LPSIZE
size
)
...
@@ -984,7 +1109,7 @@ BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count,
...
@@ -984,7 +1109,7 @@ BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count,
/***********************************************************************
/***********************************************************************
* GetTextExtentExPointA (GDI32.
228
)
* GetTextExtentExPointA (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextExtentExPointA
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
BOOL
WINAPI
GetTextExtentExPointA
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
INT
maxExt
,
LPINT
lpnFit
,
INT
maxExt
,
LPINT
lpnFit
,
...
@@ -1002,7 +1127,7 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
...
@@ -1002,7 +1127,7 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
/***********************************************************************
/***********************************************************************
* GetTextExtentExPointW (GDI32.
229
)
* GetTextExtentExPointW (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextExtentExPointW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
BOOL
WINAPI
GetTextExtentExPointW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
...
@@ -1051,13 +1176,13 @@ BOOL16 WINAPI GetTextMetrics16( HDC16 hdc, TEXTMETRIC16 *metrics )
...
@@ -1051,13 +1176,13 @@ BOOL16 WINAPI GetTextMetrics16( HDC16 hdc, TEXTMETRIC16 *metrics )
TEXTMETRICA
tm32
;
TEXTMETRICA
tm32
;
if
(
!
GetTextMetricsA
(
(
HDC
)
hdc
,
&
tm32
))
return
FALSE
;
if
(
!
GetTextMetricsA
(
(
HDC
)
hdc
,
&
tm32
))
return
FALSE
;
FONT_TextMetric
32At
o16
(
&
tm32
,
metrics
);
FONT_TextMetric
AT
o16
(
&
tm32
,
metrics
);
return
TRUE
;
return
TRUE
;
}
}
/***********************************************************************
/***********************************************************************
* GetTextMetricsA (GDI32.
236
)
* GetTextMetricsA (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextMetricsA
(
HDC
hdc
,
TEXTMETRICA
*
metrics
)
BOOL
WINAPI
GetTextMetricsA
(
HDC
hdc
,
TEXTMETRICA
*
metrics
)
{
{
...
@@ -1114,13 +1239,13 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
...
@@ -1114,13 +1239,13 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
/***********************************************************************
/***********************************************************************
* GetTextMetricsW (GDI32.
237
)
* GetTextMetricsW (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
)
BOOL
WINAPI
GetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
)
{
{
TEXTMETRICA
tm
;
TEXTMETRICA
tm
;
if
(
!
GetTextMetricsA
(
(
HDC16
)
hdc
,
&
tm
))
return
FALSE
;
if
(
!
GetTextMetricsA
(
(
HDC16
)
hdc
,
&
tm
))
return
FALSE
;
FONT_TextMetric
32Ato32
W
(
&
tm
,
metrics
);
FONT_TextMetric
ATo
W
(
&
tm
,
metrics
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1146,7 +1271,9 @@ UINT16 WINAPI GetOutlineTextMetrics16(
...
@@ -1146,7 +1271,9 @@ UINT16 WINAPI GetOutlineTextMetrics16(
/***********************************************************************
/***********************************************************************
* GetOutlineTextMetricsA [GDI.207] Gets metrics for TrueType fonts.
* GetOutlineTextMetrics (GDI.207)
* GetOutlineTextMetricsA (GDI32.@)
* Gets metrics for TrueType fonts.
*
*
*
*
* RETURNS
* RETURNS
...
@@ -1216,7 +1343,7 @@ UINT WINAPI GetOutlineTextMetricsA(
...
@@ -1216,7 +1343,7 @@ UINT WINAPI GetOutlineTextMetricsA(
}
}
/***********************************************************************
/***********************************************************************
* GetOutlineTextMetricsW [GDI32.
208
]
* GetOutlineTextMetricsW [GDI32.
@
]
*/
*/
UINT
WINAPI
GetOutlineTextMetricsW
(
UINT
WINAPI
GetOutlineTextMetricsW
(
HDC
hdc
,
/* [in] Handle of device context */
HDC
hdc
,
/* [in] Handle of device context */
...
@@ -1229,6 +1356,7 @@ UINT WINAPI GetOutlineTextMetricsW(
...
@@ -1229,6 +1356,7 @@ UINT WINAPI GetOutlineTextMetricsW(
/***********************************************************************
/***********************************************************************
* GetCharWidth16 (GDI.350)
* GetCharWidth16 (GDI.350)
* GetCharWidth16 (DISPLAY.350)
*/
*/
BOOL16
WINAPI
GetCharWidth16
(
HDC16
hdc
,
UINT16
firstChar
,
UINT16
lastChar
,
BOOL16
WINAPI
GetCharWidth16
(
HDC16
hdc
,
UINT16
firstChar
,
UINT16
lastChar
,
LPINT16
buffer
)
LPINT16
buffer
)
...
@@ -1264,7 +1392,7 @@ BOOL16 WINAPI GetCharWidth16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
...
@@ -1264,7 +1392,7 @@ BOOL16 WINAPI GetCharWidth16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
/***********************************************************************
/***********************************************************************
* GetCharWidth32A (GDI32.
155
)
* GetCharWidth32A (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetCharWidth32A
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
BOOL
WINAPI
GetCharWidth32A
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
LPINT
buffer
)
...
@@ -1289,7 +1417,7 @@ BOOL WINAPI GetCharWidth32A( HDC hdc, UINT firstChar, UINT lastChar,
...
@@ -1289,7 +1417,7 @@ BOOL WINAPI GetCharWidth32A( HDC hdc, UINT firstChar, UINT lastChar,
/***********************************************************************
/***********************************************************************
* GetCharWidth32W (GDI32.
158
)
* GetCharWidth32W (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetCharWidth32W
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
BOOL
WINAPI
GetCharWidth32W
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
LPINT
buffer
)
...
@@ -1311,7 +1439,7 @@ DWORD WINAPI SetMapperFlags16( HDC16 hDC, DWORD dwFlag )
...
@@ -1311,7 +1439,7 @@ DWORD WINAPI SetMapperFlags16( HDC16 hDC, DWORD dwFlag )
/***********************************************************************
/***********************************************************************
* SetMapperFlags (GDI32.
322
)
* SetMapperFlags (GDI32.
@
)
*/
*/
DWORD
WINAPI
SetMapperFlags
(
HDC
hDC
,
DWORD
dwFlag
)
DWORD
WINAPI
SetMapperFlags
(
HDC
hDC
,
DWORD
dwFlag
)
{
{
...
@@ -1336,7 +1464,7 @@ BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
...
@@ -1336,7 +1464,7 @@ BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
}
}
/***********************************************************************
/***********************************************************************
* GetAspectRatioFilterEx (GDI32.
142
)
* GetAspectRatioFilterEx (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetAspectRatioFilterEx
(
HDC
hdc
,
LPSIZE
pAspectRatio
)
BOOL
WINAPI
GetAspectRatioFilterEx
(
HDC
hdc
,
LPSIZE
pAspectRatio
)
{
{
...
@@ -1360,7 +1488,7 @@ BOOL16 WINAPI GetCharABCWidths16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
...
@@ -1360,7 +1488,7 @@ BOOL16 WINAPI GetCharABCWidths16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
/***********************************************************************
/***********************************************************************
* GetCharABCWidthsA (GDI32.
149
)
* GetCharABCWidthsA (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetCharABCWidthsA
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
BOOL
WINAPI
GetCharABCWidthsA
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
abc
)
LPABC
abc
)
...
@@ -1370,7 +1498,7 @@ BOOL WINAPI GetCharABCWidthsA(HDC hdc, UINT firstChar, UINT lastChar,
...
@@ -1370,7 +1498,7 @@ BOOL WINAPI GetCharABCWidthsA(HDC hdc, UINT firstChar, UINT lastChar,
/******************************************************************************
/******************************************************************************
* GetCharABCWidthsW [GDI32.
152
] Retrieves widths of characters in range
* GetCharABCWidthsW [GDI32.
@
] Retrieves widths of characters in range
*
*
* PARAMS
* PARAMS
* hdc [I] Handle of device context
* hdc [I] Handle of device context
...
@@ -1408,7 +1536,7 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
...
@@ -1408,7 +1536,7 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
/***********************************************************************
/***********************************************************************
* GetGlyphOutlineA (GDI32.
186
)
* GetGlyphOutlineA (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetGlyphOutlineA
(
HDC
hdc
,
UINT
uChar
,
UINT
fuFormat
,
DWORD
WINAPI
GetGlyphOutlineA
(
HDC
hdc
,
UINT
uChar
,
UINT
fuFormat
,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
...
@@ -1420,7 +1548,7 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
...
@@ -1420,7 +1548,7 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
}
}
/***********************************************************************
/***********************************************************************
* GetGlyphOutlineW (GDI32.
187
)
* GetGlyphOutlineW (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetGlyphOutlineW
(
HDC
hdc
,
UINT
uChar
,
UINT
fuFormat
,
DWORD
WINAPI
GetGlyphOutlineW
(
HDC
hdc
,
UINT
uChar
,
UINT
fuFormat
,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
...
@@ -1443,7 +1571,7 @@ BOOL16 WINAPI CreateScalableFontResource16( UINT16 fHidden,
...
@@ -1443,7 +1571,7 @@ BOOL16 WINAPI CreateScalableFontResource16( UINT16 fHidden,
}
}
/***********************************************************************
/***********************************************************************
* CreateScalableFontResourceA (GDI32.
62
)
* CreateScalableFontResourceA (GDI32.
@
)
*/
*/
BOOL
WINAPI
CreateScalableFontResourceA
(
DWORD
fHidden
,
BOOL
WINAPI
CreateScalableFontResourceA
(
DWORD
fHidden
,
LPCSTR
lpszResourceFile
,
LPCSTR
lpszResourceFile
,
...
@@ -1460,7 +1588,7 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
...
@@ -1460,7 +1588,7 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
}
}
/***********************************************************************
/***********************************************************************
* CreateScalableFontResourceW (GDI32.
63
)
* CreateScalableFontResourceW (GDI32.
@
)
*/
*/
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
fHidden
,
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
fHidden
,
LPCWSTR
lpszResourceFile
,
LPCWSTR
lpszResourceFile
,
...
@@ -1483,7 +1611,7 @@ BOOL16 WINAPI GetRasterizerCaps16( LPRASTERIZER_STATUS lprs, UINT16 cbNumBytes)
...
@@ -1483,7 +1611,7 @@ BOOL16 WINAPI GetRasterizerCaps16( LPRASTERIZER_STATUS lprs, UINT16 cbNumBytes)
/*************************************************************************
/*************************************************************************
* GetRasterizerCaps (GDI32.
216
)
* GetRasterizerCaps (GDI32.
@
)
*/
*/
BOOL
WINAPI
GetRasterizerCaps
(
LPRASTERIZER_STATUS
lprs
,
UINT
cbNumBytes
)
BOOL
WINAPI
GetRasterizerCaps
(
LPRASTERIZER_STATUS
lprs
,
UINT
cbNumBytes
)
{
{
...
@@ -1511,7 +1639,7 @@ INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
...
@@ -1511,7 +1639,7 @@ INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
/*************************************************************************
/*************************************************************************
* GetKerningPairsA (GDI32.
192
)
* GetKerningPairsA (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetKerningPairsA
(
HDC
hDC
,
DWORD
cPairs
,
DWORD
WINAPI
GetKerningPairsA
(
HDC
hDC
,
DWORD
cPairs
,
LPKERNINGPAIR
lpKerningPairs
)
LPKERNINGPAIR
lpKerningPairs
)
...
@@ -1525,7 +1653,7 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
...
@@ -1525,7 +1653,7 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
/*************************************************************************
/*************************************************************************
* GetKerningPairsW (GDI32.
193
)
* GetKerningPairsW (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetKerningPairsW
(
HDC
hDC
,
DWORD
cPairs
,
DWORD
WINAPI
GetKerningPairsW
(
HDC
hDC
,
DWORD
cPairs
,
LPKERNINGPAIR
lpKerningPairs
)
LPKERNINGPAIR
lpKerningPairs
)
...
@@ -1534,7 +1662,7 @@ DWORD WINAPI GetKerningPairsW( HDC hDC, DWORD cPairs,
...
@@ -1534,7 +1662,7 @@ DWORD WINAPI GetKerningPairsW( HDC hDC, DWORD cPairs,
}
}
/*************************************************************************
/*************************************************************************
* TranslateCharsetInfo [GDI32.
382
]
* TranslateCharsetInfo [GDI32.
@
]
*
*
* Fills a CHARSETINFO structure for a character set, code page, or
* Fills a CHARSETINFO structure for a character set, code page, or
* font. This allows making the correspondance between different labelings
* font. This allows making the correspondance between different labelings
...
@@ -1577,7 +1705,7 @@ BOOL WINAPI TranslateCharsetInfo(
...
@@ -1577,7 +1705,7 @@ BOOL WINAPI TranslateCharsetInfo(
}
}
/*************************************************************************
/*************************************************************************
* GetFontLanguageInfo (GDI32.
182
)
* GetFontLanguageInfo (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetFontLanguageInfo
(
HDC
hdc
)
{
DWORD
WINAPI
GetFontLanguageInfo
(
HDC
hdc
)
{
/* return value 0 is correct for most cases anyway */
/* return value 0 is correct for most cases anyway */
...
@@ -1595,7 +1723,7 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
...
@@ -1595,7 +1723,7 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
}
}
/*************************************************************************
/*************************************************************************
* GetFontData [GDI32.
181
] Retrieve data for TrueType font
* GetFontData [GDI32.
@
] Retrieve data for TrueType font
*
*
* RETURNS
* RETURNS
*
*
...
@@ -1629,7 +1757,7 @@ DWORD WINAPI GetFontData16(HDC16 hdc, DWORD dwTable, DWORD dwOffset,
...
@@ -1629,7 +1757,7 @@ DWORD WINAPI GetFontData16(HDC16 hdc, DWORD dwTable, DWORD dwOffset,
}
}
/*************************************************************************
/*************************************************************************
* GetCharacterPlacementA [GDI32.
160
]
* GetCharacterPlacementA [GDI32.
@
]
*
*
* NOTES:
* NOTES:
* the web browser control of ie4 calls this with dwFlags=0
* the web browser control of ie4 calls this with dwFlags=0
...
@@ -1679,7 +1807,7 @@ GetCharacterPlacementA(HDC hdc, LPCSTR lpString, INT uCount,
...
@@ -1679,7 +1807,7 @@ GetCharacterPlacementA(HDC hdc, LPCSTR lpString, INT uCount,
}
}
/*************************************************************************
/*************************************************************************
* GetCharacterPlacementW [GDI32.
161
]
* GetCharacterPlacementW [GDI32.
@
]
*/
*/
DWORD
WINAPI
DWORD
WINAPI
GetCharacterPlacementW
(
HDC
hdc
,
LPCWSTR
lpString
,
INT
uCount
,
GetCharacterPlacementW
(
HDC
hdc
,
LPCWSTR
lpString
,
INT
uCount
,
...
@@ -1692,7 +1820,7 @@ GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, INT uCount,
...
@@ -1692,7 +1820,7 @@ GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, INT uCount,
}
}
/*************************************************************************
/*************************************************************************
* GetCharABCWidthsFloatA [GDI32.
150
]
* GetCharABCWidthsFloatA [GDI32.
@
]
*/
*/
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
LPABCFLOAT
lpABCF
)
LPABCFLOAT
lpABCF
)
...
@@ -1702,7 +1830,7 @@ BOOL WINAPI GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar,
...
@@ -1702,7 +1830,7 @@ BOOL WINAPI GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar,
}
}
/*************************************************************************
/*************************************************************************
* GetCharABCWidthsFloatW [GDI32.
151
]
* GetCharABCWidthsFloatW [GDI32.
@
]
*/
*/
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
hdc
,
UINT
iFirstChar
,
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
LPABCFLOAT
lpABCF
)
UINT
iLastChar
,
LPABCFLOAT
lpABCF
)
...
@@ -1712,7 +1840,7 @@ BOOL WINAPI GetCharABCWidthsFloatW(HDC hdc, UINT iFirstChar,
...
@@ -1712,7 +1840,7 @@ BOOL WINAPI GetCharABCWidthsFloatW(HDC hdc, UINT iFirstChar,
}
}
/*************************************************************************
/*************************************************************************
* GetCharWidthFloatA [GDI32.
156
]
* GetCharWidthFloatA [GDI32.
@
]
*/
*/
BOOL
WINAPI
GetCharWidthFloatA
(
HDC
hdc
,
UINT
iFirstChar
,
BOOL
WINAPI
GetCharWidthFloatA
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
PFLOAT
pxBuffer
)
UINT
iLastChar
,
PFLOAT
pxBuffer
)
...
@@ -1722,7 +1850,7 @@ BOOL WINAPI GetCharWidthFloatA(HDC hdc, UINT iFirstChar,
...
@@ -1722,7 +1850,7 @@ BOOL WINAPI GetCharWidthFloatA(HDC hdc, UINT iFirstChar,
}
}
/*************************************************************************
/*************************************************************************
* GetCharWidthFloatW [GDI32.
157
]
* GetCharWidthFloatW [GDI32.
@
]
*/
*/
BOOL
WINAPI
GetCharWidthFloatW
(
HDC
hdc
,
UINT
iFirstChar
,
BOOL
WINAPI
GetCharWidthFloatW
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
PFLOAT
pxBuffer
)
UINT
iLastChar
,
PFLOAT
pxBuffer
)
...
@@ -1756,7 +1884,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
...
@@ -1756,7 +1884,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
/***********************************************************************
/***********************************************************************
* AddFontResourceA (GDI32.
2
)
* AddFontResourceA (GDI32.
@
)
*/
*/
INT
WINAPI
AddFontResourceA
(
LPCSTR
str
)
INT
WINAPI
AddFontResourceA
(
LPCSTR
str
)
{
{
...
@@ -1767,7 +1895,7 @@ INT WINAPI AddFontResourceA( LPCSTR str )
...
@@ -1767,7 +1895,7 @@ INT WINAPI AddFontResourceA( LPCSTR str )
/***********************************************************************
/***********************************************************************
* AddFontResourceW (GDI32.
4
)
* AddFontResourceW (GDI32.
@
)
*/
*/
INT
WINAPI
AddFontResourceW
(
LPCWSTR
str
)
INT
WINAPI
AddFontResourceW
(
LPCWSTR
str
)
{
{
...
@@ -1787,7 +1915,7 @@ BOOL16 WINAPI RemoveFontResource16( LPCSTR str )
...
@@ -1787,7 +1915,7 @@ BOOL16 WINAPI RemoveFontResource16( LPCSTR str )
/***********************************************************************
/***********************************************************************
* RemoveFontResourceA (GDI32.
284
)
* RemoveFontResourceA (GDI32.
@
)
*/
*/
BOOL
WINAPI
RemoveFontResourceA
(
LPCSTR
str
)
BOOL
WINAPI
RemoveFontResourceA
(
LPCSTR
str
)
{
{
...
@@ -1819,7 +1947,7 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
...
@@ -1819,7 +1947,7 @@ BOOL WINAPI RemoveFontResourceA( LPCSTR str )
/***********************************************************************
/***********************************************************************
* RemoveFontResourceW (GDI32.
286
)
* RemoveFontResourceW (GDI32.
@
)
*/
*/
BOOL
WINAPI
RemoveFontResourceW
(
LPCWSTR
str
)
BOOL
WINAPI
RemoveFontResourceW
(
LPCWSTR
str
)
{
{
...
...
objects/gdiobj.c
View file @
2aa85eed
...
@@ -96,61 +96,54 @@ static FONTOBJ OEMFixedFont =
...
@@ -96,61 +96,54 @@ static FONTOBJ OEMFixedFont =
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
OEM_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
OEM_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
""
}
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
{
'\0'
}
}
};
};
/* Filler to make the location counter dword aligned again. This is necessary
since (a) FONTOBJ is packed, (b) gcc places initialised variables in the code
segment, and (c) Solaris assembler is stupid. */
static
UINT16
align_OEMFixedFont
=
1
;
static
FONTOBJ
AnsiFixedFont
=
static
FONTOBJ
AnsiFixedFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
""
}
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
{
'\0'
}
}
};
};
static
UINT16
align_AnsiFixedFont
=
1
;
static
FONTOBJ
AnsiVarFont
=
static
FONTOBJ
AnsiVarFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
"MS Sans Serif"
}
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
{
'M'
,
'S'
,
' '
,
'S'
,
'a'
,
'n'
,
's'
,
' '
,
'S'
,
'e'
,
'r'
,
'i'
,
'f'
,
'\0'
}
}
};
};
static
UINT16
align_AnsiVarFont
=
1
;
static
FONTOBJ
SystemFont
=
static
FONTOBJ
SystemFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
{
0
,
FONT_MAGIC
,
1
},
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
"System"
}
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\0'
}
}
};
};
static
UINT16
align_SystemFont
=
1
;
static
FONTOBJ
DeviceDefaultFont
=
static
FONTOBJ
DeviceDefaultFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
""
}
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
{
'\0'
}
}
};
};
static
UINT16
align_DeviceDefaultFont
=
1
;
static
FONTOBJ
SystemFixedFont
=
static
FONTOBJ
SystemFixedFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
""
}
0
,
0
,
DEFAULT_QUALITY
,
FIXED_PITCH
|
FF_MODERN
,
{
'\0'
}
}
};
};
static
UINT16
align_SystemFixedFont
=
1
;
/* FIXME: Is this correct? */
/* FIXME: Is this correct? */
static
FONTOBJ
DefaultGuiFont
=
static
FONTOBJ
DefaultGuiFont
=
{
{
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
FONT_MAGIC
,
1
},
/* header */
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
{
0
,
0
,
0
,
0
,
FW_NORMAL
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
"MS Sans Serif"
}
0
,
0
,
DEFAULT_QUALITY
,
VARIABLE_PITCH
|
FF_SWISS
,
{
'M'
,
'S'
,
' '
,
'S'
,
'a'
,
'n'
,
's'
,
' '
,
'S'
,
'e'
,
'r'
,
'i'
,
'f'
,
'\0'
}
}
};
};
static
UINT16
align_DefaultGuiFont
=
1
;
static
GDIOBJHDR
*
StockObjects
[
NB_STOCK_OBJECTS
]
=
static
GDIOBJHDR
*
StockObjects
[
NB_STOCK_OBJECTS
]
=
...
@@ -329,15 +322,6 @@ BOOL GDI_Init(void)
...
@@ -329,15 +322,6 @@ BOOL GDI_Init(void)
if
((
instance
=
LoadLibrary16
(
"GDI.EXE"
))
<
32
)
return
FALSE
;
if
((
instance
=
LoadLibrary16
(
"GDI.EXE"
))
<
32
)
return
FALSE
;
GDI_HeapSel
=
GlobalHandleToSel16
(
instance
);
GDI_HeapSel
=
GlobalHandleToSel16
(
instance
);
/* Kill some warnings. */
(
void
)
align_OEMFixedFont
;
(
void
)
align_AnsiFixedFont
;
(
void
)
align_AnsiVarFont
;
(
void
)
align_SystemFont
;
(
void
)
align_DeviceDefaultFont
;
(
void
)
align_SystemFixedFont
;
(
void
)
align_DefaultGuiFont
;
/* TWEAK: Initialize font hints */
/* TWEAK: Initialize font hints */
ReadFontInformation
(
"OEMFixed"
,
&
OEMFixedFont
,
0
,
0
,
0
,
0
,
0
);
ReadFontInformation
(
"OEMFixed"
,
&
OEMFixedFont
,
0
,
0
,
0
,
0
,
0
);
ReadFontInformation
(
"AnsiFixed"
,
&
AnsiFixedFont
,
0
,
0
,
0
,
0
,
0
);
ReadFontInformation
(
"AnsiFixed"
,
&
AnsiFixedFont
,
0
,
0
,
0
,
0
,
0
);
...
@@ -551,7 +535,7 @@ void GDI_ReleaseObj( HGDIOBJ handle )
...
@@ -551,7 +535,7 @@ void GDI_ReleaseObj( HGDIOBJ handle )
/***********************************************************************
/***********************************************************************
* DeleteObject16 (GDI.6
9
)
* DeleteObject16 (GDI.6
05
)
*/
*/
BOOL16
WINAPI
DeleteObject16
(
HGDIOBJ16
obj
)
BOOL16
WINAPI
DeleteObject16
(
HGDIOBJ16
obj
)
{
{
...
@@ -560,7 +544,7 @@ BOOL16 WINAPI DeleteObject16( HGDIOBJ16 obj )
...
@@ -560,7 +544,7 @@ BOOL16 WINAPI DeleteObject16( HGDIOBJ16 obj )
/***********************************************************************
/***********************************************************************
* DeleteObject (GDI32.
70
)
* DeleteObject (GDI32.
@
)
*/
*/
BOOL
WINAPI
DeleteObject
(
HGDIOBJ
obj
)
BOOL
WINAPI
DeleteObject
(
HGDIOBJ
obj
)
{
{
...
@@ -619,7 +603,7 @@ HGDIOBJ16 WINAPI GetStockObject16( INT16 obj )
...
@@ -619,7 +603,7 @@ HGDIOBJ16 WINAPI GetStockObject16( INT16 obj )
/***********************************************************************
/***********************************************************************
* GetStockObject (GDI32.
220
)
* GetStockObject (GDI32.
@
)
*/
*/
HGDIOBJ
WINAPI
GetStockObject
(
INT
obj
)
HGDIOBJ
WINAPI
GetStockObject
(
INT
obj
)
{
{
...
@@ -675,7 +659,7 @@ INT16 WINAPI GetObject16( HANDLE16 handle, INT16 count, LPVOID buffer )
...
@@ -675,7 +659,7 @@ INT16 WINAPI GetObject16( HANDLE16 handle, INT16 count, LPVOID buffer )
/***********************************************************************
/***********************************************************************
* GetObjectA (GDI32.
204
)
* GetObjectA (GDI32.
@
)
*/
*/
INT
WINAPI
GetObjectA
(
HANDLE
handle
,
INT
count
,
LPVOID
buffer
)
INT
WINAPI
GetObjectA
(
HANDLE
handle
,
INT
count
,
LPVOID
buffer
)
{
{
...
@@ -731,7 +715,7 @@ INT WINAPI GetObjectA( HANDLE handle, INT count, LPVOID buffer )
...
@@ -731,7 +715,7 @@ INT WINAPI GetObjectA( HANDLE handle, INT count, LPVOID buffer )
}
}
/***********************************************************************
/***********************************************************************
* GetObjectW (GDI32.
206
)
* GetObjectW (GDI32.
@
)
*/
*/
INT
WINAPI
GetObjectW
(
HANDLE
handle
,
INT
count
,
LPVOID
buffer
)
INT
WINAPI
GetObjectW
(
HANDLE
handle
,
INT
count
,
LPVOID
buffer
)
{
{
...
@@ -775,7 +759,7 @@ INT WINAPI GetObjectW( HANDLE handle, INT count, LPVOID buffer )
...
@@ -775,7 +759,7 @@ INT WINAPI GetObjectW( HANDLE handle, INT count, LPVOID buffer )
}
}
/***********************************************************************
/***********************************************************************
* GetObjectType (GDI32.
205
)
* GetObjectType (GDI32.
@
)
*/
*/
DWORD
WINAPI
GetObjectType
(
HANDLE
handle
)
DWORD
WINAPI
GetObjectType
(
HANDLE
handle
)
{
{
...
@@ -832,7 +816,7 @@ DWORD WINAPI GetObjectType( HANDLE handle )
...
@@ -832,7 +816,7 @@ DWORD WINAPI GetObjectType( HANDLE handle )
}
}
/***********************************************************************
/***********************************************************************
* GetCurrentObject (GDI32.
166
)
* GetCurrentObject (GDI32.
@
)
*/
*/
HANDLE
WINAPI
GetCurrentObject
(
HDC
hdc
,
UINT
type
)
HANDLE
WINAPI
GetCurrentObject
(
HDC
hdc
,
UINT
type
)
{
{
...
@@ -868,7 +852,7 @@ HGDIOBJ16 WINAPI SelectObject16( HDC16 hdc, HGDIOBJ16 handle )
...
@@ -868,7 +852,7 @@ HGDIOBJ16 WINAPI SelectObject16( HDC16 hdc, HGDIOBJ16 handle )
/***********************************************************************
/***********************************************************************
* SelectObject (GDI32.
299
)
* SelectObject (GDI32.
@
)
*/
*/
HGDIOBJ
WINAPI
SelectObject
(
HDC
hdc
,
HGDIOBJ
handle
)
HGDIOBJ
WINAPI
SelectObject
(
HDC
hdc
,
HGDIOBJ
handle
)
{
{
...
@@ -893,7 +877,7 @@ BOOL16 WINAPI UnrealizeObject16( HGDIOBJ16 obj )
...
@@ -893,7 +877,7 @@ BOOL16 WINAPI UnrealizeObject16( HGDIOBJ16 obj )
/***********************************************************************
/***********************************************************************
* UnrealizeObject (GDI32.
358
)
* UnrealizeObject (GDI32.
@
)
*/
*/
BOOL
WINAPI
UnrealizeObject
(
HGDIOBJ
obj
)
BOOL
WINAPI
UnrealizeObject
(
HGDIOBJ
obj
)
{
{
...
@@ -1002,7 +986,7 @@ INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
...
@@ -1002,7 +986,7 @@ INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
/***********************************************************************
/***********************************************************************
* EnumObjects (GDI32.
89
)
* EnumObjects (GDI32.
@
)
*/
*/
INT
WINAPI
EnumObjects
(
HDC
hdc
,
INT
nObjType
,
INT
WINAPI
EnumObjects
(
HDC
hdc
,
INT
nObjType
,
GOBJENUMPROC
lpEnumFunc
,
LPARAM
lParam
)
GOBJENUMPROC
lpEnumFunc
,
LPARAM
lParam
)
...
@@ -1106,7 +1090,7 @@ void WINAPI SetObjectOwner16( HGDIOBJ16 handle, HANDLE16 owner )
...
@@ -1106,7 +1090,7 @@ void WINAPI SetObjectOwner16( HGDIOBJ16 handle, HANDLE16 owner )
/***********************************************************************
/***********************************************************************
* SetObjectOwner (GDI32.
386
)
* SetObjectOwner (GDI32.
@
)
*/
*/
void
WINAPI
SetObjectOwner
(
HGDIOBJ
handle
,
HANDLE
owner
)
void
WINAPI
SetObjectOwner
(
HGDIOBJ
handle
,
HANDLE
owner
)
{
{
...
@@ -1138,7 +1122,7 @@ void WINAPI MakeObjectPrivate16( HGDIOBJ16 handle, BOOL16 private )
...
@@ -1138,7 +1122,7 @@ void WINAPI MakeObjectPrivate16( HGDIOBJ16 handle, BOOL16 private )
/***********************************************************************
/***********************************************************************
* GdiFlush (GDI32.
128
)
* GdiFlush (GDI32.
@
)
*/
*/
BOOL
WINAPI
GdiFlush
(
void
)
BOOL
WINAPI
GdiFlush
(
void
)
{
{
...
@@ -1147,7 +1131,7 @@ BOOL WINAPI GdiFlush(void)
...
@@ -1147,7 +1131,7 @@ BOOL WINAPI GdiFlush(void)
/***********************************************************************
/***********************************************************************
* GdiGetBatchLimit (GDI32.
129
)
* GdiGetBatchLimit (GDI32.
@
)
*/
*/
DWORD
WINAPI
GdiGetBatchLimit
(
void
)
DWORD
WINAPI
GdiGetBatchLimit
(
void
)
{
{
...
@@ -1156,7 +1140,7 @@ DWORD WINAPI GdiGetBatchLimit(void)
...
@@ -1156,7 +1140,7 @@ DWORD WINAPI GdiGetBatchLimit(void)
/***********************************************************************
/***********************************************************************
* GdiSetBatchLimit (GDI32.
139
)
* GdiSetBatchLimit (GDI32.
@
)
*/
*/
DWORD
WINAPI
GdiSetBatchLimit
(
DWORD
limit
)
DWORD
WINAPI
GdiSetBatchLimit
(
DWORD
limit
)
{
{
...
@@ -1240,7 +1224,7 @@ INT16 WINAPI MulDiv16(
...
@@ -1240,7 +1224,7 @@ INT16 WINAPI MulDiv16(
/*******************************************************************
/*******************************************************************
* GetColorAdjustment [GDI32.
164
]
* GetColorAdjustment [GDI32.
@
]
*
*
*
*
*/
*/
...
@@ -1251,7 +1235,7 @@ BOOL WINAPI GetColorAdjustment(HDC hdc, LPCOLORADJUSTMENT lpca)
...
@@ -1251,7 +1235,7 @@ BOOL WINAPI GetColorAdjustment(HDC hdc, LPCOLORADJUSTMENT lpca)
}
}
/*******************************************************************
/*******************************************************************
* GetMiterLimit [GDI32.
201
]
* GetMiterLimit [GDI32.
@
]
*
*
*
*
*/
*/
...
@@ -1262,7 +1246,7 @@ BOOL WINAPI GetMiterLimit(HDC hdc, PFLOAT peLimit)
...
@@ -1262,7 +1246,7 @@ BOOL WINAPI GetMiterLimit(HDC hdc, PFLOAT peLimit)
}
}
/*******************************************************************
/*******************************************************************
* SetMiterLimit [GDI32.
325
]
* SetMiterLimit [GDI32.
@
]
*
*
*
*
*/
*/
...
@@ -1273,7 +1257,7 @@ BOOL WINAPI SetMiterLimit(HDC hdc, FLOAT eNewLimit, PFLOAT peOldLimit)
...
@@ -1273,7 +1257,7 @@ BOOL WINAPI SetMiterLimit(HDC hdc, FLOAT eNewLimit, PFLOAT peOldLimit)
}
}
/*******************************************************************
/*******************************************************************
* GdiComment [GDI32.
109
]
* GdiComment [GDI32.
@
]
*
*
*
*
*/
*/
...
@@ -1283,7 +1267,7 @@ BOOL WINAPI GdiComment(HDC hdc, UINT cbSize, const BYTE *lpData)
...
@@ -1283,7 +1267,7 @@ BOOL WINAPI GdiComment(HDC hdc, UINT cbSize, const BYTE *lpData)
return
0
;
return
0
;
}
}
/*******************************************************************
/*******************************************************************
* SetColorAdjustment [GDI32.
309
]
* SetColorAdjustment [GDI32.
@
]
*
*
*
*
*/
*/
...
...
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