Files reorganization, bitmap fonts convertor tool, style fixes, terminus fonts

Three new fonts
This commit is contained in:
UncleRus 2016-12-10 02:44:50 +05:00
parent 861fe94bd3
commit 02da6d83a7
27 changed files with 8235 additions and 15576 deletions

97
extras/fonts/OFL.txt Normal file
View 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.

View file

@ -1,19 +1,29 @@
# Component makefile for extras/fonts
# expected anyone using bmp driver includes it as 'fonts/fonts.h'
# 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_SRC_DIR = $(fonts_ROOT)
FONTS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# fonts by default
# 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_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_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))

View file

@ -14,6 +14,18 @@
#define FONTS_ROBOTO_10PT 0
#endif
#ifndef FONTS_BITOCRA_4X7
#define FONTS_BITOCRA_4X7 1
#endif
#ifndef FONTS_BITOCRA_6X11
#define FONTS_BITOCRA_6X11 1
#endif
#ifndef FONTS_BITOCRA_7X13
#define FONTS_BITOCRA_7X13 1
#endif
#ifndef FONTS_TERMINUS_6X12_KOI8_R
#define FONTS_TERMINUS_6X12_KOI8_R 1
#endif
@ -26,14 +38,6 @@
#define FONTS_TERMINUS_BOLD_8X14_KOI8_R 1
#endif
#ifndef FONTS_TERMINUS_8X16_KOI8_R
#define FONTS_TERMINUS_8X16_KOI8_R 1
#endif
#ifndef FONTS_TERMINUS_BOLD_8X16_KOI8_R
#define FONTS_TERMINUS_BOLD_8X16_KOI8_R 1
#endif
#ifndef FONTS_TERMINUS_14X28_KOI8_R
#define FONTS_TERMINUS_14X28_KOI8_R 1
#endif

View 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_ */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,34 @@
* Created on: 8 dec. 2016
* Author: zaltora
*/
/********************************************************************************
* Copyright (c) 2012, Majenko Technologies
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those
* of the authors and should not be interpreted as representing official policies,
* either expressed or implied, of the FreeBSD Project.
********************************************************************************/
#ifndef _EXTRAS_FONTS_FONT_GLCD_5X7_H_
#define _EXTRAS_FONTS_FONT_GLCD_5X7_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_14X28_KOI8_R_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_16X32_KOI8_R_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.txt, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_6X12_KOI8_R_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_8X14_KOI8_R_H_

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_BOLD_14X28_KOI8_R_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_BOLD_16X32_KOI8_R_H_

View file

@ -6,6 +6,10 @@
* Charset: koi8_r
* 255 characters (1..255)
*
* Copyright (c) 2015 Dimitar Toshkov Zhekov
* License: SIL Open Font License, Version 1.1. The license is included as OFL.TXT, and is
* also available with a FAQ at http://scripts.sil.org/OFL
*
* Generated:
*/
#ifndef _EXTRAS_FONTS_FONT_TERMINUS_BOLD_8X14_KOI8_R_H_

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,23 @@
# Default built-in fonts
#########################################
# FIXME
FONTS_GLCD_5X7 ?= 1
FONTS_ROBOTO_8PT ?= 0
FONTS_ROBOTO_10PT ?= 0
# BitOCRA
FONTS_BITOCRA_4X7 ?= 1
FONTS_BITOCRA_6X11 ?= 1
FONTS_BITOCRA_7X13 ?= 1
# Terminus, KOI8-R
FONTS_TERMINUS_6X12_KOI8_R ?= 1
FONTS_TERMINUS_8X14_KOI8_R ?= 1
FONTS_TERMINUS_BOLD_8X14_KOI8_R ?= 1
FONTS_TERMINUS_14X28_KOI8_R ?= 1
FONTS_TERMINUS_BOLD_14X28_KOI8_R ?= 1
FONTS_TERMINUS_16X32_KOI8_R ?= 1
FONTS_TERMINUS_BOLD_16X32_KOI8_R ?= 1

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,9 @@
/*
* fonts.c
/**
* LCD/OLED fonts library
*
* Created on: 8 dec. 2016
* FIXME: License?
*
* @date: 8 dec. 2016
* Author: zaltora
*/
#include "fonts.h"
@ -17,24 +19,31 @@
#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_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
@ -44,7 +53,9 @@
/////////////////////////////////////////////
const font_info_t *fonts[] =
// FIXME: this declaration is noisy
const font_info_t *font_builtin_fonts[] =
{
#if FONTS_GLCD_5X7
[FONT_FACE_GLCD5x7] = &_fonts_glcd_5x7_info,
@ -63,12 +74,27 @@ const font_info_t *fonts[] =
[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_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
@ -79,7 +105,6 @@ const font_info_t *fonts[] =
#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
@ -90,7 +115,6 @@ const font_info_t *fonts[] =
#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
@ -103,4 +127,23 @@ const font_info_t *fonts[] =
#endif
};
const size_t fonts_count = (sizeof(fonts) / sizeof(font_info_t *));
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;
}

View file

@ -1,7 +1,9 @@
/*
* fonts.h
/**
* LCD/OLED fonts library
*
* Created on: 8 dec. 2016
* FIXME: License?
*
* @date 8 dec. 2016
* Author: zaltora
*/
#ifndef _EXTRAS_FONTS_H_
@ -20,19 +22,18 @@ 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_KOI8_R,
FONT_FACE_TERMINUS_8X14_KOI8_R,
FONT_FACE_TERMINUS_BOLD_8X14_KOI8_R,
FONT_FACE_TERMINUS_8X16_KOI8_R,
FONT_FACE_TERMINUS_BOLD_8X16_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;
#define FONT_FACE_MAX FONT_FACE_TERMINUS_BOLD_16X32_KOI8_R
/**
* Character descriptor
*/
@ -58,8 +59,29 @@ typedef struct _font_info
/**
* Built-in fonts
*/
extern const font_info_t *fonts[];
extern const size_t fonts_count;
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
}

View file

@ -1,11 +1,12 @@
#!/usr/bin/env python3
# encoding: utf-8
# -*- 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
@ -59,7 +60,7 @@ def main(args):
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('template.c').render({
print(env.get_template(args.template).render({
'font': {
'name': args.name,
'size': size,
@ -67,7 +68,8 @@ def main(args):
'first': args.first,
'last': args.last,
},
'chars': chars
'chars': chars,
'created': time.ctime()
}))

View file

@ -15,6 +15,8 @@ _fonts_{{ font.name|lower }}_{{ font_size }}_{{ font.charset|lower }}
* Charset: {{ font.charset }}
* {{ chars|length }} characters ({{ font.first }}..{{ font.last }})
*
* License: FIXME
*
* Generated: {{ created }}
*/
#ifndef {{ header_id }}