Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generate font #1097

Merged
merged 31 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5dc16fa
Added font auto-generate script
yehoshuapw Apr 18, 2022
8abbc65
Added FontAwesome5-Solid+Brands+Regular.woff to git
yehoshuapw Apr 18, 2022
7b0a5d6
fontgen: Added ability to choose fonts with .c
yehoshuapw Apr 18, 2022
83780b4
fontgen: added missing requested font check
yehoshuapw Apr 19, 2022
cea34b9
fontgen: move features into fonts
yehoshuapw Apr 19, 2022
3bb597f
fontgen: removed ability of removing .c ext
yehoshuapw Apr 19, 2022
4b8424c
fontgen: use patch file for jetbrains 0 fix
yehoshuapw Apr 19, 2022
147cfc3
fontgen: simplify enabled fonts
yehoshuapw Apr 19, 2022
36a1250
fontgen: remove .c from requested font if there
yehoshuapw Apr 19, 2022
dadbb9a
fontgen: minor changes
yehoshuapw Apr 19, 2022
fbe98d7
fontgen: simplfy json after removed external features key
yehoshuapw Apr 20, 2022
7aa36a0
fonts: update README.md to match new method
yehoshuapw Apr 20, 2022
d6faf91
fontgen: generate fonts at runtime with CMake
yehoshuapw Apr 20, 2022
c7b157e
Added lv_font_conv to workflow main
yehoshuapw Apr 20, 2022
5a16e1b
fontgen: make simulator build fonts too
yehoshuapw Apr 20, 2022
b9c35de
fontgen: generate font .c files in build dir
yehoshuapw Apr 20, 2022
6d57001
fontgen: move lv_font_conv doc
yehoshuapw Apr 24, 2022
f645cbc
fontgen: remove "generating the fonts" section
yehoshuapw Apr 24, 2022
95ff573
fontgen: remove "feature" feature
yehoshuapw Apr 24, 2022
97bdfd7
fontgen: lock version at current
yehoshuapw Apr 24, 2022
f31adfb
fontgen: install npm, lv_font_conv in Dockerfile
yehoshuapw Apr 24, 2022
c48a7b1
fotngen: check for lv_font_conv
yehoshuapw Apr 27, 2022
7d81157
fontgen: assume plain .patch for single string patch
yehoshuapw Apr 27, 2022
0a45043
fontgen: remove double-asterisk in readme
yehoshuapw Apr 27, 2022
415c4d3
fontgen: verify lv_font_conv at cmake
yehoshuapw Apr 27, 2022
0fcbf22
fontgen: remove advanced (format string, process as list) from patching
yehoshuapw Apr 27, 2022
08491cb
fontgen: changes to allow CMake to work from other project
yehoshuapw Apr 28, 2022
e21d92b
fongen: don't pre-build fonts
yehoshuapw Apr 28, 2022
24b7950
docker: bump ubuntu to 20.04 and node to 18
yehoshuapw May 8, 2022
8becd02
update docker to 22, and use python3 by default
yehoshuapw May 10, 2022
c455087
fontgen: update README.md to remove patch advanced options
yehoshuapw May 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fontgen: assume plain .patch for single string patch
  • Loading branch information
yehoshuapw committed Apr 27, 2022
commit 7d8115776ca60f5d941eef53c235191bfb3cd41e
2 changes: 1 addition & 1 deletion src/displayapp/fonts/fonts.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"bpp": 1,
"size": 20,
"patches": [["patch", "{file}", "{file}_zero.patch"]]
"patches": ["{file}_zero.patch"]
},
"jetbrains_mono_42": {
"sources": [
Expand Down
15 changes: 11 additions & 4 deletions src/displayapp/fonts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,18 @@ def main():
subprocess.check_call(line)
if patches:
for patch in patches:
try: patch = patch.format(name=name, file=name+'.c')
try:
# Try and patch, if given a string
patch = patch.format(name=name, file=name+'.c')
subprocess.check_call(['/usr/bin/patch', name+'.c', patch])
continue
except: pass
try: patch = [arg.format(name=name, file=name+'.c') for arg in patch]
except: pass
subprocess.check_call(patch)
try:
# otherwise, assume a "advanced" patch, which is a list of strings.
patch = [arg.format(name=name, file=name+'.c') for arg in patch]
subprocess.check_call(patch)
except Exception as e:
sys.exit('Failed to patch using "{patch}"\n{err}'.format(patch=patch,err=e))



Expand Down