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