update code base to Marlin 2.0.9.2
This commit is contained in:
0
buildroot/share/fonts/NanumGothic.bdf
Executable file → Normal file
0
buildroot/share/fonts/NanumGothic.bdf
Executable file → Normal file
8
buildroot/share/fonts/README.md
Executable file → Normal file
8
buildroot/share/fonts/README.md
Executable file → Normal file
@@ -1,11 +1,10 @@
|
||||
# Marlin fonts
|
||||
|
||||
|
||||
## Author and license
|
||||
The original author of the following font files is [A. Hardtung](https://github.com/AnHardt).
|
||||
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
- HD44780_C.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
|
||||
- HD44780_J.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
|
||||
@@ -16,8 +15,7 @@ http://creativecommons.org/publicdomain/zero/1.0/
|
||||
- ISO10646_Kana.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
|
||||
- Marlin_symbols.fon ([fe2bd23](https://github.com/MarlinFirmware/Marlin/commit/fe2bd237d556439499dfdee852c1550c7a16430a))
|
||||
|
||||
Additional changes to the original font files distributed with Marlin are copyrighted under the terms of the [GPLv3](http://www.gnu.org/licenses/gpl-3.0.txt) license.
|
||||
|
||||
Additional changes to the original font files distributed with Marlin are copyrighted under the terms of the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.txt) license.
|
||||
|
||||
## Documentation
|
||||
For detailed information about [adding new fonts](http://www.marlinfw.org/docs/development/fonts.html) to Marlin visit our documentation website.
|
||||
For detailed information about adding new fonts to Marlin [see this article](https://marlinfw.org/docs/development/fonts.html).
|
||||
|
64
buildroot/share/fonts/buildhzk.py
Normal file
64
buildroot/share/fonts/buildhzk.py
Normal file
@@ -0,0 +1,64 @@
|
||||
# Generate a 'HZK' font file for the T5UIC1 DWIN LCD
|
||||
# from multiple bdf font files.
|
||||
# Note: the 16x16 glyphs are not produced
|
||||
# Author: Taylor Talkington
|
||||
# License: GPL
|
||||
|
||||
import bdflib.reader
|
||||
import math
|
||||
|
||||
def glyph_bits(size_x, size_y, font, glyph_ord):
|
||||
asc = font[b'FONT_ASCENT']
|
||||
desc = font[b'FONT_DESCENT']
|
||||
bits = [0 for y in range(size_y)]
|
||||
|
||||
glyph_bytes = math.ceil(size_x / 8)
|
||||
try:
|
||||
glyph = font[glyph_ord]
|
||||
for y, row in enumerate(glyph.data):
|
||||
v = row
|
||||
rpad = size_x - glyph.bbW
|
||||
if rpad < 0: rpad = 0
|
||||
if glyph.bbW > size_x: v = v >> (glyph.bbW - size_x) # some glyphs are actually too wide to fit!
|
||||
v = v << (glyph_bytes * 8) - size_x + rpad
|
||||
v = v >> glyph.bbX
|
||||
bits[y + desc + glyph.bbY] |= v
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
bits.reverse()
|
||||
return bits
|
||||
|
||||
def marlin_font_hzk():
|
||||
fonts = [
|
||||
[6,12,'marlin-6x12-3.bdf'],
|
||||
[8,16,'marlin-8x16.bdf'],
|
||||
[10,20,'marlin-10x20.bdf'],
|
||||
[12,24,'marlin-12x24.bdf'],
|
||||
[14,28,'marlin-14x28.bdf'],
|
||||
[16,32,'marlin-16x32.bdf'],
|
||||
[20,40,'marlin-20x40.bdf'],
|
||||
[24,48,'marlin-24x48.bdf'],
|
||||
[28,56,'marlin-28x56.bdf'],
|
||||
[32,64,'marlin-32x64.bdf']
|
||||
]
|
||||
|
||||
with open('marlin_fixed.hzk','wb') as output:
|
||||
for f in fonts:
|
||||
with open(f[2], 'rb') as file:
|
||||
print(f'{f[0]}x{f[1]}')
|
||||
font = bdflib.reader.read_bdf(file)
|
||||
for glyph in range(128):
|
||||
bits = glyph_bits(f[0], f[1], font, glyph)
|
||||
glyph_bytes = math.ceil(f[0]/8)
|
||||
|
||||
for b in bits:
|
||||
try:
|
||||
z = b.to_bytes(glyph_bytes, 'big')
|
||||
output.write(z)
|
||||
except OverflowError:
|
||||
print('Overflow')
|
||||
print(f'{glyph}')
|
||||
print(font[glyph])
|
||||
for b in bits: print(f'{b:0{f[0]}b}')
|
||||
return
|
@@ -57,12 +57,12 @@ OLDWD=`pwd`
|
||||
#
|
||||
# Compile the 'genpages' command in-place
|
||||
#
|
||||
(cd ${DN_EXEC}; gcc -o genpages genpages.c getline.c)
|
||||
(cd ${DN_EXEC}; cc -o genpages genpages.c getline.c)
|
||||
|
||||
#
|
||||
# By default loop through all languages
|
||||
#
|
||||
LANGS_DEFAULT="an bg ca cz da de el el_gr en es eu fi fr gl hr it jp_kana ko_KR nl pl pt pt_br ru sk tr uk vi zh_CN zh_TW test"
|
||||
LANGS_DEFAULT="an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana ko_KR nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test"
|
||||
|
||||
#
|
||||
# Generate data for language list MARLIN_LANGS or all if not provided
|
||||
@@ -105,6 +105,9 @@ if [ 1 = 1 ]; then
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -116,10 +119,11 @@ if [ 1 = 1 ]; then
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
|
||||
#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
|
||||
// reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH
|
||||
|
52
buildroot/share/fonts/genpages.c
Executable file → Normal file
52
buildroot/share/fonts/genpages.c
Executable file → Normal file
@@ -71,63 +71,49 @@ uint8_t* get_utf8_value(uint8_t *pstart, wchar_t *pval) {
|
||||
|
||||
assert(NULL != pstart);
|
||||
|
||||
#define NEXT_6_BITS() do{ val <<= 6; p++; val |= (*p & 0x3F); }while(0)
|
||||
|
||||
if (0 == (0x80 & *p)) {
|
||||
val = (size_t)*p;
|
||||
p++;
|
||||
}
|
||||
else if (0xC0 == (0xE0 & *p)) {
|
||||
val = *p & 0x1F;
|
||||
val <<= 6;
|
||||
p++;
|
||||
val |= (*p & 0x3F);
|
||||
NEXT_6_BITS();
|
||||
p++;
|
||||
assert((wchar_t)val == get_val_utf82uni(pstart));
|
||||
}
|
||||
else if (0xE0 == (0xF0 & *p)) {
|
||||
val = *p & 0x0F;
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
p++;
|
||||
assert((wchar_t)val == get_val_utf82uni(pstart));
|
||||
}
|
||||
else if (0xF0 == (0xF8 & *p)) {
|
||||
val = *p & 0x07;
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
p++;
|
||||
assert((wchar_t)val == get_val_utf82uni(pstart));
|
||||
}
|
||||
else if (0xF8 == (0xFC & *p)) {
|
||||
val = *p & 0x03;
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
p++;
|
||||
assert((wchar_t)val == get_val_utf82uni(pstart));
|
||||
}
|
||||
else if (0xFC == (0xFE & *p)) {
|
||||
val = *p & 0x01;
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
val <<= 6; p++;
|
||||
val |= (*p & 0x3F);
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
NEXT_6_BITS();
|
||||
p++;
|
||||
assert((wchar_t)val == get_val_utf82uni(pstart));
|
||||
}
|
||||
@@ -156,12 +142,12 @@ uint8_t* get_utf8_value(uint8_t *pstart, wchar_t *pval) {
|
||||
return p;
|
||||
}
|
||||
|
||||
void usage(char* progname) {
|
||||
void usage(char *progname) {
|
||||
fprintf(stderr, "usage: %s\n", progname);
|
||||
fprintf(stderr, " read data from stdin\n");
|
||||
}
|
||||
|
||||
void utf8_parse(const char* msg, unsigned int len) {
|
||||
void utf8_parse(const char *msg, unsigned int len) {
|
||||
uint8_t *pend = NULL;
|
||||
uint8_t *p;
|
||||
uint8_t *pre;
|
||||
|
0
buildroot/share/fonts/getline.c
Executable file → Normal file
0
buildroot/share/fonts/getline.c
Executable file → Normal file
0
buildroot/share/fonts/getline.h
Executable file → Normal file
0
buildroot/share/fonts/getline.h
Executable file → Normal file
4104
buildroot/share/fonts/marlin-10x20.bdf
Normal file
4104
buildroot/share/fonts/marlin-10x20.bdf
Normal file
File diff suppressed because it is too large
Load Diff
4558
buildroot/share/fonts/marlin-12x24.bdf
Normal file
4558
buildroot/share/fonts/marlin-12x24.bdf
Normal file
File diff suppressed because it is too large
Load Diff
5078
buildroot/share/fonts/marlin-14x28.bdf
Normal file
5078
buildroot/share/fonts/marlin-14x28.bdf
Normal file
File diff suppressed because it is too large
Load Diff
5492
buildroot/share/fonts/marlin-16x32.bdf
Normal file
5492
buildroot/share/fonts/marlin-16x32.bdf
Normal file
File diff suppressed because it is too large
Load Diff
6458
buildroot/share/fonts/marlin-20x40.bdf
Normal file
6458
buildroot/share/fonts/marlin-20x40.bdf
Normal file
File diff suppressed because it is too large
Load Diff
6462
buildroot/share/fonts/marlin-24x48.bdf
Normal file
6462
buildroot/share/fonts/marlin-24x48.bdf
Normal file
File diff suppressed because it is too large
Load Diff
7311
buildroot/share/fonts/marlin-28x56.bdf
Normal file
7311
buildroot/share/fonts/marlin-28x56.bdf
Normal file
File diff suppressed because it is too large
Load Diff
9870
buildroot/share/fonts/marlin-32x64.bdf
Normal file
9870
buildroot/share/fonts/marlin-32x64.bdf
Normal file
File diff suppressed because it is too large
Load Diff
0
buildroot/share/fonts/marlin-6x12-1.bdf
Executable file → Normal file
0
buildroot/share/fonts/marlin-6x12-1.bdf
Executable file → Normal file
0
buildroot/share/fonts/marlin-6x12-2.bdf
Executable file → Normal file
0
buildroot/share/fonts/marlin-6x12-2.bdf
Executable file → Normal file
17
buildroot/share/fonts/marlin-6x12-3.bdf
Executable file → Normal file
17
buildroot/share/fonts/marlin-6x12-3.bdf
Executable file → Normal file
@@ -106,16 +106,15 @@ B8
|
||||
ENDCHAR
|
||||
STARTCHAR uni0006
|
||||
ENCODING 6
|
||||
SWIDTH 545 0
|
||||
DWIDTH 6 0
|
||||
BBX 5 6 0 1
|
||||
SWIDTH 504 0
|
||||
DWIDTH 7 0
|
||||
BBX 8 5 0 1
|
||||
BITMAP
|
||||
E0
|
||||
8C
|
||||
EA
|
||||
8C
|
||||
8A
|
||||
0A
|
||||
D8
|
||||
6C
|
||||
36
|
||||
6C
|
||||
D8
|
||||
ENDCHAR
|
||||
STARTCHAR uni0007
|
||||
ENCODING 7
|
||||
|
16606
buildroot/share/fonts/marlin-6x9.bdf
Normal file
16606
buildroot/share/fonts/marlin-6x9.bdf
Normal file
File diff suppressed because it is too large
Load Diff
3701
buildroot/share/fonts/marlin-8x16.bdf
Normal file
3701
buildroot/share/fonts/marlin-8x16.bdf
Normal file
File diff suppressed because it is too large
Load Diff
0
buildroot/share/fonts/u8glib-bdf2u8g.patch
Executable file → Normal file
0
buildroot/share/fonts/u8glib-bdf2u8g.patch
Executable file → Normal file
6
buildroot/share/fonts/uxggenpages.md
Executable file → Normal file
6
buildroot/share/fonts/uxggenpages.md
Executable file → Normal file
@@ -99,12 +99,12 @@ At this time, the font file `marlin-6x12-3.bdf` is used to generate the font dat
|
||||
|
||||
- [WQY](http://wenq.org/)
|
||||
- [WQY 9pt bitmap font](http://wenq.org/daily/wqy-bitmapfont-bdf-gb18030-nightly_build.tar.gz)
|
||||
- [unifont (16x8 or 16x16)](http://unifoundry.com/unifont.html)
|
||||
- [unifont (16x8 or 16x16)](https://unifoundry.com/unifont.html)
|
||||
|
||||
Documents related to the old version of the language engine:
|
||||
|
||||
- [Marlin Fonts Documentation](http://www.marlinfw.org/docs/development/fonts.html)
|
||||
- [Marlin LCD Language](http://marlinfw.org/docs/development/lcd_language.html)
|
||||
- [Marlin Fonts Documentation](https://www.marlinfw.org/docs/development/fonts.html)
|
||||
- [Marlin LCD Language](https://marlinfw.org/docs/development/lcd_language.html)
|
||||
- [U8GLIB](https://github.com/olikraus/u8glib.git)
|
||||
- [UTF-8 for U8GLIB](https://github.com/yhfudev/u8glib-fontutf8.git)
|
||||
- [Standalone test project for the Marlin UTF-8 language engine](https://github.com/yhfudev/marlin-fontutf8.git)
|
||||
|
@@ -139,11 +139,13 @@ BEGIN {
|
||||
}
|
||||
EOF
|
||||
|
||||
AWK=$(which gawk || which awk)
|
||||
|
||||
grep -Hrn _UxGT . | grep '"' \
|
||||
| sed 's/_UxGT("/\n&/g;s/[^\n]*\n_UxGT("\([^"]*\)[^\n]*/\1 /g;s/.$//' \
|
||||
| ${EXEC_GENPAGES} \
|
||||
| sort -k 1n -k 2n | uniq \
|
||||
| gawk -v EXEC_PREFIX=${DN_EXEC} -f "proc.awk" \
|
||||
| "$AWK" -v EXEC_PREFIX=${DN_EXEC} -f "proc.awk" \
|
||||
| while read PAGE BEGIN END UTF8BEGIN UTF8END; do \
|
||||
if [ ! -f ${DN_DATA}/fontpage_${PAGE}_${BEGIN}_${END}.h ]; then \
|
||||
${EXEC_BDF2U8G} -u ${PAGE} -b ${BEGIN} -e ${END} ${FN_FONT} fontpage_${PAGE}_${BEGIN}_${END} ${DN_DATA}/fontpage_${PAGE}_${BEGIN}_${END}.h > /dev/null 2>&1 ;
|
||||
@@ -167,7 +169,7 @@ cat <<EOF >fontutf8-data.h
|
||||
* Contents will be REPLACED by future processing!
|
||||
* Use genallfont.sh to generate font data for updated languages.
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
#include <U8glib-HAL.h>
|
||||
$TMPA
|
||||
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
|
||||
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB};
|
||||
|
Reference in New Issue
Block a user