]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/pstext.h
Merge changes from CUPS 1.5.1-r9875.
[thirdparty/cups.git] / filter / pstext.h
CommitLineData
cda47a96
MS
1/*
2 * "$Id$"
3 *
71e16022 4 * Common PostScript text definitions for CUPS.
cda47a96 5 *
71e16022 6 * Copyright 2008-2010 by Apple Inc.
cda47a96
MS
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Apple Inc. and are protected by Federal copyright
10 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 * which should have been included with this file. If this file is
12 * file is missing or damaged, see the license at "http://www.cups.org/".
13 *
14 * This file is subject to the Apple OS-Developed Software exception.
15 */
16
17/*
18 * Include necessary headers...
19 */
20
21#include "common.h"
22#include <cups/transcode.h>
23
24
25/*
26 * Constants...
27 */
28
29#define PS_NORMAL 0 /* Normal text */
30#define PS_BOLD 1 /* Bold text */
31#define PS_ITALIC 2 /* Italic text */
32#define PS_BOLDITALIC 3 /* Bold italic text */
33
34#define PS_LEFT 1 /* Left-justified text */
35#define PS_CENTER 0 /* Center-justified text */
36#define PS_RIGHT -1 /* Right-justified text */
37
38
39/*
40 * Structures...
41 */
42
43typedef struct ps_text_s /**** PostScript font data ****/
44{
45 char *glyphs[65536]; /* PostScript glyphs for Unicode */
46 int num_fonts; /* Number of fonts to use */
47 char *fonts[256][4]; /* Fonts to use */
48 cups_array_t *unique; /* Unique fonts */
49 unsigned short chars[65536], /* 0xffcc (ff = font, cc = char) */
50 codes[65536]; /* Unicode glyph mapping to fonts */
51 int widths[256], /* Widths of each font */
52 directions[256];/* Text directions for each font */
53 float size; /* Current text size */
54 int style; /* Current text style */
55} ps_text_t;
56
57
58/*
59 * Functions...
60 */
61
62extern void psTextEmbedFonts(ps_text_t *fonts);
63extern void psTextListFonts(ps_text_t *fonts);
64extern ps_text_t *psTextInitialize(void);
65extern void psTextUTF8(ps_text_t *fonts, float size, int style,
66 int align, const char *text);
67extern void psTextUTF32(ps_text_t *fonts, float size, int style,
68 int align, const cups_utf32_t *text,
69 int textlen);
70
71
72/*
73 * End of "$Id$".
74 */