Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9f06a5a6
Commit
9f06a5a6
authored
Oct 13, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Win64 printf format warning fixes.
parent
8c38b880
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
44 additions
and
46 deletions
+44
-46
Makefile.in
dlls/wineps.drv/Makefile.in
+0
-1
bitblt.c
dlls/wineps.drv/bitblt.c
+1
-1
bitmap.c
dlls/wineps.drv/bitmap.c
+2
-2
brush.c
dlls/wineps.drv/brush.c
+1
-1
builtin.c
dlls/wineps.drv/builtin.c
+5
-5
color.c
dlls/wineps.drv/color.c
+1
-2
driver.c
dlls/wineps.drv/driver.c
+3
-3
escape.c
dlls/wineps.drv/escape.c
+4
-4
font.c
dlls/wineps.drv/font.c
+1
-1
graphics.c
dlls/wineps.drv/graphics.c
+1
-1
init.c
dlls/wineps.drv/init.c
+10
-10
pen.c
dlls/wineps.drv/pen.c
+1
-1
ps.c
dlls/wineps.drv/ps.c
+1
-1
type1.c
dlls/wineps.drv/type1.c
+3
-3
type42.c
dlls/wineps.drv/type42.c
+10
-10
No files found.
dlls/wineps.drv/Makefile.in
View file @
9f06a5a6
...
...
@@ -5,7 +5,6 @@ VPATH = @srcdir@
MODULE
=
wineps.drv
IMPORTS
=
user32 gdi32 winspool advapi32 kernel32
EXTRAINCL
=
@FREETYPEINCL@
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
SPEC_SRCS16
=
wineps16.drv.spec
...
...
dlls/wineps.drv/bitblt.c
View file @
9f06a5a6
...
...
@@ -66,7 +66,7 @@ BOOL PSDRV_PatBlt(PSDRV_PDEVICE *physDev, INT x, INT y, INT width, INT height, D
return
TRUE
;
}
default:
FIXME
(
"Unsupported rop %
l
d
\n
"
,
dwRop
);
FIXME
(
"Unsupported rop %d
\n
"
,
dwRop
);
return
FALSE
;
}
}
dlls/wineps.drv/bitmap.c
View file @
9f06a5a6
...
...
@@ -75,7 +75,7 @@ static BOOL get_bitmap_info( const void *ptr, LONG *width, LONG *height, WORD *b
*
compr
=
header
->
biCompression
;
return
TRUE
;
default:
ERR
(
"(%
l
d): unknown/wrong size for header
\n
"
,
header
->
biSize
);
ERR
(
"(%d): unknown/wrong size for header
\n
"
,
header
->
biSize
);
return
FALSE
;
}
}
...
...
@@ -243,7 +243,7 @@ INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst, INT widthDs
widthbytes
=
get_dib_width_bytes
(
fullSrcWidth
,
bpp
);
TRACE
(
"full size=%
ldx%ld bpp=%d compression=%d rop=%08l
x
\n
"
,
fullSrcWidth
,
TRACE
(
"full size=%
dx%d bpp=%d compression=%d rop=%08
x
\n
"
,
fullSrcWidth
,
fullSrcHeight
,
bpp
,
compression
,
dwRop
);
...
...
dlls/wineps.drv/brush.c
View file @
9f06a5a6
...
...
@@ -235,7 +235,7 @@ BOOL PSDRV_Brush(PSDRV_PDEVICE *physDev, BOOL EO)
{
BITMAPINFO
*
bmi
=
GlobalLock16
(
logbrush
.
lbHatch
);
UINT
usage
=
logbrush
.
lbColor
;
TRACE
(
"size %
ldx%l
dx%d
\n
"
,
bmi
->
bmiHeader
.
biWidth
,
TRACE
(
"size %
dx%
dx%d
\n
"
,
bmi
->
bmiHeader
.
biWidth
,
bmi
->
bmiHeader
.
biHeight
,
bmi
->
bmiHeader
.
biBitCount
);
if
(
physDev
->
pi
->
ppd
->
LanguageLevel
>
1
)
{
PSDRV_WriteGSave
(
physDev
);
...
...
dlls/wineps.drv/builtin.c
View file @
9f06a5a6
...
...
@@ -67,7 +67,7 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font,
USHORT
usUnitsPerEm
,
usWinAscent
,
usWinDescent
;
SHORT
sAscender
,
sDescender
,
sLineGap
,
sAvgCharWidth
;
TRACE
(
"'%s' %
l
i
\n
"
,
afm
->
FontName
,
lfHeight
);
TRACE
(
"'%s' %i
\n
"
,
afm
->
FontName
,
lfHeight
);
if
(
lfHeight
<
0
)
/* match em height */
{
...
...
@@ -139,9 +139,9 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font,
font
->
strikeoutPosition
=
tm
->
tmAscent
/
2
;
font
->
strikeoutThickness
=
font
->
underlineThickness
;
TRACE
(
"Selected PS font '%s' size %d weight %
l
d.
\n
"
,
afm
->
FontName
,
TRACE
(
"Selected PS font '%s' size %d weight %d.
\n
"
,
afm
->
FontName
,
font
->
size
,
tm
->
tmWeight
);
TRACE
(
"H = %
ld As = %ld Des = %ld IL = %ld EL = %l
d
\n
"
,
tm
->
tmHeight
,
TRACE
(
"H = %
d As = %d Des = %d IL = %d EL = %
d
\n
"
,
tm
->
tmHeight
,
tm
->
tmAscent
,
tm
->
tmDescent
,
tm
->
tmInternalLeading
,
tm
->
tmExternalLeading
);
}
...
...
@@ -296,7 +296,7 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
if
(
needle
==
NULL
)
{
WARN
(
"No glyph for U+%.4
l
X in %s
\n
"
,
UV
,
afm
->
FontName
);
WARN
(
"No glyph for U+%.4X in %s
\n
"
,
UV
,
afm
->
FontName
);
needle
=
afm
->
Metrics
;
}
...
...
@@ -336,7 +336,7 @@ BOOL PSDRV_GetTextExtentExPoint(PSDRV_PDEVICE *physDev, LPCWSTR str, INT count,
if
(
lpnFit
)
*
lpnFit
=
nfit
;
TRACE
(
"cx=%
li cy=%l
i
\n
"
,
size
->
cx
,
size
->
cy
);
TRACE
(
"cx=%
i cy=%
i
\n
"
,
size
->
cx
,
size
->
cy
);
return
TRUE
;
}
...
...
dlls/wineps.drv/color.c
View file @
9f06a5a6
...
...
@@ -94,7 +94,7 @@ void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
float
r
,
g
,
b
;
if
(
ctype
!=
0
&&
ctype
!=
2
)
FIXME
(
"Colour is %08
l
x
\n
"
,
wincolor
);
FIXME
(
"Colour is %08x
\n
"
,
wincolor
);
r
=
(
wincolor
&
0xff
)
/
256
.
0
;
g
=
((
wincolor
>>
8
)
&
0xff
)
/
256
.
0
;
...
...
@@ -133,4 +133,3 @@ COLORREF PSDRV_SetTextColor( PSDRV_PDEVICE *physDev, COLORREF color )
physDev
->
font
.
set
=
FALSE
;
return
color
;
}
dlls/wineps.drv/driver.c
View file @
9f06a5a6
...
...
@@ -334,7 +334,7 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
PRINTERINFO
*
pi
=
PSDRV_FindPrinterInfo
(
lpszDevice
);
if
(
!
pi
)
return
-
1
;
TRACE
(
"(Driver=%s, hwnd=%p, devOut=%p, Device='%s', Port='%s', devIn=%p, Profile='%s', Mode=%04
l
x)
\n
"
,
TRACE
(
"(Driver=%s, hwnd=%p, devOut=%p, Device='%s', Port='%s', devIn=%p, Profile='%s', Mode=%04x)
\n
"
,
lpszDriver
,
hwnd
,
lpdmOutput
,
lpszDevice
,
lpszPort
,
lpdmInput
,
lpszProfile
,
dwMode
);
/* If dwMode == 0, return size of DEVMODE structure */
...
...
@@ -343,7 +343,7 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
/* If DM_MODIFY is set, change settings in accordance with lpdmInput */
if
((
dwMode
&
DM_MODIFY
)
&&
lpdmInput
)
{
TRACE
(
"DM_MODIFY set. devIn->dmFields = %08
l
x
\n
"
,
lpdmInput
->
dmFields
);
TRACE
(
"DM_MODIFY set. devIn->dmFields = %08x
\n
"
,
lpdmInput
->
dmFields
);
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
(
PSDRV_DEVMODEA
*
)
lpdmInput
,
pi
);
}
...
...
@@ -556,7 +556,7 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
ret
=
0
;
if
(
pi
->
ppd
->
DefaultDuplex
&&
pi
->
ppd
->
DefaultDuplex
->
WinDuplex
!=
0
)
ret
=
1
;
TRACE
(
"DC_DUPLEX: returning %
l
d
\n
"
,
ret
);
TRACE
(
"DC_DUPLEX: returning %d
\n
"
,
ret
);
return
ret
;
case
DC_EMF_COMPLIANT
:
...
...
dlls/wineps.drv/escape.c
View file @
9f06a5a6
...
...
@@ -89,7 +89,7 @@ INT PSDRV_ExtEscape( PSDRV_PDEVICE *physDev, INT nEscape, INT cbInput, LPCVOID i
{
DRAWPATRECT
*
dpr
=
(
DRAWPATRECT
*
)
in_data
;
FIXME
(
"DRAWPATTERNRECT(pos (%
ld,%ld), size %ldx%l
d, style %d, pattern %x), stub!
\n
"
,
FIXME
(
"DRAWPATTERNRECT(pos (%
d,%d), size %dx%
d, style %d, pattern %x), stub!
\n
"
,
dpr
->
ptPosition
.
x
,
dpr
->
ptPosition
.
y
,
dpr
->
ptSize
.
x
,
dpr
->
ptSize
.
y
,
dpr
->
wStyle
,
dpr
->
wPattern
...
...
@@ -101,7 +101,7 @@ INT PSDRV_ExtEscape( PSDRV_PDEVICE *physDev, INT nEscape, INT cbInput, LPCVOID i
BANDINFOSTRUCT
*
ibi
=
(
BANDINFOSTRUCT
*
)
in_data
;
BANDINFOSTRUCT
*
obi
=
(
BANDINFOSTRUCT
*
)
out_data
;
FIXME
(
"BANDINFO(graphics %d, text %d, rect [%
ldx%ld-%ldx%l
d]), stub!
\n
"
,
FIXME
(
"BANDINFO(graphics %d, text %d, rect [%
dx%d-%dx%
d]), stub!
\n
"
,
ibi
->
GraphicsFlag
,
ibi
->
TextFlag
,
ibi
->
GraphicsRect
.
top
,
...
...
@@ -121,7 +121,7 @@ INT PSDRV_ExtEscape( PSDRV_PDEVICE *physDev, INT nEscape, INT cbInput, LPCVOID i
r
->
top
=
0
;
r
->
right
=
physDev
->
horzRes
;
r
->
bottom
=
physDev
->
vertRes
;
TRACE
(
"NEXTBAND returning %
ld,%ld - %ld,%l
d
\n
"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
TRACE
(
"NEXTBAND returning %
d,%d - %d,%
d
\n
"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
return
1
;
}
r
->
left
=
0
;
...
...
@@ -224,7 +224,7 @@ INT PSDRV_ExtEscape( PSDRV_PDEVICE *physDev, INT nEscape, INT cbInput, LPCVOID i
WARN
(
"cbInput != sizeof(RECT) (=%d) for SET_BOUNDS
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
"SET_BOUNDS (%
ld,%ld) - (%ld,%l
d)
\n
"
,
r
->
left
,
r
->
top
,
TRACE
(
"SET_BOUNDS (%
d,%d) - (%d,%
d)
\n
"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
return
0
;
}
...
...
dlls/wineps.drv/font.c
View file @
9f06a5a6
...
...
@@ -43,7 +43,7 @@ HFONT PSDRV_SelectFont( PSDRV_PDEVICE *physDev, HFONT hfont, HANDLE gdiFont )
if
(
!
GetObjectW
(
hfont
,
sizeof
(
lf
),
&
lf
))
return
HGDI_ERROR
;
TRACE
(
"FaceName = %s Height = %
ld Italic = %d Weight = %l
d
\n
"
,
TRACE
(
"FaceName = %s Height = %
d Italic = %d Weight = %
d
\n
"
,
debugstr_w
(
lf
.
lfFaceName
),
lf
.
lfHeight
,
lf
.
lfItalic
,
lf
.
lfWeight
);
...
...
dlls/wineps.drv/graphics.c
View file @
9f06a5a6
...
...
@@ -129,7 +129,7 @@ BOOL PSDRV_Rectangle( PSDRV_PDEVICE *physDev, INT left, INT top, INT right, INT
Office 2k when inserting eps files */
if
(
physDev
->
job
.
in_passthrough
&&
!
physDev
->
job
.
had_passthrough_rect
&&
GetROP2
(
physDev
->
hdc
)
==
R2_NOP
)
{
char
buf
[
256
];
sprintf
(
buf
,
"N %
ld %ld %ld %l
d B
\n
"
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
rect
.
left
,
rect
.
top
);
sprintf
(
buf
,
"N %
d %d %d %
d B
\n
"
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
rect
.
left
,
rect
.
top
);
WriteSpool16
(
physDev
->
job
.
hJob
,
buf
,
strlen
(
buf
));
physDev
->
job
.
had_passthrough_rect
=
TRUE
;
return
TRUE
;
...
...
dlls/wineps.drv/init.c
View file @
9f06a5a6
...
...
@@ -120,7 +120,7 @@ static LOGFONTA DefaultLogFont = {
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
TRACE
(
"(%p, %
l
d, %p)
\n
"
,
hinst
,
reason
,
reserved
);
TRACE
(
"(%p, %d, %p)
\n
"
,
hinst
,
reason
,
reserved
);
switch
(
reason
)
{
...
...
@@ -219,7 +219,7 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev )
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmPaperLength
*
physDev
->
logPixelsY
/
254
;
}
else
{
FIXME
(
"Odd dmFields %
l
x
\n
"
,
physDev
->
Devmode
->
dmPublic
.
dmFields
);
FIXME
(
"Odd dmFields %x
\n
"
,
physDev
->
Devmode
->
dmPublic
.
dmFields
);
physDev
->
ImageableArea
.
left
=
0
;
physDev
->
ImageableArea
.
right
=
0
;
physDev
->
ImageableArea
.
bottom
=
0
;
...
...
@@ -228,7 +228,7 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev )
physDev
->
PageSize
.
cy
=
0
;
}
TRACE
(
"ImageableArea = %
ld,%ld - %ld,%ld: PageSize = %ldx%l
d
\n
"
,
TRACE
(
"ImageableArea = %
d,%d - %d,%d: PageSize = %dx%
d
\n
"
,
physDev
->
ImageableArea
.
left
,
physDev
->
ImageableArea
.
bottom
,
physDev
->
ImageableArea
.
right
,
physDev
->
ImageableArea
.
top
,
physDev
->
PageSize
.
cx
,
physDev
->
PageSize
.
cy
);
...
...
@@ -572,7 +572,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
}
if
(
OpenPrinterA
(
pi
->
FriendlyName
,
&
hPrinter
,
NULL
)
==
0
)
{
ERR
(
"OpenPrinterA failed with code %
l
i
\n
"
,
GetLastError
());
ERR
(
"OpenPrinterA failed with code %i
\n
"
,
GetLastError
());
goto
cleanup
;
}
...
...
@@ -638,7 +638,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
else
{
res
=
ERROR_FILE_NOT_FOUND
;
ERR
(
"Error %
l
i getting PPD file name for printer '%s'
\n
"
,
res
,
name
);
ERR
(
"Error %i getting PPD file name for printer '%s'
\n
"
,
res
,
name
);
goto
closeprinter
;
}
ppdFileName
=
HeapAlloc
(
PSDRV_Heap
,
0
,
strlen
(
data_dir
)
+
strlen
(
filename
)
+
1
);
...
...
@@ -705,7 +705,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
else
if
(
res
==
ERROR_FILE_NOT_FOUND
)
TRACE
(
"No 'Paper Size' for printer '%s'
\n
"
,
name
);
else
{
ERR
(
"GetPrinterDataA returned %
l
i
\n
"
,
res
);
ERR
(
"GetPrinterDataA returned %i
\n
"
,
res
);
goto
closeprinter
;
}
...
...
@@ -731,7 +731,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
else
if
(
res
==
ERROR_MORE_DATA
)
{
pi
->
FontSubTable
=
HeapAlloc
(
PSDRV_Heap
,
0
,
needed
);
if
(
pi
->
FontSubTable
==
NULL
)
{
ERR
(
"Failed to allocate %
l
i bytes from heap
\n
"
,
needed
);
ERR
(
"Failed to allocate %i bytes from heap
\n
"
,
needed
);
goto
closeprinter
;
}
...
...
@@ -739,17 +739,17 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
(
LPBYTE
)
pi
->
FontSubTable
,
needed
,
&
needed
,
&
pi
->
FontSubTableSize
);
if
(
res
!=
ERROR_SUCCESS
)
{
ERR
(
"EnumPrinterDataExA returned %
l
i
\n
"
,
res
);
ERR
(
"EnumPrinterDataExA returned %i
\n
"
,
res
);
goto
closeprinter
;
}
}
else
{
ERR
(
"EnumPrinterDataExA returned %
l
i
\n
"
,
res
);
ERR
(
"EnumPrinterDataExA returned %i
\n
"
,
res
);
goto
closeprinter
;
}
if
(
ClosePrinter
(
hPrinter
)
==
0
)
{
ERR
(
"ClosePrinter failed with code %
l
i
\n
"
,
GetLastError
());
ERR
(
"ClosePrinter failed with code %i
\n
"
,
GetLastError
());
goto
cleanup
;
}
...
...
dlls/wineps.drv/pen.c
View file @
9f06a5a6
...
...
@@ -61,7 +61,7 @@ HPEN PSDRV_SelectPen( PSDRV_PDEVICE *physDev, HPEN hpen )
HeapFree
(
GetProcessHeap
(),
0
,
elp
);
}
TRACE
(
"hpen = %p colour = %08
l
x
\n
"
,
hpen
,
logpen
.
lopnColor
);
TRACE
(
"hpen = %p colour = %08x
\n
"
,
hpen
,
logpen
.
lopnColor
);
physDev
->
pen
.
width
=
logpen
.
lopnWidth
.
x
;
if
((
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
||
(
physDev
->
pen
.
width
>
1
))
...
...
dlls/wineps.drv/ps.c
View file @
9f06a5a6
...
...
@@ -192,7 +192,7 @@ static const char psarrayget[] =
"%s %d get
\n
"
;
static
const
char
psarrayput
[]
=
"%s %d %
l
d put
\n
"
;
"%s %d %d put
\n
"
;
static
const
char
psarraydef
[]
=
"/%s %d array def
\n
"
;
...
...
dlls/wineps.drv/type1.c
View file @
9f06a5a6
...
...
@@ -204,7 +204,7 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
"ND
\n
"
"end end
\n
"
;
TRACE
(
"%
l
d %s
\n
"
,
index
,
glyph_name
);
TRACE
(
"%d %s
\n
"
,
index
,
glyph_name
);
assert
(
pdl
->
type
==
Type1
);
t1
=
pdl
->
typeinfo
.
Type1
;
...
...
@@ -247,7 +247,7 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
pph
=
(
TTPOLYGONHEADER
*
)
glyph_buf
;
while
((
char
*
)
pph
<
glyph_buf
+
len
)
{
TRACE
(
"contour len %
l
d
\n
"
,
pph
->
cb
);
TRACE
(
"contour len %d
\n
"
,
pph
->
cb
);
ppc
=
(
TTPOLYCURVE
*
)((
char
*
)
pph
+
sizeof
(
*
pph
));
str_add_point
(
charstring
,
&
pph
->
pfxStart
,
&
curpos
);
...
...
@@ -285,7 +285,7 @@ BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
glyph_def_begin
)
+
strlen
(
pdl
->
ps_name
)
+
strlen
(
glyph_name
)
+
100
);
sprintf
(
buf
,
"%%%%glyph %04
l
x
\n
"
,
index
);
sprintf
(
buf
,
"%%%%glyph %04x
\n
"
,
index
);
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
len
=
str_get_bytes
(
charstring
,
&
bytes
);
...
...
dlls/wineps.drv/type42.c
View file @
9f06a5a6
...
...
@@ -157,11 +157,11 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
" currentdict end def
\n
"
" /sfnts [
\n
"
;
static
const
char
TT_offset_table
[]
=
"<00010000%04x%04x%04x%04x
\n
"
;
static
const
char
TT_table_dir_entry
[]
=
"%08
lx%08lx%08lx%08l
x
\n
"
;
static
const
char
TT_table_dir_entry
[]
=
"%08
x%08x%08x%08
x
\n
"
;
static
const
char
storage
[]
=
"]
\n
havetype42gdir{pop}{{string} forall}ifelse
\n
"
;
static
const
char
end
[]
=
"] def
\n
"
"havetype42gdir{/GlyphDirectory 256 dict def
\n
"
" sfnts 0 get dup %
ld (locx) putinterval %l
d (glfx) putinterval}if
\n
"
" sfnts 0 get dup %
d (locx) putinterval %
d (glfx) putinterval}if
\n
"
"currentdict end dup /FontName get exch definefont pop
\n
"
;
...
...
@@ -187,7 +187,7 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
t42
->
maxp_tab
=
i
;
}
if
(
i
<
num_of_tables
)
{
TRACE
(
"Table %
ld has length %l
d. Will use Type 1 font instead.
\n
"
,
i
,
t42
->
tables
[
i
].
len
);
TRACE
(
"Table %
d has length %
d. Will use Type 1 font instead.
\n
"
,
i
,
t42
->
tables
[
i
].
len
);
T42_free
(
t42
);
return
NULL
;
}
...
...
@@ -262,7 +262,7 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
PSDRV_WriteSpool
(
physDev
,
"[ "
,
2
);
for
(
i
=
1
;
t42
->
glyf_blocks
[
i
];
i
++
)
{
sprintf
(
buf
,
"%
l
d "
,
t42
->
glyf_blocks
[
i
]
-
t42
->
glyf_blocks
[
i
-
1
]
+
1
);
sprintf
(
buf
,
"%d "
,
t42
->
glyf_blocks
[
i
]
-
t42
->
glyf_blocks
[
i
-
1
]
+
1
);
/* again add one byte for old PostScript rips */
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
if
(
i
%
8
==
0
)
...
...
@@ -290,16 +290,16 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
const
char
glyph_def
[]
=
"/%s findfont exch 1 index
\n
"
"havetype42gdir
\n
"
"{/GlyphDirectory get begin %
l
d exch def end}
\n
"
"{/GlyphDirectory get begin %d exch def end}
\n
"
"{/sfnts get 4 index get 3 index 2 index putinterval pop}
\n
"
"ifelse
\n
"
"/CharStrings get
\n
"
"begin
\n
"
" /%s %
l
d def
\n
"
" /%s %d def
\n
"
"end
\n
"
"pop pop
\n
"
;
TRACE
(
"%
l
d %s
\n
"
,
index
,
glyph_name
);
TRACE
(
"%d %s
\n
"
,
index
,
glyph_name
);
assert
(
pdl
->
type
==
Type42
);
t42
=
pdl
->
typeinfo
.
Type42
;
...
...
@@ -317,7 +317,7 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
strlen
(
pdl
->
ps_name
)
+
100
);
if
(
!
get_glyf_pos
(
t42
,
index
,
&
start
,
&
end
))
return
FALSE
;
TRACE
(
"start = %
lx end = %l
x
\n
"
,
start
,
end
);
TRACE
(
"start = %
x end = %
x
\n
"
,
start
,
end
);
awidth
=
GET_BE_WORD
(
t42
->
tables
[
t42
->
hmtx_tab
].
data
+
index
*
4
);
lsb
=
GET_BE_WORD
(
t42
->
tables
[
t42
->
hmtx_tab
].
data
+
index
*
4
+
2
);
...
...
@@ -332,7 +332,7 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
sg_flags
=
GET_BE_WORD
(
sg_start
);
sg_index
=
GET_BE_WORD
(
sg_start
+
2
);
TRACE
(
"Sending subglyph %04
lx for glyph %04l
x
\n
"
,
sg_index
,
index
);
TRACE
(
"Sending subglyph %04
x for glyph %04
x
\n
"
,
sg_index
,
index
);
get_glyph_name
(
physDev
->
hdc
,
sg_index
,
sg_name
);
T42_download_glyph
(
physDev
,
pdl
,
sg_index
,
sg_name
);
sg_start
+=
4
;
...
...
@@ -353,7 +353,7 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
if
(
start
<
t42
->
glyf_blocks
[
i
])
break
;
/* we don't have a string for the gdir and glyf tables, but we do have a
string for the TT header. So the offset we need is tables - 2 */
sprintf
(
buf
,
"%
ld %l
d
\n
"
,
t42
->
num_of_written_tables
-
2
+
i
,
start
-
t42
->
glyf_blocks
[
i
-
1
]);
sprintf
(
buf
,
"%
d %
d
\n
"
,
t42
->
num_of_written_tables
-
2
+
i
,
start
-
t42
->
glyf_blocks
[
i
-
1
]);
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
PSDRV_WriteSpool
(
physDev
,
"<"
,
1
);
...
...
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