KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gl_resources.h
Go to the documentation of this file.
1/*
2* This program source code file is part of KICAD, a free EDA CAD application.
3*
4* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program 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
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20#ifndef GAL_OPENGL_RESOURCES_H___
21#define GAL_OPENGL_RESOURCES_H___
22
23#include <gal/gal.h>
24
25#define BITMAP_FONT_USE_SPANS
26
27namespace KIGFX {
28
29 namespace BUILTIN_FONT {
30
32 {
33 unsigned int width, height;
34 unsigned int char_border;
35 unsigned int spacing;
36 // Height must match the atlas in bitmap_font_img.c
37 unsigned char pixels[1024 * 1107 * 3];
38 };
39
41 {
42 unsigned int smooth_pixels;
43 float min_y;
44 float max_y;
45 };
46
48 {
49 unsigned int start;
50 unsigned int end;
51 unsigned int cumulative;
52 };
53
55 {
56 unsigned int atlas_x, atlas_y;
57 unsigned int atlas_w, atlas_h;
58 float minx, maxx;
59 float miny, maxy;
60 float advance;
61 };
62
65
66 GAL_API const FONT_GLYPH_TYPE* LookupGlyph( unsigned int aCodePoint );
67
68 }
69
70}
71
72#endif
#define GAL_API
Definition gal.h:27
const FONT_GLYPH_TYPE * LookupGlyph(unsigned int aCodepoint)
FONT_INFO_TYPE font_information
GAL_API FONT_IMAGE_TYPE font_image
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:29
unsigned char pixels[1024 *1107 *3]