2 * PostScript driver font functions
4 * Copyright 1998 Huw D M Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(psdrv
);
37 /***********************************************************************
40 HFONT
PSDRV_SelectFont( print_ctx
*ctx
, HFONT hfont
, UINT
*aa_flags
)
42 struct font_info font_info
;
44 ctx
->font
.set
= UNSET
;
46 if (ExtEscape(ctx
->hdc
, PSDRV_GET_BUILTIN_FONT_INFO
, 0, NULL
,
47 sizeof(font_info
), (char *)&font_info
))
49 ctx
->font
.fontloc
= Builtin
;
53 ctx
->font
.fontloc
= Download
;
54 ctx
->font
.fontinfo
.Download
= NULL
;
59 /***********************************************************************
62 BOOL
PSDRV_SetFont( print_ctx
*ctx
, BOOL vertical
)
64 PSDRV_WriteSetColor(ctx
, &ctx
->font
.color
);
65 if (vertical
&& (ctx
->font
.set
== VERTICAL_SET
)) return TRUE
;
66 if (!vertical
&& (ctx
->font
.set
== HORIZONTAL_SET
)) return TRUE
;
68 switch(ctx
->font
.fontloc
) {
70 PSDRV_WriteSetBuiltinFont(ctx
);
73 PSDRV_WriteSetDownloadFont(ctx
, vertical
);
76 ERR("fontloc = %d\n", ctx
->font
.fontloc
);
81 ctx
->font
.set
= VERTICAL_SET
;
83 ctx
->font
.set
= HORIZONTAL_SET
;