MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4_gfxfont.h
Go to the documentation of this file.
1
6/*
7The MIT License (MIT)
8
9Copyright (c) 2017 Adafruit Industries
10
11Permission is hereby granted, free of charge, to any person obtaining a copy
12of this software and associated documentation files (the "Software"), to deal
13in the Software without restriction, including without limitation the rights
14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15copies of the Software, and to permit persons to whom the Software is
16furnished to do so, subject to the following conditions:
17
18The above copyright notice and this permission notice shall be included in all
19copies or substantial portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27SOFTWARE.
28*/
29
30// Font structures for newer Adafruit_GFX (1.1 and later).
31// Example fonts are included in 'Fonts' directory.
32// To use a font in your Arduino sketch, #include the corresponding .h
33// file and pass address of GFXfont struct to setFont(). Pass NULL to
34// revert to 'classic' fixed-space bitmap font.
35
36#ifndef _GFXFONT_H_
37#define _GFXFONT_H_
38
40typedef struct {
41 uint16_t bitmapOffset;
42 uint8_t width;
43 uint8_t height;
44 uint8_t xAdvance;
45 int8_t xOffset;
46 int8_t yOffset;
47} GFXglyph;
48
50typedef struct {
51 uint8_t *bitmap;
53 uint16_t first;
54 uint16_t last;
55 uint8_t yAdvance;
56} GFXfont;
57
58#endif // _GFXFONT_H_
Data stored for FONT AS A WHOLE.
uint16_t first
ASCII extents (first char)
uint8_t * bitmap
Glyph bitmaps, concatenated.
uint16_t last
ASCII extents (last char)
uint8_t yAdvance
Newline distance (y axis)
GFXglyph * glyph
Glyph array.
Font data stored PER GLYPH.
uint8_t width
Bitmap dimensions in pixels.
uint8_t height
Bitmap dimensions in pixels.
uint16_t bitmapOffset
Pointer into GFXfont->bitmap.
int8_t yOffset
Y dist from cursor pos to UL corner.
uint8_t xAdvance
Distance to advance cursor (x axis)
int8_t xOffset
X dist from cursor pos to UL corner.