autofs: disable by default
[unleashed.git] / include / sys / font.h
blobc4de4e9ddffefad98f0419691fe0fb4e2bf19524
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_FONT_H
28 #define _SYS_FONT_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
35 * Number of chars encoded in font data. Bundled fonts are generated
36 * from bdf files and this constant depends on the data in the bdf file.
37 * If more entries are added to the bdf files, then this number must be
38 * increased.
40 #define ENCODED_CHARS 256
42 struct font {
43 short width;
44 short height;
45 uchar_t *char_ptr[ENCODED_CHARS];
46 void *image_data;
49 typedef struct bitmap_data {
50 short width;
51 short height;
52 unsigned char *image;
53 unsigned char **encoding;
54 } bitmap_data_t;
56 struct fontlist {
57 bitmap_data_t *data;
58 bitmap_data_t *(*fontload)(char *);
61 extern struct fontlist fonts[];
63 #define DEFAULT_FONT_DATA font_data_12x22
64 #define BORDER_PIXELS 10 /* space from screen border */
66 * Built in fonts.
68 extern bitmap_data_t font_data_12x22;
69 extern bitmap_data_t font_data_8x16;
70 extern bitmap_data_t font_data_7x14;
71 extern bitmap_data_t font_data_6x10;
73 void set_font(struct font *, short *, short *, short, short);
74 void font_bit_to_pix4(struct font *, uint8_t *, uchar_t, uint8_t, uint8_t);
75 void font_bit_to_pix8(struct font *, uint8_t *, uchar_t, uint8_t, uint8_t);
76 void font_bit_to_pix24(struct font *, uint32_t *, uchar_t, uint32_t, uint32_t);
78 #ifdef __cplusplus
80 #endif
82 #endif /* !_SYS_FONT_H */