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
11ab927a
Commit
11ab927a
authored
May 05, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Store font related strings in unicode.
parent
8cfa8c15
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
197 additions
and
180 deletions
+197
-180
afm.c
dlls/wineps.drv/afm.c
+7
-7
afm2c.c
dlls/wineps.drv/afm2c.c
+4
-4
builtin.c
dlls/wineps.drv/builtin.c
+17
-21
AvantGarde_Book.c
dlls/wineps.drv/data/AvantGarde_Book.c
+3
-3
AvantGarde_BookOblique.c
dlls/wineps.drv/data/AvantGarde_BookOblique.c
+3
-3
AvantGarde_Demi.c
dlls/wineps.drv/data/AvantGarde_Demi.c
+3
-3
AvantGarde_DemiOblique.c
dlls/wineps.drv/data/AvantGarde_DemiOblique.c
+3
-3
Bookman_Demi.c
dlls/wineps.drv/data/Bookman_Demi.c
+3
-3
Bookman_DemiItalic.c
dlls/wineps.drv/data/Bookman_DemiItalic.c
+3
-3
Bookman_Light.c
dlls/wineps.drv/data/Bookman_Light.c
+3
-3
Bookman_LightItalic.c
dlls/wineps.drv/data/Bookman_LightItalic.c
+3
-3
Courier.c
dlls/wineps.drv/data/Courier.c
+3
-3
Courier_Bold.c
dlls/wineps.drv/data/Courier_Bold.c
+3
-3
Courier_BoldOblique.c
dlls/wineps.drv/data/Courier_BoldOblique.c
+3
-3
Courier_Oblique.c
dlls/wineps.drv/data/Courier_Oblique.c
+3
-3
Helvetica.c
dlls/wineps.drv/data/Helvetica.c
+3
-3
Helvetica_Bold.c
dlls/wineps.drv/data/Helvetica_Bold.c
+3
-3
Helvetica_BoldOblique.c
dlls/wineps.drv/data/Helvetica_BoldOblique.c
+3
-3
Helvetica_Narrow.c
dlls/wineps.drv/data/Helvetica_Narrow.c
+3
-3
Helvetica_Narrow_Bold.c
dlls/wineps.drv/data/Helvetica_Narrow_Bold.c
+3
-3
Helvetica_Narrow_BoldOblique.c
dlls/wineps.drv/data/Helvetica_Narrow_BoldOblique.c
+3
-3
Helvetica_Narrow_Oblique.c
dlls/wineps.drv/data/Helvetica_Narrow_Oblique.c
+3
-3
Helvetica_Oblique.c
dlls/wineps.drv/data/Helvetica_Oblique.c
+3
-3
NewCenturySchlbk_Bold.c
dlls/wineps.drv/data/NewCenturySchlbk_Bold.c
+3
-3
NewCenturySchlbk_BoldItalic.c
dlls/wineps.drv/data/NewCenturySchlbk_BoldItalic.c
+3
-3
NewCenturySchlbk_Italic.c
dlls/wineps.drv/data/NewCenturySchlbk_Italic.c
+3
-3
NewCenturySchlbk_Roman.c
dlls/wineps.drv/data/NewCenturySchlbk_Roman.c
+3
-3
Palatino_Bold.c
dlls/wineps.drv/data/Palatino_Bold.c
+3
-3
Palatino_BoldItalic.c
dlls/wineps.drv/data/Palatino_BoldItalic.c
+3
-3
Palatino_Italic.c
dlls/wineps.drv/data/Palatino_Italic.c
+3
-3
Palatino_Roman.c
dlls/wineps.drv/data/Palatino_Roman.c
+3
-3
Symbol.c
dlls/wineps.drv/data/Symbol.c
+3
-3
Times_Bold.c
dlls/wineps.drv/data/Times_Bold.c
+3
-3
Times_BoldItalic.c
dlls/wineps.drv/data/Times_BoldItalic.c
+3
-3
Times_Italic.c
dlls/wineps.drv/data/Times_Italic.c
+3
-3
Times_Roman.c
dlls/wineps.drv/data/Times_Roman.c
+3
-3
ZapfChancery_MediumItalic.c
dlls/wineps.drv/data/ZapfChancery_MediumItalic.c
+3
-3
ZapfDingbats.c
dlls/wineps.drv/data/ZapfDingbats.c
+3
-3
font.c
dlls/wineps.drv/font.c
+16
-22
init.c
dlls/wineps.drv/init.c
+7
-7
ppd.c
dlls/wineps.drv/ppd.c
+1
-1
psdrv.h
dlls/wineps.drv/psdrv.h
+7
-7
type1afm.c
dlls/wineps.drv/type1afm.c
+33
-6
No files found.
dlls/wineps.drv/afm.c
View file @
11ab927a
...
...
@@ -99,7 +99,7 @@ BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm, BOOL *p_added)
newafmle
->
afm
=
afm
;
while
(
family
)
{
if
(
!
str
cmp
(
family
->
FamilyName
,
afm
->
FamilyName
))
if
(
!
wcs
cmp
(
family
->
FamilyName
,
afm
->
FamilyName
))
break
;
insert
=
&
(
family
->
next
);
family
=
family
->
next
;
...
...
@@ -113,12 +113,12 @@ BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm, BOOL *p_added)
return
FALSE
;
}
*
insert
=
family
;
if
(
!
(
family
->
FamilyName
=
HeapAlloc
(
PSDRV_Heap
,
0
,
strlen
(
afm
->
FamilyName
)
+
1
)))
{
if
(
!
(
family
->
FamilyName
=
HeapAlloc
(
PSDRV_Heap
,
0
,
(
wcslen
(
afm
->
FamilyName
)
+
1
)
*
sizeof
(
WCHAR
)
)))
{
HeapFree
(
PSDRV_Heap
,
0
,
family
);
HeapFree
(
PSDRV_Heap
,
0
,
newafmle
);
return
FALSE
;
}
str
cpy
(
family
->
FamilyName
,
afm
->
FamilyName
);
wcs
cpy
(
family
->
FamilyName
,
afm
->
FamilyName
);
family
->
afmlist
=
newafmle
;
*
p_added
=
TRUE
;
return
TRUE
;
...
...
@@ -158,16 +158,16 @@ static void PSDRV_DumpFontList(void)
AFMLISTENTRY
*
afmle
;
for
(
family
=
PSDRV_AFMFontList
;
family
;
family
=
family
->
next
)
{
TRACE
(
"Family
'%s'
\n
"
,
family
->
FamilyName
);
TRACE
(
"Family
%s
\n
"
,
debugstr_w
(
family
->
FamilyName
)
);
for
(
afmle
=
family
->
afmlist
;
afmle
;
afmle
=
afmle
->
next
)
{
#if 0
INT i;
#endif
TRACE
(
"
\t
FontName '%s' (%i glyphs) - '%s'
encoding:
\n
"
,
afmle
->
afm
->
FontName
,
afmle
->
afm
->
NumofMetrics
,
afmle
->
afm
->
EncodingScheme
);
TRACE
(
"
\t
FontName '%s' (%i glyphs) - %s
encoding:
\n
"
,
afmle
->
afm
->
FontName
,
afmle
->
afm
->
NumofMetrics
,
debugstr_w
(
afmle
->
afm
->
EncodingScheme
)
);
/* Uncomment to regenerate font data; see afm2c.c */
...
...
dlls/wineps.drv/afm2c.c
View file @
11ab927a
...
...
@@ -81,7 +81,7 @@ static void writeHeader(FILE *of, const AFM *afm, const char *buffer)
fputc
(
'*'
,
of
);
fprintf
(
of
,
"
\n
"
" *
\n
"
" *
\t
Font metric data for %
s
\n
"
" *
\t
Font metric data for %
S
\n
"
" *
\n
"
" *
\t
Copyright 2001 Ian Pilcher
\n
"
" *
\n
"
...
...
@@ -121,11 +121,11 @@ static void writeAFM(FILE *of, const AFM *afm, const char *buffer)
fprintf
(
of
,
"const AFM PSDRV_%s =
\n
{
\n
"
,
buffer
);
cursorto
(
of
,
44
,
fprintf
(
of
,
"
\"
%s
\"
,"
,
afm
->
FontName
));
fputs
(
"/* FontName */
\n
"
,
of
);
cursorto
(
of
,
44
,
fprintf
(
of
,
"
\"
%s
\"
,"
,
afm
->
FullName
));
cursorto
(
of
,
44
,
fprintf
(
of
,
"
L
\"
%S
\"
,"
,
afm
->
FullName
));
fputs
(
"/* FullName */
\n
"
,
of
);
cursorto
(
of
,
44
,
fprintf
(
of
,
"
\"
%s
\"
,"
,
afm
->
FamilyName
));
cursorto
(
of
,
44
,
fprintf
(
of
,
"
L
\"
%S
\"
,"
,
afm
->
FamilyName
));
fputs
(
"/* FamilyName */
\n
"
,
of
);
cursorto
(
of
,
44
,
fprintf
(
of
,
"
\"
%s
\"
,"
,
afm
->
EncodingScheme
));
cursorto
(
of
,
44
,
fprintf
(
of
,
"
L
\"
%S
\"
,"
,
afm
->
EncodingScheme
));
fputs
(
"/* EncodingScheme */
\n
"
,
of
);
cursorto
(
of
,
44
,
fprintf
(
of
,
" %s,"
,
(
afm
->
Weight
>
550
)
?
"FW_BOLD"
:
"FW_NORMAL"
));
...
...
dlls/wineps.drv/builtin.c
View file @
11ab927a
...
...
@@ -157,7 +157,7 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font,
*
*/
BOOL
PSDRV_SelectBuiltinFont
(
PHYSDEV
dev
,
HFONT
hfont
,
LOGFONTW
*
plf
,
LPSTR
FaceN
ame
)
LOGFONTW
*
plf
,
WCHAR
*
face_n
ame
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
AFMLISTENTRY
*
afmle
;
...
...
@@ -165,27 +165,27 @@ BOOL PSDRV_SelectBuiltinFont(PHYSDEV dev, HFONT hfont,
BOOL
bd
=
FALSE
,
it
=
FALSE
;
LONG
height
;
TRACE
(
"Trying to find facename
'%s'
\n
"
,
FaceName
);
TRACE
(
"Trying to find facename
%s
\n
"
,
debugstr_w
(
face_name
)
);
/* Look for a matching font family */
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
if
(
!
stricmp
(
FaceN
ame
,
family
->
FamilyName
))
if
(
!
wcsicmp
(
face_n
ame
,
family
->
FamilyName
))
break
;
}
if
(
!
family
)
{
/* Fallback for Window's font families to common PostScript families */
if
(
!
strcmp
(
FaceName
,
"Arial"
))
strcpy
(
FaceName
,
"Helvetica"
);
else
if
(
!
strcmp
(
FaceName
,
"System"
))
strcpy
(
FaceName
,
"Helvetica"
);
else
if
(
!
strcmp
(
FaceName
,
"Times New Roman"
))
strcpy
(
FaceName
,
"Times"
);
else
if
(
!
strcmp
(
FaceName
,
"Courier New"
))
strcpy
(
FaceName
,
"Courier"
);
if
(
!
wcscmp
(
face_name
,
L
"Arial"
))
wcscpy
(
face_name
,
L
"Helvetica"
);
else
if
(
!
wcscmp
(
face_name
,
L
"System"
))
wcscpy
(
face_name
,
L
"Helvetica"
);
else
if
(
!
wcscmp
(
face_name
,
L
"Times New Roman"
))
wcscpy
(
face_name
,
L
"Times"
);
else
if
(
!
wcscmp
(
face_name
,
L
"Courier New"
))
wcscpy
(
face_name
,
L
"Courier"
);
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
if
(
!
strcmp
(
FaceN
ame
,
family
->
FamilyName
))
if
(
!
wcscmp
(
face_n
ame
,
family
->
FamilyName
))
break
;
}
}
...
...
@@ -193,7 +193,7 @@ BOOL PSDRV_SelectBuiltinFont(PHYSDEV dev, HFONT hfont,
if
(
!
family
)
family
=
physDev
->
pi
->
Fonts
;
TRACE
(
"Got family
'%s'
\n
"
,
family
->
FamilyName
);
TRACE
(
"Got family
%s
\n
"
,
debugstr_w
(
family
->
FamilyName
)
);
if
(
plf
->
lfItalic
)
it
=
TRUE
;
...
...
@@ -401,8 +401,7 @@ static UINT PSDRV_GetFontMetric(HDC hdc, const AFM *afm,
lf
->
lfPitchAndFamily
=
(
afm
->
IsFixedPitch
)
?
FIXED_PITCH
:
VARIABLE_PITCH
;
MultiByteToWideChar
(
CP_ACP
,
0
,
afm
->
FamilyName
,
-
1
,
lf
->
lfFaceName
,
LF_FACESIZE
);
lstrcpynW
(
lf
->
lfFaceName
,
afm
->
FamilyName
,
LF_FACESIZE
);
return
DEVICE_FONTTYPE
;
}
...
...
@@ -419,18 +418,15 @@ BOOL CDECL PSDRV_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LPA
BOOL
ret
;
AFMLISTENTRY
*
afmle
;
FONTFAMILY
*
family
;
char
FaceName
[
LF_FACESIZE
];
ret
=
next
->
funcs
->
pEnumFonts
(
next
,
plf
,
proc
,
lp
);
if
(
!
ret
)
return
FALSE
;
if
(
plf
&&
plf
->
lfFaceName
[
0
]
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
plf
->
lfFaceName
,
-
1
,
FaceName
,
sizeof
(
FaceName
),
NULL
,
NULL
);
TRACE
(
"lfFaceName = '%s'
\n
"
,
FaceName
);
TRACE
(
"lfFaceName = %s
\n
"
,
debugstr_w
(
plf
->
lfFaceName
));
for
(
family
=
physDev
->
pi
->
Fonts
;
family
;
family
=
family
->
next
)
{
if
(
!
strncmp
(
FaceName
,
family
->
FamilyName
,
str
len
(
family
->
FamilyName
)))
if
(
!
wcsncmp
(
plf
->
lf
FaceName
,
family
->
FamilyName
,
wcs
len
(
family
->
FamilyName
)))
break
;
}
if
(
family
)
{
...
...
dlls/wineps.drv/data/AvantGarde_Book.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_AvantGarde_Book
=
{
"AvantGarde-Book"
,
/* FontName */
"ITC Avant Garde Gothic Book"
,
/* FullName */
"ITC Avant Garde Gothic"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"ITC Avant Garde Gothic Book"
,
/* FullName */
L
"ITC Avant Garde Gothic"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/AvantGarde_BookOblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_AvantGarde_BookOblique
=
{
"AvantGarde-BookOblique"
,
/* FontName */
"ITC Avant Garde Gothic Book Oblique"
,
/* FullName */
"ITC Avant Garde Gothic"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"ITC Avant Garde Gothic Book Oblique"
,
/* FullName */
L
"ITC Avant Garde Gothic"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
10
.
5
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/AvantGarde_Demi.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_AvantGarde_Demi
=
{
"AvantGarde-Demi"
,
/* FontName */
"ITC Avant Garde Gothic Demi"
,
/* FullName */
"ITC Avant Garde Gothic"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"ITC Avant Garde Gothic Demi"
,
/* FullName */
L
"ITC Avant Garde Gothic"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/AvantGarde_DemiOblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_AvantGarde_DemiOblique
=
{
"AvantGarde-DemiOblique"
,
/* FontName */
"ITC Avant Garde Gothic Demi Oblique"
,
/* FullName */
"ITC Avant Garde Gothic"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"ITC Avant Garde Gothic Demi Oblique"
,
/* FullName */
L
"ITC Avant Garde Gothic"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
10
.
5
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Bookman_Demi.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Bookman_Demi
=
{
"Bookman-Demi"
,
/* FontName */
"ITC Bookman Demi"
,
/* FullName */
"ITC Bookman"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"ITC Bookman Demi"
,
/* FullName */
L
"ITC Bookman"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Bookman_DemiItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Bookman_DemiItalic
=
{
"Bookman-DemiItalic"
,
/* FontName */
"ITC Bookman Demi Italic"
,
/* FullName */
"ITC Bookman"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"ITC Bookman Demi Italic"
,
/* FullName */
L
"ITC Bookman"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
10
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Bookman_Light.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Bookman_Light
=
{
"Bookman-Light"
,
/* FontName */
"ITC Bookman Light"
,
/* FullName */
"ITC Bookman"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"ITC Bookman Light"
,
/* FullName */
L
"ITC Bookman"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Bookman_LightItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Bookman_LightItalic
=
{
"Bookman-LightItalic"
,
/* FontName */
"ITC Bookman Light Italic"
,
/* FullName */
"ITC Bookman"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"ITC Bookman Light Italic"
,
/* FullName */
L
"ITC Bookman"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
10
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Courier.c
View file @
11ab927a
...
...
@@ -272,9 +272,9 @@ static const AFMMETRICS metrics[243] =
const
AFM
PSDRV_Courier
=
{
"Courier"
,
/* FontName */
"Courier"
,
/* FullName */
"Courier"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Courier"
,
/* FullName */
L
"Courier"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
TRUE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Courier_Bold.c
View file @
11ab927a
...
...
@@ -272,9 +272,9 @@ static const AFMMETRICS metrics[243] =
const
AFM
PSDRV_Courier_Bold
=
{
"Courier-Bold"
,
/* FontName */
"Courier Bold"
,
/* FullName */
"Courier"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Courier Bold"
,
/* FullName */
L
"Courier"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
TRUE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Courier_BoldOblique.c
View file @
11ab927a
...
...
@@ -272,9 +272,9 @@ static const AFMMETRICS metrics[243] =
const
AFM
PSDRV_Courier_BoldOblique
=
{
"Courier-BoldOblique"
,
/* FontName */
"Courier Bold Oblique"
,
/* FullName */
"Courier"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Courier Bold Oblique"
,
/* FullName */
L
"Courier"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
12
,
/* ItalicAngle */
TRUE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Courier_Oblique.c
View file @
11ab927a
...
...
@@ -272,9 +272,9 @@ static const AFMMETRICS metrics[243] =
const
AFM
PSDRV_Courier_Oblique
=
{
"Courier-Oblique"
,
/* FontName */
"Courier Oblique"
,
/* FullName */
"Courier"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Courier Oblique"
,
/* FullName */
L
"Courier"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
12
,
/* ItalicAngle */
TRUE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica
=
{
"Helvetica"
,
/* FontName */
"Helvetica"
,
/* FullName */
"Helvetica"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica"
,
/* FullName */
L
"Helvetica"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Bold.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Bold
=
{
"Helvetica-Bold"
,
/* FontName */
"Helvetica Bold"
,
/* FullName */
"Helvetica"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica Bold"
,
/* FullName */
L
"Helvetica"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_BoldOblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_BoldOblique
=
{
"Helvetica-BoldOblique"
,
/* FontName */
"Helvetica Bold Oblique"
,
/* FullName */
"Helvetica"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica Bold Oblique"
,
/* FullName */
L
"Helvetica"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
12
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Narrow.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Narrow
=
{
"Helvetica-Narrow"
,
/* FontName */
"Helvetica Narrow"
,
/* FullName */
"Helvetica Narrow"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"Helvetica Narrow"
,
/* FullName */
L"Helvetica Narrow"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Narrow_Bold.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Narrow_Bold
=
{
"Helvetica-Narrow-Bold"
,
/* FontName */
"Helvetica Narrow Bold"
,
/* FullName */
"Helvetica Narrow"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica Narrow Bold"
,
/* FullName */
L"Helvetica Narrow"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Narrow_BoldOblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Narrow_BoldOblique
=
{
"Helvetica-Narrow-BoldOblique"
,
/* FontName */
"Helvetica Narrow Bold Oblique"
,
/* FullName */
"Helvetica Narrow"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica Narrow Bold Oblique"
,
/* FullName */
L"Helvetica Narrow"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
12
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Narrow_Oblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Narrow_Oblique
=
{
"Helvetica-Narrow-Oblique"
,
/* FontName */
"Helvetica Narrow Oblique"
,
/* FullName */
"Helvetica Narrow"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L"Helvetica Narrow Oblique"
,
/* FullName */
L"Helvetica Narrow"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
12
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Helvetica_Oblique.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Helvetica_Oblique
=
{
"Helvetica-Oblique"
,
/* FontName */
"Helvetica Oblique"
,
/* FullName */
"Helvetica"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Helvetica Oblique"
,
/* FullName */
L
"Helvetica"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
12
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/NewCenturySchlbk_Bold.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_NewCenturySchlbk_Bold
=
{
"NewCenturySchlbk-Bold"
,
/* FontName */
"New Century Schoolbook Bold"
,
/* FullName */
"New Century Schoolbook"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"New Century Schoolbook Bold"
,
/* FullName */
L
"New Century Schoolbook"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/NewCenturySchlbk_BoldItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_NewCenturySchlbk_BoldItalic
=
{
"NewCenturySchlbk-BoldItalic"
,
/* FontName */
"New Century Schoolbook Bold Italic"
,
/* FullName */
"New Century Schoolbook"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"New Century Schoolbook Bold Italic"
,
/* FullName */
L
"New Century Schoolbook"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
16
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/NewCenturySchlbk_Italic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_NewCenturySchlbk_Italic
=
{
"NewCenturySchlbk-Italic"
,
/* FontName */
"New Century Schoolbook Italic"
,
/* FullName */
"New Century Schoolbook"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"New Century Schoolbook Italic"
,
/* FullName */
L
"New Century Schoolbook"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
16
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/NewCenturySchlbk_Roman.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_NewCenturySchlbk_Roman
=
{
"NewCenturySchlbk-Roman"
,
/* FontName */
"New Century Schoolbook Roman"
,
/* FullName */
"New Century Schoolbook"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"New Century Schoolbook Roman"
,
/* FullName */
L
"New Century Schoolbook"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Palatino_Bold.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Palatino_Bold
=
{
"Palatino-Bold"
,
/* FontName */
"Palatino Bold"
,
/* FullName */
"Palatino"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Palatino Bold"
,
/* FullName */
L"Palatino"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Palatino_BoldItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Palatino_BoldItalic
=
{
"Palatino-BoldItalic"
,
/* FontName */
"Palatino Bold Italic"
,
/* FullName */
"Palatino"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Palatino Bold Italic"
,
/* FullName */
L"Palatino"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
10
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Palatino_Italic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Palatino_Italic
=
{
"Palatino-Italic"
,
/* FontName */
"Palatino Italic"
,
/* FullName */
"Palatino"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Palatino Italic"
,
/* FullName */
L"Palatino"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
10
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Palatino_Roman.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Palatino_Roman
=
{
"Palatino-Roman"
,
/* FontName */
"Palatino Roman"
,
/* FullName */
"Palatino"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Palatino Roman"
,
/* FullName */
L"Palatino"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Symbol.c
View file @
11ab927a
...
...
@@ -217,9 +217,9 @@ static const AFMMETRICS metrics[188] =
const
AFM
PSDRV_Symbol
=
{
"Symbol"
,
/* FontName */
"Symbol"
,
/* FullName */
"Symbol"
,
/* FamilyName */
"FontSpecific"
,
/* EncodingScheme */
L
"Symbol"
,
/* FullName */
L
"Symbol"
,
/* FamilyName */
L
"FontSpecific"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Times_Bold.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Times_Bold
=
{
"Times-Bold"
,
/* FontName */
"Times Bold"
,
/* FullName */
"Times"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Times Bold"
,
/* FullName */
L
"Times"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Times_BoldItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Times_BoldItalic
=
{
"Times-BoldItalic"
,
/* FontName */
"Times Bold Italic"
,
/* FullName */
"Times"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Times Bold Italic"
,
/* FullName */
L
"Times"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_BOLD
,
/* Weight */
-
15
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Times_Italic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Times_Italic
=
{
"Times-Italic"
,
/* FontName */
"Times Italic"
,
/* FullName */
"Times"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Times Italic"
,
/* FullName */
L
"Times"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
15
.
5
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/Times_Roman.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_Times_Roman
=
{
"Times-Roman"
,
/* FontName */
"Times Roman"
,
/* FullName */
"Times"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"Times Roman"
,
/* FullName */
L
"Times"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/ZapfChancery_MediumItalic.c
View file @
11ab927a
...
...
@@ -257,9 +257,9 @@ static const AFMMETRICS metrics[228] =
const
AFM
PSDRV_ZapfChancery_MediumItalic
=
{
"ZapfChancery-MediumItalic"
,
/* FontName */
"ITC Zapf Chancery Medium Italic"
,
/* FullName */
"ITC Zapf Chancery"
,
/* FamilyName */
"AdobeStandardEncoding"
,
/* EncodingScheme */
L
"ITC Zapf Chancery Medium Italic"
,
/* FullName */
L
"ITC Zapf Chancery"
,
/* FamilyName */
L
"AdobeStandardEncoding"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
-
14
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/data/ZapfDingbats.c
View file @
11ab927a
...
...
@@ -217,9 +217,9 @@ static const AFMMETRICS metrics[188] =
const
AFM
PSDRV_ZapfDingbats
=
{
"ZapfDingbats"
,
/* FontName */
"ITC Zapf Dingbats"
,
/* FullName */
"ITC Zapf Dingbats"
,
/* FamilyName */
"FontSpecific"
,
/* EncodingScheme */
L
"ITC Zapf Dingbats"
,
/* FullName */
L
"ITC Zapf Dingbats"
,
/* FamilyName */
L
"FontSpecific"
,
/* EncodingScheme */
FW_NORMAL
,
/* Weight */
0
,
/* ItalicAngle */
FALSE
,
/* IsFixedPitch */
...
...
dlls/wineps.drv/font.c
View file @
11ab927a
...
...
@@ -44,7 +44,6 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
HFONT
ret
;
LOGFONTW
lf
;
BOOL
subst
=
FALSE
;
char
FaceName
[
LF_FACESIZE
];
if
(
!
GetObjectW
(
hfont
,
sizeof
(
lf
),
&
lf
))
return
0
;
...
...
@@ -54,36 +53,33 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
debugstr_w
(
lf
.
lfFaceName
),
lf
.
lfHeight
,
lf
.
lfItalic
,
lf
.
lfWeight
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lf
.
lfFaceName
,
-
1
,
FaceName
,
sizeof
(
FaceName
),
NULL
,
NULL
);
if
(
FaceName
[
0
]
==
'\0'
)
{
if
(
lf
.
lfFaceName
[
0
]
==
'\0'
)
{
switch
(
lf
.
lfPitchAndFamily
&
0xf0
)
{
case
FF_DONTCARE
:
break
;
case
FF_ROMAN
:
case
FF_SCRIPT
:
strcpy
(
FaceName
,
"Times"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Times"
);
break
;
case
FF_SWISS
:
strcpy
(
FaceName
,
"Helvetica"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Helvetica"
);
break
;
case
FF_MODERN
:
strcpy
(
FaceName
,
"Courier"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Courier"
);
break
;
case
FF_DECORATIVE
:
strcpy
(
FaceName
,
"Symbol"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Symbol"
);
break
;
}
}
if
(
FaceName
[
0
]
==
'\0'
)
{
if
(
lf
.
lf
FaceName
[
0
]
==
'\0'
)
{
switch
(
lf
.
lfPitchAndFamily
&
0x0f
)
{
case
VARIABLE_PITCH
:
strcpy
(
FaceName
,
"Times"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Times"
);
break
;
default:
strcpy
(
FaceName
,
"Courier"
);
wcscpy
(
lf
.
lfFaceName
,
L
"Courier"
);
break
;
}
}
...
...
@@ -94,21 +90,19 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
for
(
i
=
0
;
i
<
physDev
->
pi
->
FontSubTableSize
;
++
i
)
{
if
(
!
stricmp
(
FaceName
,
if
(
!
wcsicmp
(
lf
.
lf
FaceName
,
physDev
->
pi
->
FontSubTable
[
i
].
pValueName
))
{
TRACE
(
"substituting facename '%s' for '%s'
\n
"
,
(
LPSTR
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
,
FaceName
);
if
(
strlen
((
LPSTR
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
)
<
LF_FACESIZE
)
TRACE
(
"substituting facename %s for %s
\n
"
,
debugstr_w
((
WCHAR
*
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
),
debugstr_w
(
lf
.
lfFaceName
));
if
(
wcslen
((
WCHAR
*
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
)
<
LF_FACESIZE
)
{
strcpy
(
FaceName
,
(
LPSTR
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
);
wcscpy
(
lf
.
lfFaceName
,
(
WCHAR
*
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
);
subst
=
TRUE
;
}
else
WARN
(
"Facename '%s'
is too long; ignoring substitution
\n
"
,
(
LPSTR
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
);
WARN
(
"Facename %s
is too long; ignoring substitution
\n
"
,
debugstr_w
((
WCHAR
*
)
physDev
->
pi
->
FontSubTable
[
i
].
pData
)
);
break
;
}
}
...
...
@@ -123,7 +117,7 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
return
ret
;
}
PSDRV_SelectBuiltinFont
(
dev
,
hfont
,
&
lf
,
FaceName
);
PSDRV_SelectBuiltinFont
(
dev
,
hfont
,
&
lf
,
lf
.
lf
FaceName
);
next
->
funcs
->
pSelectFont
(
next
,
0
,
aa_flags
);
/* tell next driver that we selected a device font */
return
hfont
;
}
...
...
dlls/wineps.drv/init.c
View file @
11ab927a
...
...
@@ -459,21 +459,21 @@ BOOL CDECL PSDRV_ResetDC( PHYSDEV dev, const DEVMODEW *lpInitData )
return
TRUE
;
}
static
PRINTER_ENUM_VALUES
A
*
load_font_sub_table
(
HANDLE
printer
,
DWORD
*
num_entries
)
static
PRINTER_ENUM_VALUES
W
*
load_font_sub_table
(
HANDLE
printer
,
DWORD
*
num_entries
)
{
DWORD
res
,
needed
,
num
;
PRINTER_ENUM_VALUES
A
*
table
=
NULL
;
static
const
char
fontsubkey
[]
=
"PrinterDriverData
\\
FontSubTable"
;
PRINTER_ENUM_VALUES
W
*
table
=
NULL
;
static
const
WCHAR
fontsubkey
[]
=
L
"PrinterDriverData
\\
FontSubTable"
;
*
num_entries
=
0
;
res
=
EnumPrinterDataEx
A
(
printer
,
fontsubkey
,
NULL
,
0
,
&
needed
,
&
num
);
res
=
EnumPrinterDataEx
W
(
printer
,
fontsubkey
,
NULL
,
0
,
&
needed
,
&
num
);
if
(
res
!=
ERROR_MORE_DATA
)
return
NULL
;
table
=
HeapAlloc
(
PSDRV_Heap
,
0
,
needed
);
if
(
!
table
)
return
NULL
;
res
=
EnumPrinterDataEx
A
(
printer
,
fontsubkey
,
(
LPBYTE
)
table
,
needed
,
&
needed
,
&
num
);
res
=
EnumPrinterDataEx
W
(
printer
,
fontsubkey
,
(
LPBYTE
)
table
,
needed
,
&
needed
,
&
num
);
if
(
res
!=
ERROR_SUCCESS
)
{
HeapFree
(
PSDRV_Heap
,
0
,
table
);
...
...
@@ -579,7 +579,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
BOOL
using_default_devmode
=
FALSE
;
int
len
;
TRACE
(
"
'%s'
\n
"
,
debugstr_w
(
name
));
TRACE
(
"
%s
\n
"
,
debugstr_w
(
name
));
LIST_FOR_EACH_ENTRY
(
pi
,
&
printer_list
,
PRINTERINFO
,
entry
)
{
...
...
@@ -659,7 +659,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
afm
=
PSDRV_FindAFMinList
(
PSDRV_AFMFontList
,
font
->
Name
);
if
(
!
afm
)
{
TRACE
(
"Couldn't find AFM file for installed printer font '%s' - "
"ignoring
\n
"
,
font
->
Name
);
"ignoring
\n
"
,
font
->
Name
);
}
else
{
BOOL
added
;
...
...
dlls/wineps.drv/ppd.c
View file @
11ab927a
...
...
@@ -1091,7 +1091,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
TRACE
(
"'%s'
\n
"
,
fn
->
Name
);
LIST_FOR_EACH_ENTRY
(
page
,
&
ppd
->
PageSizes
,
PAGESIZE
,
entry
)
{
TRACE
(
"'%s' aka
'%s'
(%d) invoked by '%s'
\n
"
,
page
->
Name
,
TRACE
(
"'%s' aka
%s
(%d) invoked by '%s'
\n
"
,
page
->
Name
,
debugstr_w
(
page
->
FullName
),
page
->
WinPage
,
page
->
InvocationString
);
if
(
page
->
ImageableArea
)
TRACE
(
"Area = %.2f,%.2f - %.2f, %.2f
\n
"
,
...
...
dlls/wineps.drv/psdrv.h
View file @
11ab927a
...
...
@@ -81,10 +81,10 @@ typedef struct {
}
WINMETRICS
;
typedef
struct
_tagAFM
{
LPCSTR
FontName
;
LPCSTR
FullName
;
LPCSTR
FamilyName
;
LPCSTR
EncodingScheme
;
const
char
*
FontName
;
const
WCHAR
*
FullName
;
const
WCHAR
*
FamilyName
;
const
WCHAR
*
EncodingScheme
;
LONG
Weight
;
/* FW_NORMAL etc. */
float
ItalicAngle
;
BOOL
IsFixedPitch
;
...
...
@@ -109,7 +109,7 @@ typedef struct _tagAFMLISTENTRY {
}
AFMLISTENTRY
;
typedef
struct
_tagFONTFAMILY
{
char
*
FamilyName
;
/* family name */
WCHAR
*
FamilyName
;
/* family name */
AFMLISTENTRY
*
afmlist
;
/* list of afms for this family */
struct
_tagFONTFAMILY
*
next
;
/* next family */
}
FONTFAMILY
;
...
...
@@ -243,7 +243,7 @@ typedef struct
PPD
*
ppd
;
PSDRV_DEVMODE
*
Devmode
;
FONTFAMILY
*
Fonts
;
PPRINTER_ENUM_VALUES
A
FontSubTable
;
PPRINTER_ENUM_VALUES
W
FontSubTable
;
DWORD
FontSubTableSize
;
}
PRINTERINFO
;
...
...
@@ -545,7 +545,7 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm) DECLSPEC_HIDDEN;
SHORT
PSDRV_CalcAvgCharWidth
(
const
AFM
*
afm
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_SelectBuiltinFont
(
PHYSDEV
dev
,
HFONT
hfont
,
LOGFONTW
*
plf
,
LPSTR
FaceN
ame
)
DECLSPEC_HIDDEN
;
LOGFONTW
*
plf
,
WCHAR
*
face_n
ame
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_WriteSetBuiltinFont
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_WriteBuiltinGlyphShow
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
)
DECLSPEC_HIDDEN
;
...
...
dlls/wineps.drv/type1afm.c
View file @
11ab927a
...
...
@@ -319,6 +319,32 @@ static BOOL ReadString(FILE *file, CHAR buffer[], INT bufsize, LPCSTR key,
return
TRUE
;
}
static
BOOL
ReadStringW
(
FILE
*
file
,
CHAR
*
buffer
,
int
size
,
const
char
*
key
,
WCHAR
**
out
)
{
char
*
outA
;
int
len
;
if
(
!
ReadString
(
file
,
buffer
,
size
,
key
,
&
outA
))
return
FALSE
;
if
(
!
outA
)
{
*
out
=
NULL
;
return
TRUE
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
outA
,
-
1
,
NULL
,
0
);
if
(
len
)
*
out
=
HeapAlloc
(
PSDRV_Heap
,
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
len
||
!*
out
)
{
HeapFree
(
PSDRV_Heap
,
0
,
outA
);
return
FALSE
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
outA
,
-
1
,
*
out
,
len
);
HeapFree
(
PSDRV_Heap
,
0
,
outA
);
return
TRUE
;
}
/*******************************************************************************
* ReadBBox
*
...
...
@@ -851,7 +877,7 @@ static VOID Unicodify(AFM *afm, OLD_AFMMETRICS *metrics)
{
INT
i
;
if
(
strcmp
(
afm
->
EncodingScheme
,
"FontSpecific"
)
==
0
)
if
(
wcscmp
(
afm
->
EncodingScheme
,
L
"FontSpecific"
)
==
0
)
{
for
(
i
=
0
;
i
<
afm
->
NumofMetrics
;
++
i
)
{
...
...
@@ -1028,8 +1054,9 @@ static BOOL BuildAFM(FILE *file)
CHAR
buffer
[
258
];
/* allow for <cr>, <lf>, and <nul> */
AFM
*
afm
;
AFMMETRICS
*
metrics
;
LPSTR
font_name
,
full_name
,
family_name
,
encoding_scheme
;
BOOL
retval
,
added
;
WCHAR
*
full_name
,
*
family_name
,
*
encoding_scheme
;
char
*
font_name
;
BOOL
retval
,
added
;
retval
=
ReadFontMetrics
(
file
,
buffer
,
sizeof
(
buffer
),
&
afm
);
if
(
retval
==
FALSE
||
afm
==
NULL
)
...
...
@@ -1039,16 +1066,16 @@ static BOOL BuildAFM(FILE *file)
if
(
retval
==
FALSE
||
font_name
==
NULL
)
goto
cleanup_afm
;
retval
=
ReadString
(
file
,
buffer
,
sizeof
(
buffer
),
"FullName"
,
&
full_name
);
retval
=
ReadString
W
(
file
,
buffer
,
sizeof
(
buffer
),
"FullName"
,
&
full_name
);
if
(
retval
==
FALSE
||
full_name
==
NULL
)
goto
cleanup_font_name
;
retval
=
ReadString
(
file
,
buffer
,
sizeof
(
buffer
),
"FamilyName"
,
retval
=
ReadString
W
(
file
,
buffer
,
sizeof
(
buffer
),
"FamilyName"
,
&
family_name
);
if
(
retval
==
FALSE
||
family_name
==
NULL
)
goto
cleanup_full_name
;
retval
=
ReadString
(
file
,
buffer
,
sizeof
(
buffer
),
"EncodingScheme"
,
retval
=
ReadString
W
(
file
,
buffer
,
sizeof
(
buffer
),
"EncodingScheme"
,
&
encoding_scheme
);
if
(
retval
==
FALSE
||
encoding_scheme
==
NULL
)
goto
cleanup_family_name
;
...
...
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