Licensing information added to fonts, smal fixes
This commit is contained in:
parent
861fe94bd3
commit
dd546223bd
17 changed files with 76 additions and 5561 deletions
|
|
@ -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_
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_8X16_KOI8_R_H_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
* Charset: koi8_r
|
||||
* 255 characters (1..255)
|
||||
*
|
||||
* Author: http://terminus-font.sourceforge.net/
|
||||
* 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_8X16_KOI8_R_H_
|
||||
|
|
|
|||
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
|
|
@ -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_
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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()
|
||||
}))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ int ssd1306_fill_triangle(const ssd1306_t *dev, uint8_t *fb, int16_t x0, int16_t
|
|||
|
||||
/**
|
||||
* Select the font
|
||||
* @param idx id value of the font
|
||||
* @param font_face id value of the font
|
||||
* @return Non-zero if error occured
|
||||
*/
|
||||
int ssd1306_select_font(font_face_t font_face);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue