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
b55576b6
Commit
b55576b6
authored
May 14, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Store builtin fonts list in DEVMODE.
parent
82ef9166
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
init.c
dlls/wineps.drv/init.c
+14
-2
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-0
unixlib.h
dlls/wineps.drv/unixlib.h
+5
-0
No files found.
dlls/wineps.drv/init.c
View file @
b55576b6
...
...
@@ -503,11 +503,12 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
WCHAR
*
ppd_filename
=
NULL
;
char
*
nameA
=
NULL
;
BOOL
using_default_devmode
=
FALSE
;
int
i
,
len
,
input_slots
,
resolutions
,
page_sizes
,
font_subs
,
size
;
int
i
,
len
,
input_slots
,
resolutions
,
page_sizes
,
font_subs
,
installed_fonts
,
size
;
struct
input_slot
*
dm_slot
;
struct
resolution
*
dm_res
;
struct
page_size
*
dm_page
;
struct
font_sub
*
dm_sub
;
struct
installed_font
*
dm_font
;
INPUTSLOT
*
slot
;
RESOLUTION
*
res
;
PAGESIZE
*
page
;
...
...
@@ -551,11 +552,13 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
resolutions
=
list_count
(
&
pi
->
ppd
->
Resolutions
);
page_sizes
=
list_count
(
&
pi
->
ppd
->
PageSizes
);
font_subs
=
pi
->
FontSubTableSize
;
installed_fonts
=
list_count
(
&
pi
->
ppd
->
InstalledFonts
);
size
=
FIELD_OFFSET
(
PSDRV_DEVMODE
,
data
[
input_slots
*
sizeof
(
struct
input_slot
)
+
resolutions
*
sizeof
(
struct
resolution
)
+
page_sizes
*
sizeof
(
struct
page_size
)
+
font_subs
*
sizeof
(
struct
font_sub
)]);
font_subs
*
sizeof
(
struct
font_sub
)
+
installed_fonts
*
sizeof
(
struct
installed_font
)]);
pi
->
Devmode
=
get_devmode
(
hPrinter
,
name
,
&
using_default_devmode
,
size
);
if
(
!
pi
->
Devmode
)
goto
fail
;
...
...
@@ -590,6 +593,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
pi
->
Devmode
->
input_slots
=
input_slots
;
pi
->
Devmode
->
resolutions
=
resolutions
;
pi
->
Devmode
->
page_sizes
=
page_sizes
;
pi
->
Devmode
->
font_subs
=
font_subs
;
pi
->
Devmode
->
installed_fonts
=
installed_fonts
;
dm_slot
=
(
struct
input_slot
*
)
pi
->
Devmode
->
data
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
...
...
@@ -637,6 +642,13 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
lstrcpynW
(
dm_sub
->
sub
,
(
WCHAR
*
)
pi
->
FontSubTable
[
i
].
pData
,
ARRAY_SIZE
(
dm_sub
->
sub
));
dm_sub
++
;
}
dm_font
=
(
struct
installed_font
*
)
dm_sub
;
LIST_FOR_EACH_ENTRY
(
font
,
&
pi
->
ppd
->
InstalledFonts
,
FONTNAME
,
entry
)
{
lstrcpynA
(
dm_font
->
name
,
font
->
Name
,
ARRAY_SIZE
(
dm_font
->
name
));
dm_font
++
;
}
}
/* Duplex is indicated by the setting of the DM_DUPLEX bit in dmFields.
...
...
dlls/wineps.drv/psdrv.h
View file @
b55576b6
...
...
@@ -228,6 +228,7 @@ typedef struct {
int
resolutions
;
int
page_sizes
;
int
font_subs
;
int
installed_fonts
;
BYTE
data
[
1
];
}
PSDRV_DEVMODE
;
...
...
dlls/wineps.drv/unixlib.h
View file @
b55576b6
...
...
@@ -66,6 +66,11 @@ struct font_sub
WCHAR
sub
[
LF_FACESIZE
];
};
struct
installed_font
{
char
name
[
LF_FACESIZE
];
};
/* Unix calls */
enum
wineps_funcs
{
...
...
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