mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 06:37:38 +03:00
docs: add font generation commands to builtin font headers (#547)
## Summary * **What is the goal of this PR?** Simple quality of life, ease maintenance * **What changes are included?** Update fontconvert.py to include the command used to generate each font file in the header comment, making it easier to regenerate fonts when needed. I plan on adding options to this scripts (kerning, and maybe ligatures), thus knowing which command was used, even with already existing options like `--additional-intervals`, is important. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
parent
c73fca26f5
commit
a4b9a43ca1
@ -3,6 +3,7 @@
|
||||
* name: bookerly_12_bold
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_12_bold 12 ../builtinFonts/source/Bookerly/Bookerly-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_12_bolditalic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_12_bolditalic 12 ../builtinFonts/source/Bookerly/Bookerly-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_12_italic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_12_italic 12 ../builtinFonts/source/Bookerly/Bookerly-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_12_regular
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_12_regular 12 ../builtinFonts/source/Bookerly/Bookerly-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_14_bold
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_14_bold 14 ../builtinFonts/source/Bookerly/Bookerly-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_14_bolditalic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_14_bolditalic 14 ../builtinFonts/source/Bookerly/Bookerly-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_14_italic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_14_italic 14 ../builtinFonts/source/Bookerly/Bookerly-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_14_regular
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_14_regular 14 ../builtinFonts/source/Bookerly/Bookerly-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_16_bold
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_16_bold 16 ../builtinFonts/source/Bookerly/Bookerly-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_16_bolditalic
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_16_bolditalic 16 ../builtinFonts/source/Bookerly/Bookerly-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_16_italic
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_16_italic 16 ../builtinFonts/source/Bookerly/Bookerly-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_16_regular
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_16_regular 16 ../builtinFonts/source/Bookerly/Bookerly-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_18_bold
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_18_bold 18 ../builtinFonts/source/Bookerly/Bookerly-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_18_bolditalic
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_18_bolditalic 18 ../builtinFonts/source/Bookerly/Bookerly-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_18_italic
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_18_italic 18 ../builtinFonts/source/Bookerly/Bookerly-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: bookerly_18_regular
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py bookerly_18_regular 18 ../builtinFonts/source/Bookerly/Bookerly-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_12_bold
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_12_bold 12 ../builtinFonts/source/NotoSans/NotoSans-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_12_bolditalic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_12_bolditalic 12 ../builtinFonts/source/NotoSans/NotoSans-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_12_italic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_12_italic 12 ../builtinFonts/source/NotoSans/NotoSans-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_12_regular
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_12_regular 12 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_14_bold
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_14_bold 14 ../builtinFonts/source/NotoSans/NotoSans-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_14_bolditalic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_14_bolditalic 14 ../builtinFonts/source/NotoSans/NotoSans-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_14_italic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_14_italic 14 ../builtinFonts/source/NotoSans/NotoSans-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_14_regular
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_14_regular 14 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_16_bold
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_16_bold 16 ../builtinFonts/source/NotoSans/NotoSans-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_16_bolditalic
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_16_bolditalic 16 ../builtinFonts/source/NotoSans/NotoSans-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_16_italic
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_16_italic 16 ../builtinFonts/source/NotoSans/NotoSans-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_16_regular
|
||||
* size: 16
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_16_regular 16 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_18_bold
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_18_bold 18 ../builtinFonts/source/NotoSans/NotoSans-Bold.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_18_bolditalic
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_18_bolditalic 18 ../builtinFonts/source/NotoSans/NotoSans-BoldItalic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_18_italic
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_18_italic 18 ../builtinFonts/source/NotoSans/NotoSans-Italic.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_18_regular
|
||||
* size: 18
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py notosans_18_regular 18 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: notosans_8_regular
|
||||
* size: 8
|
||||
* mode: 1-bit
|
||||
* Command used: fontconvert.py notosans_8_regular 8 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_10_bold
|
||||
* size: 10
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_10_bold 10 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Bold.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_10_bolditalic
|
||||
* size: 10
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_10_bolditalic 10 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-BoldItalic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_10_italic
|
||||
* size: 10
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_10_italic 10 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Italic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_10_regular
|
||||
* size: 10
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_10_regular 10 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Regular.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_12_bold
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_12_bold 12 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Bold.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_12_bolditalic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_12_bolditalic 12 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-BoldItalic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_12_italic
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_12_italic 12 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Italic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_12_regular
|
||||
* size: 12
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_12_regular 12 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Regular.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_14_bold
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_14_bold 14 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Bold.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_14_bolditalic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_14_bolditalic 14 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-BoldItalic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_14_italic
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_14_italic 14 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Italic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_14_regular
|
||||
* size: 14
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_14_regular 14 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Regular.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_8_bold
|
||||
* size: 8
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_8_bold 8 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Bold.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_8_bolditalic
|
||||
* size: 8
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_8_bolditalic 8 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-BoldItalic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_8_italic
|
||||
* size: 8
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_8_italic 8 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Italic.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: opendyslexic_8_regular
|
||||
* size: 8
|
||||
* mode: 2-bit
|
||||
* Command used: fontconvert.py opendyslexic_8_regular 8 ../builtinFonts/source/OpenDyslexic/OpenDyslexic-Regular.otf --2bit
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: ubuntu_10_bold
|
||||
* size: 10
|
||||
* mode: 1-bit
|
||||
* Command used: fontconvert.py ubuntu_10_bold 10 ../builtinFonts/source/Ubuntu/Ubuntu-Bold.ttf
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: ubuntu_10_regular
|
||||
* size: 10
|
||||
* mode: 1-bit
|
||||
* Command used: fontconvert.py ubuntu_10_regular 10 ../builtinFonts/source/Ubuntu/Ubuntu-Regular.ttf
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: ubuntu_12_bold
|
||||
* size: 12
|
||||
* mode: 1-bit
|
||||
* Command used: fontconvert.py ubuntu_12_bold 12 ../builtinFonts/source/Ubuntu/Ubuntu-Bold.ttf
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* name: ubuntu_12_regular
|
||||
* size: 12
|
||||
* mode: 1-bit
|
||||
* Command used: fontconvert.py ubuntu_12_regular 12 ../builtinFonts/source/Ubuntu/Ubuntu-Regular.ttf
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
@ -270,9 +270,17 @@ for index, glyph in enumerate(all_glyphs):
|
||||
glyph_data.extend([b for b in packed])
|
||||
glyph_props.append(props)
|
||||
|
||||
print(f"/**\n * generated by fontconvert.py\n * name: {font_name}\n * size: {size}\n * mode: {'2-bit' if is2Bit else '1-bit'}\n */")
|
||||
print("#pragma once")
|
||||
print("#include \"EpdFontData.h\"\n")
|
||||
print(f"""/**
|
||||
* generated by fontconvert.py
|
||||
* name: {font_name}
|
||||
* size: {size}
|
||||
* mode: {'2-bit' if is2Bit else '1-bit'}
|
||||
* Command used: {' '.join(sys.argv)}
|
||||
*/
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
""")
|
||||
|
||||
print(f"static const uint8_t {font_name}Bitmaps[{len(glyph_data)}] = {{")
|
||||
for c in chunks(glyph_data, 16):
|
||||
print (" " + " ".join(f"0x{b:02X}," for b in c))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user