1 | /************************************************************************** |
---|
2 | * |
---|
3 | * Copyright (c) 2013 Alcatel-Lucent |
---|
4 | * |
---|
5 | * Alcatel Lucent licenses this file to You under the Apache License, |
---|
6 | * Version 2.0 (the "License"); you may not use this file except in |
---|
7 | * compliance with the License. A copy of the License is contained the |
---|
8 | * file LICENSE at the top level of this repository. |
---|
9 | * You may also obtain a copy of the License at: |
---|
10 | * |
---|
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
12 | * |
---|
13 | * Unless required by applicable law or agreed to in writing, software |
---|
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
16 | * See the License for the specific language governing permissions and |
---|
17 | * limitations under the License. |
---|
18 | * |
---|
19 | ************************************************************************** |
---|
20 | * |
---|
21 | * font.h |
---|
22 | * |
---|
23 | * Original author: Ed Sutter (ed.sutter@alcatel-lucent.com) |
---|
24 | * |
---|
25 | */ |
---|
26 | struct font { |
---|
27 | char *bitmap; /* Pointer to font bitmap array. */ |
---|
28 | int width; /* Width of font in array. */ |
---|
29 | int height; /* Height of font in array. */ |
---|
30 | int above; /* Number of pixels of empty space above. */ |
---|
31 | int below; /* Number of pixels of empty space blow. */ |
---|
32 | int between; /* Number of pixels of separation between each char. */ |
---|
33 | }; |
---|
34 | |
---|
35 | extern char font8x12[]; |
---|
36 | extern struct font font_styles[]; |
---|
37 | extern int font_style_total(void); |
---|
38 | |
---|
39 | #define MAX_FONT_WIDTH 8 |
---|
40 | #define MIN_FONT_WIDTH 8 |
---|
41 | |
---|
42 | #define FONT_WHITE 0x00ffffff |
---|
43 | #define FONT_BLACK 0x00000000 |
---|
44 | #define FONT_TRANSPARENT 0x01000000 |
---|
45 | #define FONT_INVERT 0x02000000 |
---|
46 | |
---|
47 | #define OPAQUE_BACKGROUND(x) ((x & FONT_TRANSPARENT) == 0) |
---|