ssd1306 more functions (#310)
SSD1306 2D drawing/text functions, new example, builtin fonts support
This commit is contained in:
parent
61c3d509e5
commit
7432c019f7
39 changed files with 145365 additions and 5 deletions
20
extras/fonts/LICENSE
Normal file
20
extras/fonts/LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
97
extras/fonts/OFL.txt
Normal file
97
extras/fonts/OFL.txt
Normal file
|
@ -0,0 +1,97 @@
|
|||
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
|
||||
with Reserved Font Name <Reserved Font Name>.
|
||||
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
|
||||
with Reserved Font Name <additional Reserved Font Name>.
|
||||
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
42
extras/fonts/component.mk
Normal file
42
extras/fonts/component.mk
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Component makefile for extras/fonts
|
||||
|
||||
# expected anyone using this component includes it as 'fonts/fonts.h'
|
||||
INC_DIRS += $(fonts_ROOT)..
|
||||
|
||||
# args for passing into compile rule generation
|
||||
fonts_SRC_DIR = $(fonts_ROOT)
|
||||
|
||||
FONTS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
# default builtin fonts
|
||||
include $(FONTS_DIR)defaults.mk
|
||||
|
||||
fonts_CFLAGS = $(CFLAGS) \
|
||||
-DFONTS_GLCD_5X7=$(FONTS_GLCD_5X7) \
|
||||
-DFONTS_ROBOTO_8PT=$(FONTS_ROBOTO_8PT) \
|
||||
-DFONTS_ROBOTO_10PT=$(FONTS_ROBOTO_10PT) \
|
||||
-DFONTS_BITOCRA_4X7=$(FONTS_BITOCRA_4X7) \
|
||||
-DFONTS_BITOCRA_6X11=$(FONTS_BITOCRA_6X11) \
|
||||
-DFONTS_BITOCRA_7X13=$(FONTS_BITOCRA_7X13) \
|
||||
-DFONTS_TERMINUS_6X12_ISO8859_1=$(FONTS_TERMINUS_6X12_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_8X14_ISO8859_1=$(FONTS_TERMINUS_8X14_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_8X14_ISO8859_1=$(FONTS_TERMINUS_BOLD_8X14_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_10X18_ISO8859_1=$(FONTS_TERMINUS_10X18_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_10X18_ISO8859_1=$(FONTS_TERMINUS_BOLD_10X18_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_11X22_ISO8859_1=$(FONTS_TERMINUS_11X22_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_11X22_ISO8859_1=$(FONTS_TERMINUS_BOLD_11X22_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_12X24_ISO8859_1=$(FONTS_TERMINUS_12X24_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_12X24_ISO8859_1=$(FONTS_TERMINUS_BOLD_12X24_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_14X28_ISO8859_1=$(FONTS_TERMINUS_14X28_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_14X28_ISO8859_1=$(FONTS_TERMINUS_BOLD_14X28_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_16X32_ISO8859_1=$(FONTS_TERMINUS_16X32_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_BOLD_16X32_ISO8859_1=$(FONTS_TERMINUS_BOLD_16X32_ISO8859_1) \
|
||||
-DFONTS_TERMINUS_6X12_KOI8_R=$(FONTS_TERMINUS_6X12_KOI8_R) \
|
||||
-DFONTS_TERMINUS_8X14_KOI8_R=$(FONTS_TERMINUS_8X14_KOI8_R) \
|
||||
-DFONTS_TERMINUS_BOLD_8X14_KOI8_R=$(FONTS_TERMINUS_BOLD_8X14_KOI8_R) \
|
||||
-DFONTS_TERMINUS_14X28_KOI8_R=$(FONTS_TERMINUS_14X28_KOI8_R) \
|
||||
-DFONTS_TERMINUS_BOLD_14X28_KOI8_R=$(FONTS_TERMINUS_BOLD_14X28_KOI8_R) \
|
||||
-DFONTS_TERMINUS_16X32_KOI8_R=$(FONTS_TERMINUS_16X32_KOI8_R) \
|
||||
-DFONTS_TERMINUS_BOLD_16X32_KOI8_R=$(FONTS_TERMINUS_BOLD_16X32_KOI8_R)
|
||||
|
||||
$(eval $(call component_compile_rules,fonts))
|
993
extras/fonts/data/font_bitocra_4x7_ascii.h
Normal file
993
extras/fonts/data/font_bitocra_4x7_ascii.h
Normal file
|
@ -0,0 +1,993 @@
|
|||
/**
|
||||
* This file contains generated binary font data.
|
||||
*
|
||||
* Font: BitOCRA
|
||||
* Size: 4x7
|
||||
* Charset: ASCII
|
||||
* 96 characters (32..127)
|
||||
*
|
||||
* Copyright (c) 2011, Aaron Christianson <ninjaaron@gmail.com> (https://github.com/ninjaaron)
|
||||
* Licensed under the OFL v1.1
|
||||
*
|
||||
* Generated: Mon Dec 12 00:46:53 2016
|
||||
*/
|
||||
#ifndef _EXTRAS_FONTS_FONT_BITOCRA_4X7_ASCII_H_
|
||||
#define _EXTRAS_FONTS_FONT_BITOCRA_4X7_ASCII_H_
|
||||
|
||||
static const uint8_t _fonts_bitocra_4x7_ascii_bitmaps[] = {
|
||||
|
||||
/* Index: 0x00, char: \x20, offset: 0x0000 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x01, char: \x21, offset: 0x0007 */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x02, char: \x22, offset: 0x000e */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x03, char: \x23, offset: 0x0015 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x04, char: \x24, offset: 0x001c */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0xc0, /* ##...... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
|
||||
/* Index: 0x05, char: \x25, offset: 0x0023 */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x80, /* #....... */
|
||||
0x20, /* ..#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x06, char: \x26, offset: 0x002a */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0x50, /* .#.#.... */
|
||||
0xa0, /* #.#..... */
|
||||
0x50, /* .#.#.... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x07, char: \x27, offset: 0x0031 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x08, char: \x28, offset: 0x0038 */
|
||||
0x00, /* ........ */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x20, /* ..#..... */
|
||||
|
||||
/* Index: 0x09, char: \x29, offset: 0x003f */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
|
||||
/* Index: 0x0a, char: \x2a, offset: 0x0046 */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x0b, char: \x2b, offset: 0x004d */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x0c, char: \x2c, offset: 0x0054 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
|
||||
/* Index: 0x0d, char: \x2d, offset: 0x005b */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x0e, char: \x2e, offset: 0x0062 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x0f, char: \x2f, offset: 0x0069 */
|
||||
0x00, /* ........ */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
|
||||
/* Index: 0x10, char: \x30, offset: 0x0070 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x11, char: \x31, offset: 0x0077 */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x12, char: \x32, offset: 0x007e */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x13, char: \x33, offset: 0x0085 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x14, char: \x34, offset: 0x008c */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x15, char: \x35, offset: 0x0093 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x16, char: \x36, offset: 0x009a */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x17, char: \x37, offset: 0x00a1 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x18, char: \x38, offset: 0x00a8 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x60, /* .##..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x19, char: \x39, offset: 0x00af */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x60, /* .##..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x1a, char: \x3a, offset: 0x00b6 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x1b, char: \x3b, offset: 0x00bd */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
|
||||
/* Index: 0x1c, char: \x3c, offset: 0x00c4 */
|
||||
0x00, /* ........ */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x80, /* #....... */
|
||||
0x40, /* .#...... */
|
||||
0x20, /* ..#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x1d, char: \x3d, offset: 0x00cb */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x1e, char: \x3e, offset: 0x00d2 */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0x40, /* .#...... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x1f, char: \x3f, offset: 0x00d9 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
|
||||
/* Index: 0x20, char: \x40, offset: 0x00e0 */
|
||||
0x00, /* ........ */
|
||||
0xf0, /* ####.... */
|
||||
0x90, /* #..#.... */
|
||||
0x50, /* .#.#.... */
|
||||
0xd0, /* ##.#.... */
|
||||
0xf0, /* ####.... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x21, char: \x41, offset: 0x00e7 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x22, char: \x42, offset: 0x00ee */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0xc0, /* ##...... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x23, char: \x43, offset: 0x00f5 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x24, char: \x44, offset: 0x00fc */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x25, char: \x45, offset: 0x0103 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0xc0, /* ##...... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x26, char: \x46, offset: 0x010a */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0xc0, /* ##...... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x27, char: \x47, offset: 0x0111 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x28, char: \x48, offset: 0x0118 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x29, char: \x49, offset: 0x011f */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2a, char: \x4a, offset: 0x0126 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2b, char: \x4b, offset: 0x012d */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2c, char: \x4c, offset: 0x0134 */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2d, char: \x4d, offset: 0x013b */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2e, char: \x4e, offset: 0x0142 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x2f, char: \x4f, offset: 0x0149 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x30, char: \x50, offset: 0x0150 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x31, char: \x51, offset: 0x0157 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0x60, /* .##..... */
|
||||
|
||||
/* Index: 0x32, char: \x52, offset: 0x015e */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x33, char: \x53, offset: 0x0165 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x34, char: \x54, offset: 0x016c */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x35, char: \x55, offset: 0x0173 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x36, char: \x56, offset: 0x017a */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x37, char: \x57, offset: 0x0181 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x38, char: \x58, offset: 0x0188 */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x40, /* .#...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x39, char: \x59, offset: 0x018f */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x3a, char: \x5a, offset: 0x0196 */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x40, /* .#...... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x3b, char: \x5b, offset: 0x019d */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xc0, /* ##...... */
|
||||
0xc0, /* ##...... */
|
||||
0xc0, /* ##...... */
|
||||
0xc0, /* ##...... */
|
||||
0xe0, /* ###..... */
|
||||
|
||||
/* Index: 0x3c, char: \x5c, offset: 0x01a4 */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
|
||||
/* Index: 0x3d, char: \x5d, offset: 0x01ab */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x60, /* .##..... */
|
||||
0x60, /* .##..... */
|
||||
0x60, /* .##..... */
|
||||
0x60, /* .##..... */
|
||||
0xe0, /* ###..... */
|
||||
|
||||
/* Index: 0x3e, char: \x5e, offset: 0x01b2 */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x3f, char: \x5f, offset: 0x01b9 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xf0, /* ####.... */
|
||||
|
||||
/* Index: 0x40, char: \x60, offset: 0x01c0 */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x41, char: \x61, offset: 0x01c7 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x42, char: \x62, offset: 0x01ce */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x43, char: \x63, offset: 0x01d5 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x44, char: \x64, offset: 0x01dc */
|
||||
0x00, /* ........ */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x45, char: \x65, offset: 0x01e3 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x46, char: \x66, offset: 0x01ea */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x47, char: \x67, offset: 0x01f1 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
|
||||
/* Index: 0x48, char: \x68, offset: 0x01f8 */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x49, char: \x69, offset: 0x01ff */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x4a, char: \x6a, offset: 0x0206 */
|
||||
0x20, /* ..#..... */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
|
||||
/* Index: 0x4b, char: \x6b, offset: 0x020d */
|
||||
0x00, /* ........ */
|
||||
0x80, /* #....... */
|
||||
0xa0, /* #.#..... */
|
||||
0xc0, /* ##...... */
|
||||
0xc0, /* ##...... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x4c, char: \x6c, offset: 0x0214 */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x60, /* .##..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x4d, char: \x6d, offset: 0x021b */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x4e, char: \x6e, offset: 0x0222 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x4f, char: \x6f, offset: 0x0229 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x50, char: \x70, offset: 0x0230 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
|
||||
/* Index: 0x51, char: \x71, offset: 0x0237 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0x20, /* ..#..... */
|
||||
|
||||
/* Index: 0x52, char: \x72, offset: 0x023e */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x53, char: \x73, offset: 0x0245 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x60, /* .##..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x54, char: \x74, offset: 0x024c */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x60, /* .##..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x60, /* .##..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x55, char: \x75, offset: 0x0253 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x56, char: \x76, offset: 0x025a */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x57, char: \x77, offset: 0x0261 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x58, char: \x78, offset: 0x0268 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0x40, /* .#...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x59, char: \x79, offset: 0x026f */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
|
||||
/* Index: 0x5a, char: \x7a, offset: 0x0276 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0xe0, /* ###..... */
|
||||
0x60, /* .##..... */
|
||||
0xc0, /* ##...... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x5b, char: \x7b, offset: 0x027d */
|
||||
0x00, /* ........ */
|
||||
0x60, /* .##..... */
|
||||
0x40, /* .#...... */
|
||||
0xc0, /* ##...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x60, /* .##..... */
|
||||
|
||||
/* Index: 0x5c, char: \x7c, offset: 0x0284 */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x5d, char: \x7d, offset: 0x028b */
|
||||
0x00, /* ........ */
|
||||
0xc0, /* ##...... */
|
||||
0x40, /* .#...... */
|
||||
0x60, /* .##..... */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0xc0, /* ##...... */
|
||||
|
||||
/* Index: 0x5e, char: \x7e, offset: 0x0292 */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
0x20, /* ..#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x80, /* #....... */
|
||||
0x00, /* ........ */
|
||||
0x00, /* ........ */
|
||||
|
||||
/* Index: 0x5f, char: \x7f, offset: 0x0299 */
|
||||
0x00, /* ........ */
|
||||
0x40, /* .#...... */
|
||||
0x40, /* .#...... */
|
||||
0xa0, /* #.#..... */
|
||||
0xa0, /* #.#..... */
|
||||
0xe0, /* ###..... */
|
||||
0x00, /* ........ */
|
||||
};
|
||||
|
||||
const font_char_desc_t _fonts_bitocra_4x7_ascii_descriptors[] = {
|
||||
{ 0x04, 0x0000 }, /* Index: 0x00, char: \x20 */
|
||||
{ 0x04, 0x0007 }, /* Index: 0x01, char: \x21 */
|
||||
{ 0x04, 0x000e }, /* Index: 0x02, char: \x22 */
|
||||
{ 0x04, 0x0015 }, /* Index: 0x03, char: \x23 */
|
||||
{ 0x04, 0x001c }, /* Index: 0x04, char: \x24 */
|
||||
{ 0x04, 0x0023 }, /* Index: 0x05, char: \x25 */
|
||||
{ 0x04, 0x002a }, /* Index: 0x06, char: \x26 */
|
||||
{ 0x04, 0x0031 }, /* Index: 0x07, char: \x27 */
|
||||
{ 0x04, 0x0038 }, /* Index: 0x08, char: \x28 */
|
||||
{ 0x04, 0x003f }, /* Index: 0x09, char: \x29 */
|
||||
{ 0x04, 0x0046 }, /* Index: 0x0a, char: \x2a */
|
||||
{ 0x04, 0x004d }, /* Index: 0x0b, char: \x2b */
|
||||
{ 0x04, 0x0054 }, /* Index: 0x0c, char: \x2c */
|
||||
{ 0x04, 0x005b }, /* Index: 0x0d, char: \x2d */
|
||||
{ 0x04, 0x0062 }, /* Index: 0x0e, char: \x2e */
|
||||
{ 0x04, 0x0069 }, /* Index: 0x0f, char: \x2f */
|
||||
{ 0x04, 0x0070 }, /* Index: 0x10, char: \x30 */
|
||||
{ 0x04, 0x0077 }, /* Index: 0x11, char: \x31 */
|
||||
{ 0x04, 0x007e }, /* Index: 0x12, char: \x32 */
|
||||
{ 0x04, 0x0085 }, /* Index: 0x13, char: \x33 */
|
||||
{ 0x04, 0x008c }, /* Index: 0x14, char: \x34 */
|
||||
{ 0x04, 0x0093 }, /* Index: 0x15, char: \x35 */
|
||||
{ 0x04, 0x009a }, /* Index: 0x16, char: \x36 */
|
||||
{ 0x04, 0x00a1 }, /* Index: 0x17, char: \x37 */
|
||||
{ 0x04, 0x00a8 }, /* Index: 0x18, char: \x38 */
|
||||
{ 0x04, 0x00af }, /* Index: 0x19, char: \x39 */
|
||||
{ 0x04, 0x00b6 }, /* Index: 0x1a, char: \x3a */
|
||||
{ 0x04, 0x00bd }, /* Index: 0x1b, char: \x3b */
|
||||
{ 0x04, 0x00c4 }, /* Index: 0x1c, char: \x3c */
|
||||
{ 0x04, 0x00cb }, /* Index: 0x1d, char: \x3d */
|
||||
{ 0x04, 0x00d2 }, /* Index: 0x1e, char: \x3e */
|
||||
{ 0x04, 0x00d9 }, /* Index: 0x1f, char: \x3f */
|
||||
{ 0x04, 0x00e0 }, /* Index: 0x20, char: \x40 */
|
||||
{ 0x04, 0x00e7 }, /* Index: 0x21, char: \x41 */
|
||||
{ 0x04, 0x00ee }, /* Index: 0x22, char: \x42 */
|
||||
{ 0x04, 0x00f5 }, /* Index: 0x23, char: \x43 */
|
||||
{ 0x04, 0x00fc }, /* Index: 0x24, char: \x44 */
|
||||
{ 0x04, 0x0103 }, /* Index: 0x25, char: \x45 */
|
||||
{ 0x04, 0x010a }, /* Index: 0x26, char: \x46 */
|
||||
{ 0x04, 0x0111 }, /* Index: 0x27, char: \x47 */
|
||||
{ 0x04, 0x0118 }, /* Index: 0x28, char: \x48 */
|
||||
{ 0x04, 0x011f }, /* Index: 0x29, char: \x49 */
|
||||
{ 0x04, 0x0126 }, /* Index: 0x2a, char: \x4a */
|
||||
{ 0x04, 0x012d }, /* Index: 0x2b, char: \x4b */
|
||||
{ 0x04, 0x0134 }, /* Index: 0x2c, char: \x4c */
|
||||
{ 0x04, 0x013b }, /* Index: 0x2d, char: \x4d */
|
||||
{ 0x04, 0x0142 }, /* Index: 0x2e, char: \x4e */
|
||||
{ 0x04, 0x0149 }, /* Index: 0x2f, char: \x4f */
|
||||
{ 0x04, 0x0150 }, /* Index: 0x30, char: \x50 */
|
||||
{ 0x04, 0x0157 }, /* Index: 0x31, char: \x51 */
|
||||
{ 0x04, 0x015e }, /* Index: 0x32, char: \x52 */
|
||||
{ 0x04, 0x0165 }, /* Index: 0x33, char: \x53 */
|
||||
{ 0x04, 0x016c }, /* Index: 0x34, char: \x54 */
|
||||
{ 0x04, 0x0173 }, /* Index: 0x35, char: \x55 */
|
||||
{ 0x04, 0x017a }, /* Index: 0x36, char: \x56 */
|
||||
{ 0x04, 0x0181 }, /* Index: 0x37, char: \x57 */
|
||||
{ 0x04, 0x0188 }, /* Index: 0x38, char: \x58 */
|
||||
{ 0x04, 0x018f }, /* Index: 0x39, char: \x59 */
|
||||
{ 0x04, 0x0196 }, /* Index: 0x3a, char: \x5a */
|
||||
{ 0x04, 0x019d }, /* Index: 0x3b, char: \x5b */
|
||||
{ 0x04, 0x01a4 }, /* Index: 0x3c, char: \x5c */
|
||||
{ 0x04, 0x01ab }, /* Index: 0x3d, char: \x5d */
|
||||
{ 0x04, 0x01b2 }, /* Index: 0x3e, char: \x5e */
|
||||
{ 0x04, 0x01b9 }, /* Index: 0x3f, char: \x5f */
|
||||
{ 0x04, 0x01c0 }, /* Index: 0x40, char: \x60 */
|
||||
{ 0x04, 0x01c7 }, /* Index: 0x41, char: \x61 */
|
||||
{ 0x04, 0x01ce }, /* Index: 0x42, char: \x62 */
|
||||
{ 0x04, 0x01d5 }, /* Index: 0x43, char: \x63 */
|
||||
{ 0x04, 0x01dc }, /* Index: 0x44, char: \x64 */
|
||||
{ 0x04, 0x01e3 }, /* Index: 0x45, char: \x65 */
|
||||
{ 0x04, 0x01ea }, /* Index: 0x46, char: \x66 */
|
||||
{ 0x04, 0x01f1 }, /* Index: 0x47, char: \x67 */
|
||||
{ 0x04, 0x01f8 }, /* Index: 0x48, char: \x68 */
|
||||
{ 0x04, 0x01ff }, /* Index: 0x49, char: \x69 */
|
||||
{ 0x04, 0x0206 }, /* Index: 0x4a, char: \x6a */
|
||||
{ 0x04, 0x020d }, /* Index: 0x4b, char: \x6b */
|
||||
{ 0x04, 0x0214 }, /* Index: 0x4c, char: \x6c */
|
||||
{ 0x04, 0x021b }, /* Index: 0x4d, char: \x6d */
|
||||
{ 0x04, 0x0222 }, /* Index: 0x4e, char: \x6e */
|
||||
{ 0x04, 0x0229 }, /* Index: 0x4f, char: \x6f */
|
||||
{ 0x04, 0x0230 }, /* Index: 0x50, char: \x70 */
|
||||
{ 0x04, 0x0237 }, /* Index: 0x51, char: \x71 */
|
||||
{ 0x04, 0x023e }, /* Index: 0x52, char: \x72 */
|
||||
{ 0x04, 0x0245 }, /* Index: 0x53, char: \x73 */
|
||||
{ 0x04, 0x024c }, /* Index: 0x54, char: \x74 */
|
||||
{ 0x04, 0x0253 }, /* Index: 0x55, char: \x75 */
|
||||
{ 0x04, 0x025a }, /* Index: 0x56, char: \x76 */
|
||||
{ 0x04, 0x0261 }, /* Index: 0x57, char: \x77 */
|
||||
{ 0x04, 0x0268 }, /* Index: 0x58, char: \x78 */
|
||||
{ 0x04, 0x026f }, /* Index: 0x59, char: \x79 */
|
||||
{ 0x04, 0x0276 }, /* Index: 0x5a, char: \x7a */
|
||||
{ 0x04, 0x027d }, /* Index: 0x5b, char: \x7b */
|
||||
{ 0x04, 0x0284 }, /* Index: 0x5c, char: \x7c */
|
||||
{ 0x04, 0x028b }, /* Index: 0x5d, char: \x7d */
|
||||
{ 0x04, 0x0292 }, /* Index: 0x5e, char: \x7e */
|
||||
{ 0x04, 0x0299 }, /* Index: 0x5f, char: \x7f */
|
||||
};
|
||||
|
||||
const font_info_t _fonts_bitocra_4x7_ascii_info =
|
||||
{
|
||||
.height = 7, /* Character height */
|
||||
.c = 0, /* C */
|
||||
.char_start = 32, /* Start character */
|
||||
.char_end = 127, /* End character */
|
||||
.char_descriptors = _fonts_bitocra_4x7_ascii_descriptors, /* Character descriptor array */
|
||||
.bitmap = _fonts_bitocra_4x7_ascii_bitmaps, /* Character bitmap array */
|
||||
};
|
||||
|
||||
#endif /* _EXTRAS_FONTS_FONT_BITOCRA_4X7_ASCII_H_ */
|
3169
extras/fonts/data/font_bitocra_6x11_iso8859_1.h
Normal file
3169
extras/fonts/data/font_bitocra_6x11_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
3617
extras/fonts/data/font_bitocra_7x13_iso8859_1.h
Normal file
3617
extras/fonts/data/font_bitocra_7x13_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
2624
extras/fonts/data/font_glcd_5x7.h
Normal file
2624
extras/fonts/data/font_glcd_5x7.h
Normal file
File diff suppressed because it is too large
Load diff
1630
extras/fonts/data/font_roboto_10pt.h
Normal file
1630
extras/fonts/data/font_roboto_10pt.h
Normal file
File diff suppressed because it is too large
Load diff
1348
extras/fonts/data/font_roboto_8pt.h
Normal file
1348
extras/fonts/data/font_roboto_8pt.h
Normal file
File diff suppressed because it is too large
Load diff
5389
extras/fonts/data/font_terminus_10x18_iso8859_1.h
Normal file
5389
extras/fonts/data/font_terminus_10x18_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
6409
extras/fonts/data/font_terminus_11x22_iso8859_1.h
Normal file
6409
extras/fonts/data/font_terminus_11x22_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
6919
extras/fonts/data/font_terminus_12x24_iso8859_1.h
Normal file
6919
extras/fonts/data/font_terminus_12x24_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
7939
extras/fonts/data/font_terminus_14x28_iso8859_1.h
Normal file
7939
extras/fonts/data/font_terminus_14x28_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
7939
extras/fonts/data/font_terminus_14x28_koi8_r.h
Normal file
7939
extras/fonts/data/font_terminus_14x28_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
8959
extras/fonts/data/font_terminus_16x32_iso8859_1.h
Normal file
8959
extras/fonts/data/font_terminus_16x32_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
8959
extras/fonts/data/font_terminus_16x32_koi8_r.h
Normal file
8959
extras/fonts/data/font_terminus_16x32_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
3859
extras/fonts/data/font_terminus_6x12_iso8859_1.h
Normal file
3859
extras/fonts/data/font_terminus_6x12_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
3859
extras/fonts/data/font_terminus_6x12_koi8_r.h
Normal file
3859
extras/fonts/data/font_terminus_6x12_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
4369
extras/fonts/data/font_terminus_8x14_iso8859_1.h
Normal file
4369
extras/fonts/data/font_terminus_8x14_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
4369
extras/fonts/data/font_terminus_8x14_koi8_r.h
Normal file
4369
extras/fonts/data/font_terminus_8x14_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
5389
extras/fonts/data/font_terminus_bold_10x18_iso8859_1.h
Normal file
5389
extras/fonts/data/font_terminus_bold_10x18_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
6409
extras/fonts/data/font_terminus_bold_11x22_iso8859_1.h
Normal file
6409
extras/fonts/data/font_terminus_bold_11x22_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
6919
extras/fonts/data/font_terminus_bold_12x24_iso8859_1.h
Normal file
6919
extras/fonts/data/font_terminus_bold_12x24_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
7939
extras/fonts/data/font_terminus_bold_14x28_iso8859_1.h
Normal file
7939
extras/fonts/data/font_terminus_bold_14x28_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
7939
extras/fonts/data/font_terminus_bold_14x28_koi8_r.h
Normal file
7939
extras/fonts/data/font_terminus_bold_14x28_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
8959
extras/fonts/data/font_terminus_bold_16x32_iso8859_1.h
Normal file
8959
extras/fonts/data/font_terminus_bold_16x32_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
8959
extras/fonts/data/font_terminus_bold_16x32_koi8_r.h
Normal file
8959
extras/fonts/data/font_terminus_bold_16x32_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
4369
extras/fonts/data/font_terminus_bold_8x14_iso8859_1.h
Normal file
4369
extras/fonts/data/font_terminus_bold_8x14_iso8859_1.h
Normal file
File diff suppressed because it is too large
Load diff
4369
extras/fonts/data/font_terminus_bold_8x14_koi8_r.h
Normal file
4369
extras/fonts/data/font_terminus_bold_8x14_koi8_r.h
Normal file
File diff suppressed because it is too large
Load diff
39
extras/fonts/defaults.mk
Normal file
39
extras/fonts/defaults.mk
Normal file
|
@ -0,0 +1,39 @@
|
|||
#########################################
|
||||
# Default built-in fonts
|
||||
#########################################
|
||||
|
||||
# FIXME
|
||||
|
||||
FONTS_GLCD_5X7 ?= 1
|
||||
|
||||
FONTS_ROBOTO_8PT ?= 0
|
||||
FONTS_ROBOTO_10PT ?= 0
|
||||
|
||||
# BitOCRA
|
||||
FONTS_BITOCRA_4X7 ?= 0
|
||||
FONTS_BITOCRA_6X11 ?= 0
|
||||
FONTS_BITOCRA_7X13 ?= 0
|
||||
|
||||
# Terminus, ISO8859-1 (Latin-1)
|
||||
FONTS_TERMINUS_6X12_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_8X14_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_8X14_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_10X18_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_10X18_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_11X22_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_11X22_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_12X24_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_12X24_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_14X28_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_14X28_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_16X32_ISO8859_1 ?= 0
|
||||
FONTS_TERMINUS_BOLD_16X32_ISO8859_1 ?= 0
|
||||
|
||||
# Terminus, KOI8-R
|
||||
FONTS_TERMINUS_6X12_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_8X14_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_BOLD_8X14_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_14X28_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_BOLD_14X28_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_16X32_KOI8_R ?= 0
|
||||
FONTS_TERMINUS_BOLD_16X32_KOI8_R ?= 0
|
259
extras/fonts/fonts.c
Normal file
259
extras/fonts/fonts.c
Normal file
|
@ -0,0 +1,259 @@
|
|||
/**
|
||||
* LCD/OLED fonts library
|
||||
*
|
||||
* FIXME: License?
|
||||
*
|
||||
* @date: 8 dec. 2016
|
||||
* Author: zaltora
|
||||
*/
|
||||
#include "fonts.h"
|
||||
|
||||
#ifndef FONTS_GLCD_5X7
|
||||
#define FONTS_GLCD_5X7 1
|
||||
#endif
|
||||
|
||||
#if FONTS_GLCD_5X7
|
||||
#include "data/font_glcd_5x7.h"
|
||||
#endif
|
||||
|
||||
#if FONTS_ROBOTO_8PT
|
||||
#include "data/font_roboto_8pt.h"
|
||||
#endif
|
||||
#if FONTS_ROBOTO_10PT
|
||||
#include "data/font_roboto_10pt.h"
|
||||
#endif
|
||||
|
||||
#if FONTS_BITOCRA_4X7
|
||||
#include "data/font_bitocra_4x7_ascii.h"
|
||||
#endif
|
||||
#if FONTS_BITOCRA_6X11
|
||||
#include "data/font_bitocra_6x11_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_BITOCRA_7X13
|
||||
#include "data/font_bitocra_7x13_iso8859_1.h"
|
||||
#endif
|
||||
|
||||
#if FONTS_TERMINUS_6X12_ISO8859_1
|
||||
#include "data/font_terminus_6x12_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_8X14_ISO8859_1
|
||||
#include "data/font_terminus_8x14_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_8X14_ISO8859_1
|
||||
#include "data/font_terminus_bold_8x14_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_10X18_ISO8859_1
|
||||
#include "data/font_terminus_10x18_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_10X18_ISO8859_1
|
||||
#include "data/font_terminus_bold_10x18_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_11X22_ISO8859_1
|
||||
#include "data/font_terminus_11x22_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_11X22_ISO8859_1
|
||||
#include "data/font_terminus_bold_11x22_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_12X24_ISO8859_1
|
||||
#include "data/font_terminus_12x24_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_12X24_ISO8859_1
|
||||
#include "data/font_terminus_bold_12x24_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_14X28_ISO8859_1
|
||||
#include "data/font_terminus_14x28_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_14X28_ISO8859_1
|
||||
#include "data/font_terminus_bold_14x28_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_16X32_ISO8859_1
|
||||
#include "data/font_terminus_16x32_iso8859_1.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_16X32_ISO8859_1
|
||||
#include "data/font_terminus_bold_16x32_iso8859_1.h"
|
||||
#endif
|
||||
|
||||
#if FONTS_TERMINUS_6X12_KOI8_R
|
||||
#include "data/font_terminus_6x12_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_8X14_KOI8_R
|
||||
#include "data/font_terminus_8x14_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_8X14_KOI8_R
|
||||
#include "data/font_terminus_bold_8x14_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_14X28_KOI8_R
|
||||
#include "data/font_terminus_14x28_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_14X28_KOI8_R
|
||||
#include "data/font_terminus_bold_14x28_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_16X32_KOI8_R
|
||||
#include "data/font_terminus_16x32_koi8_r.h"
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_16X32_KOI8_R
|
||||
#include "data/font_terminus_bold_16x32_koi8_r.h"
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
// FIXME: this declaration is noisy
|
||||
|
||||
const font_info_t *font_builtin_fonts[] =
|
||||
{
|
||||
#if FONTS_GLCD_5X7
|
||||
[FONT_FACE_GLCD5x7] = &_fonts_glcd_5x7_info,
|
||||
#else
|
||||
[FONT_FACE_GLCD5x7] = NULL,
|
||||
#endif
|
||||
|
||||
#if FONTS_ROBOTO_8PT
|
||||
[FONT_FACE_ROBOTO_8PT] = &_fonts_roboto_8pt_info,
|
||||
#else
|
||||
[FONT_FACE_ROBOTO_8PT] = NULL,
|
||||
#endif
|
||||
#if FONTS_ROBOTO_10PT
|
||||
[FONT_FACE_ROBOTO_10PT] = &_fonts_roboto_10pt_info,
|
||||
#else
|
||||
[FONT_FACE_ROBOTO_10PT] = NULL,
|
||||
#endif
|
||||
|
||||
#if FONTS_BITOCRA_4X7
|
||||
[FONT_FACE_BITOCRA_4X7] = &_fonts_bitocra_4x7_ascii_info,
|
||||
#else
|
||||
[FONT_FACE_BITOCRA_4X7] = NULL,
|
||||
#endif
|
||||
#if FONTS_BITOCRA_6X11
|
||||
[FONT_FACE_BITOCRA_6X11] = &_fonts_bitocra_6x11_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_BITOCRA_6X11] = NULL,
|
||||
#endif
|
||||
#if FONTS_BITOCRA_7X13
|
||||
[FONT_FACE_BITOCRA_7X13] = &_fonts_bitocra_7x13_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_BITOCRA_7X13] = NULL,
|
||||
#endif
|
||||
|
||||
#if FONTS_TERMINUS_6X12_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_6X12_ISO8859_1] = &_fonts_terminus_6x12_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_6X12_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_8X14_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_8X14_ISO8859_1] = &_fonts_terminus_8x14_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_8X14_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_8X14_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_8X14_ISO8859_1] = &_fonts_terminus_bold_8x14_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_8X14_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_10X18_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_10X18_ISO8859_1] = &_fonts_terminus_10x18_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_10X18_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_10X18_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_10X18_ISO8859_1] = &_fonts_terminus_bold_10x18_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_10X18_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_11X22_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_11X22_ISO8859_1] = &_fonts_terminus_11x22_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_11X22_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_11X22_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_11X22_ISO8859_1] = &_fonts_terminus_bold_11x22_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_11X22_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_12X24_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_12X24_ISO8859_1] = &_fonts_terminus_12x24_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_12X24_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_12X24_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_12X24_ISO8859_1] = &_fonts_terminus_bold_12x24_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_12X24_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_14X28_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_14X28_ISO8859_1] = &_fonts_terminus_14x28_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_14X28_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_14X28_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_14X28_ISO8859_1] = &_fonts_terminus_bold_14x28_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_14X28_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_16X32_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_16X32_ISO8859_1] = &_fonts_terminus_16x32_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_16X32_ISO8859_1] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_16X32_ISO8859_1
|
||||
[FONT_FACE_TERMINUS_BOLD_16X32_ISO8859_1] = &_fonts_terminus_bold_16x32_iso8859_1_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_16X32_ISO8859_1] = NULL,
|
||||
#endif
|
||||
|
||||
#if FONTS_TERMINUS_6X12_KOI8_R
|
||||
[FONT_FACE_TERMINUS_6X12_KOI8_R] = &_fonts_terminus_6x12_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_6X12_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_8X14_KOI8_R
|
||||
[FONT_FACE_TERMINUS_8X14_KOI8_R] = &_fonts_terminus_8x14_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_8X14_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_8X14_KOI8_R
|
||||
[FONT_FACE_TERMINUS_BOLD_8X14_KOI8_R] = &_fonts_terminus_bold_8x14_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_8X14_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_14X28_KOI8_R
|
||||
[FONT_FACE_TERMINUS_14X28_KOI8_R] = &_fonts_terminus_14x28_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_14X28_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_14X28_KOI8_R
|
||||
[FONT_FACE_TERMINUS_BOLD_14X28_KOI8_R] = &_fonts_terminus_bold_14x28_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_14X28_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_16X32_KOI8_R
|
||||
[FONT_FACE_TERMINUS_16X32_KOI8_R] = &_fonts_terminus_16x32_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_16X32_KOI8_R] = NULL,
|
||||
#endif
|
||||
#if FONTS_TERMINUS_BOLD_16X32_KOI8_R
|
||||
[FONT_FACE_TERMINUS_BOLD_16X32_KOI8_R] = &_fonts_terminus_bold_16x32_koi8_r_info,
|
||||
#else
|
||||
[FONT_FACE_TERMINUS_BOLD_16X32_KOI8_R] = NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t font_builtin_fonts_count = (sizeof(font_builtin_fonts) / sizeof(font_info_t *));
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
uint16_t font_measure_string(const font_info_t *fnt, const char *s)
|
||||
{
|
||||
if (!s || !fnt) return 0;
|
||||
|
||||
uint16_t res = 0;
|
||||
while (*s)
|
||||
{
|
||||
const font_char_desc_t *d = font_get_char_desc(fnt, *s);
|
||||
if (d)
|
||||
res += d->width + fnt->c;
|
||||
s++;
|
||||
}
|
||||
|
||||
return res > 0 ? res - fnt->c : 0;
|
||||
}
|
||||
|
105
extras/fonts/fonts.h
Normal file
105
extras/fonts/fonts.h
Normal file
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
* LCD/OLED fonts library
|
||||
*
|
||||
* Copyright (c) 2016 Ruslan V. Uss (https://github.com/UncleRus),
|
||||
* Zaltora (https://github.com/Zaltora)
|
||||
* MIT Licensed as described in the file LICENSE
|
||||
*/
|
||||
#ifndef _EXTRAS_FONTS_H_
|
||||
#define _EXTRAS_FONTS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FONT_FACE_GLCD5x7 = 0,
|
||||
|
||||
FONT_FACE_ROBOTO_8PT,
|
||||
FONT_FACE_ROBOTO_10PT,
|
||||
|
||||
FONT_FACE_BITOCRA_4X7,
|
||||
FONT_FACE_BITOCRA_6X11,
|
||||
FONT_FACE_BITOCRA_7X13,
|
||||
|
||||
FONT_FACE_TERMINUS_6X12_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_8X14_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_8X14_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_10X18_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_10X18_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_11X22_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_11X22_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_12X24_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_12X24_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_14X28_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_14X28_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_16X32_ISO8859_1,
|
||||
FONT_FACE_TERMINUS_BOLD_16X32_ISO8859_1,
|
||||
|
||||
FONT_FACE_TERMINUS_6X12_KOI8_R,
|
||||
FONT_FACE_TERMINUS_8X14_KOI8_R,
|
||||
FONT_FACE_TERMINUS_BOLD_8X14_KOI8_R,
|
||||
FONT_FACE_TERMINUS_14X28_KOI8_R,
|
||||
FONT_FACE_TERMINUS_BOLD_14X28_KOI8_R,
|
||||
FONT_FACE_TERMINUS_16X32_KOI8_R,
|
||||
FONT_FACE_TERMINUS_BOLD_16X32_KOI8_R,
|
||||
} font_face_t;
|
||||
|
||||
/**
|
||||
* Character descriptor
|
||||
*/
|
||||
typedef struct _font_char_desc
|
||||
{
|
||||
uint8_t width; ///< Character width in pixel
|
||||
uint16_t offset; ///< Offset of this character in bitmap
|
||||
} font_char_desc_t;
|
||||
|
||||
/**
|
||||
* Font information
|
||||
*/
|
||||
typedef struct _font_info
|
||||
{
|
||||
uint8_t height; ///< Character height in pixel, all characters have same height
|
||||
uint8_t c; ///< Simulation of "C" width in TrueType term, the space between adjacent characters
|
||||
char char_start; ///< First character
|
||||
char char_end; ///< Last character
|
||||
const font_char_desc_t *char_descriptors; ///< descriptor for each character
|
||||
const uint8_t *bitmap; ///< Character bitmap
|
||||
} font_info_t;
|
||||
|
||||
/**
|
||||
* Built-in fonts
|
||||
*/
|
||||
extern const font_info_t *font_builtin_fonts[];
|
||||
extern const size_t font_builtin_fonts_count;
|
||||
|
||||
/**
|
||||
* Find character decriptor in font
|
||||
* @param fnt Poniter to font information struct
|
||||
* @param c Character
|
||||
* @return Character descriptor or NULL if no character found
|
||||
*/
|
||||
inline const font_char_desc_t *font_get_char_desc(const font_info_t *fnt, char c)
|
||||
{
|
||||
return c < fnt->char_start || c > fnt->char_end
|
||||
? NULL
|
||||
: fnt->char_descriptors + c - fnt->char_start;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate width of string in pixels
|
||||
* @param fnt Poniter to font information struct
|
||||
* @param s String
|
||||
* @return String width
|
||||
*/
|
||||
uint16_t font_measure_string(const font_info_t *fnt, const char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EXTRAS_FONTS_H_ */
|
90
extras/fonts/tools/create_font.py
Executable file
90
extras/fonts/tools/create_font.py
Executable file
|
@ -0,0 +1,90 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys, os
|
||||
from PIL import Image, ImageFont, ImageDraw
|
||||
import argparse
|
||||
import jinja2
|
||||
import re
|
||||
import time
|
||||
|
||||
def gen_char(index, c, im):
|
||||
bw = (im.size[0] + 7) // 8
|
||||
res = {
|
||||
'index': index,
|
||||
'code': c,
|
||||
'offset': bw * im.size[1] * index,
|
||||
'rows': []
|
||||
}
|
||||
|
||||
data = tuple(im.getdata())
|
||||
|
||||
for row in range(im.size[1]):
|
||||
r = {
|
||||
'data': [],
|
||||
'asc': [],
|
||||
}
|
||||
for b in range(bw):
|
||||
byte = 0
|
||||
for i in range(8):
|
||||
idx = b * 8 + i
|
||||
bit = data[row * im.size[0] + idx] if idx < im.size[0] else 0
|
||||
if bit:
|
||||
byte |= 1
|
||||
r['asc'].append('#')
|
||||
else:
|
||||
r['asc'].append('.')
|
||||
byte <<= 1
|
||||
r['data'].append(byte >> 1)
|
||||
|
||||
r['asc'] = ''.join(r['asc'])
|
||||
res['rows'].append(r)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def main(args):
|
||||
fnt = ImageFont.load(args.font)
|
||||
size = fnt.getsize('A')
|
||||
|
||||
im = Image.new('RGB', size)
|
||||
draw = ImageDraw.Draw(im)
|
||||
|
||||
if args.last - args.first < 1:
|
||||
raise ValueError('Invalid --first or --last')
|
||||
|
||||
chars = []
|
||||
for idx in range(args.last - args.first + 1):
|
||||
draw.rectangle(((0, 0), size), fill = 0)
|
||||
draw.text((0, 0), chr(idx + args.first), font=fnt)
|
||||
chars.append(gen_char(idx, idx + args.first, im.convert('1')))
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__))), finalize=lambda x: '' if x is None else x)
|
||||
print(env.get_template(args.template).render({
|
||||
'font': {
|
||||
'name': args.name,
|
||||
'size': size,
|
||||
'charset': args.charset,
|
||||
'first': args.first,
|
||||
'last': args.last,
|
||||
},
|
||||
'chars': chars,
|
||||
'created': time.ctime()
|
||||
}))
|
||||
|
||||
|
||||
_CLEAN_RE = re.compile(r'[^a-z0-9_]', re.I)
|
||||
|
||||
def clean_str(s):
|
||||
return _CLEAN_RE.sub('_', s)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser=argparse.ArgumentParser(description='Fixed fonts converter')
|
||||
parser.add_argument('-f', '--font', type=str, required=True, help='PIL font filename')
|
||||
parser.add_argument('-n', '--name', type=clean_str, required=True, help='Font name')
|
||||
parser.add_argument('-c', '--charset', type=clean_str, required=True, help='Charset')
|
||||
parser.add_argument('--first', type=int, help='First character', default=1)
|
||||
parser.add_argument('--last', type=int, help='Last character', default=255)
|
||||
parser.add_argument('-t', '--template', type=str, help='Template filename', default='template.c')
|
||||
main(parser.parse_args(sys.argv[1:]))
|
||||
|
51
extras/fonts/tools/template.c
Normal file
51
extras/fonts/tools/template.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
{%- set header_id -%}
|
||||
_EXTRAS_FONTS_FONT_{{ font.name|upper }}_{{ font.size[0] }}X{{ font.size[1] }}_{{ font.charset|upper }}_H_
|
||||
{%- endset -%}
|
||||
{%- set font_size -%}
|
||||
{{ font.size[0] }}x{{ font.size[1] }}
|
||||
{%- endset -%}
|
||||
{%- set font_prefix -%}
|
||||
_fonts_{{ font.name|lower }}_{{ font_size }}_{{ font.charset|lower }}
|
||||
{%- endset -%}
|
||||
/**
|
||||
* This file contains generated binary font data.
|
||||
*
|
||||
* Font: {{ font.name }}
|
||||
* Size: {{ font_size }}
|
||||
* Charset: {{ font.charset }}
|
||||
* {{ chars|length }} characters ({{ font.first }}..{{ font.last }})
|
||||
*
|
||||
* License: FIXME
|
||||
*
|
||||
* Generated: {{ created }}
|
||||
*/
|
||||
#ifndef {{ header_id }}
|
||||
#define {{ header_id }}
|
||||
|
||||
static const uint8_t {{ font_prefix }}_bitmaps[] = {
|
||||
{%- for char in chars %}
|
||||
|
||||
/* {{ 'Index: 0x%02x, char: \\x%02x, offset: 0x%04x'|format(char.index, char.code, char.offset) }} */
|
||||
{%- for row in char.rows %}
|
||||
{% for byte in row.data %}{{ '0x%02x'|format(byte) }}, {% endfor -%} /* {{ row.asc }} */
|
||||
{%- endfor -%}
|
||||
{%- endfor %}
|
||||
};
|
||||
|
||||
const font_char_desc_t {{ font_prefix }}_descriptors[] = {
|
||||
{%- for char in chars %}
|
||||
{ {{ '0x%02x'|format(font.size[0]) }}, {{ '0x%04x'|format(char.offset) }} }, /* {{ 'Index: 0x%02x, char: \\x%02x'|format(char.index, char.code) }} */
|
||||
{%- endfor %}
|
||||
};
|
||||
|
||||
const font_info_t {{ font_prefix }}_info =
|
||||
{
|
||||
.height = {{ font.size[1] }}, /* Character height */
|
||||
.c = 0, /* C */
|
||||
.char_start = {{ font.first }}, /* Start character */
|
||||
.char_end = {{ font.last }}, /* End character */
|
||||
.char_descriptors = {{ font_prefix }}_descriptors, /* Character descriptor array */
|
||||
.bitmap = {{ font_prefix }}_bitmaps, /* Character bitmap array */
|
||||
};
|
||||
|
||||
#endif /* {{ header_id }} */
|
Loading…
Add table
Add a link
Reference in a new issue