summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehoshua Pesach Wallach <yehoshuapw@gmail.com>2022-04-24 18:46:44 +0300
committerJF <JF002@users.noreply.github.com>2022-05-10 22:20:02 +0200
commit331de8ce8e39b710647cd5dc651539da06c8587a (patch)
treed8e7f9fe629c196f785495e8b6597246d0a0dade
parent4e2b0b1f10a30403820302eadb489c31bc9d5804 (diff)
fontgen: remove "feature" feature
-rw-r--r--src/displayapp/fonts/README.md1
-rw-r--r--src/displayapp/fonts/fonts.json10
-rwxr-xr-xsrc/displayapp/fonts/generate.py5
3 files changed, 1 insertions, 15 deletions
diff --git a/src/displayapp/fonts/README.md b/src/displayapp/fonts/README.md
index 7313794e..92270f29 100644
--- a/src/displayapp/fonts/README.md
+++ b/src/displayapp/fonts/README.md
@@ -24,7 +24,6 @@ and for each font there is:
* bpp - bits per pixel.
* size - size.
* patches - list of extra "patches" to run, either string to file which should be run, or list of arguments (with first one being the command being run)
-* features - optional. dictionary of extra file,range fonts to be included when the feature is enabled. (for example: a extra language)
* compress - optional. default disabled. add `"compress": true` to enable
### Navigation font
diff --git a/src/displayapp/fonts/fonts.json b/src/displayapp/fonts/fonts.json
index fb9e1acb..48f9865a 100644
--- a/src/displayapp/fonts/fonts.json
+++ b/src/displayapp/fonts/fonts.json
@@ -12,15 +12,7 @@
],
"bpp": 1,
"size": 20,
- "patches": [["patch", "{file}", "{file}_zero.patch"]],
- "features": {
- "hebrew": [
- {
- "file": "SimpleCLM-Medium.ttf",
- "range": "0x05D0-0x05EA,0x05F3,0x05F4"
- }
- ]
- }
+ "patches": [["patch", "{file}", "{file}_zero.patch"]]
},
"jetbrains_mono_42": {
"sources": [
diff --git a/src/displayapp/fonts/generate.py b/src/displayapp/fonts/generate.py
index d7785951..5cd9fe51 100755
--- a/src/displayapp/fonts/generate.py
+++ b/src/displayapp/fonts/generate.py
@@ -33,7 +33,6 @@ def gen_lvconv_line(dest: str, size: int, bpp: int, sources: typing.List[Source]
def main():
ap = argparse.ArgumentParser(description='auto generate LVGL font files from fonts')
ap.add_argument('config', type=str, help='config file to use')
- ap.add_argument('-e', '--enable', type=str, action='append', help='optional feature to enable in font generation', default=[], metavar='FEATURE', dest='features')
ap.add_argument('-f', '--font', type=str, action='append', help='Choose specific fonts to generate (default: all)', default=[])
args = ap.parse_args()
@@ -59,10 +58,6 @@ def main():
font = data[name]
sources = font.pop('sources')
patches = font.pop('patches') if 'patches' in font else []
- features = font.pop('features') if 'features' in font else []
- for enabled_feature in args.features:
- if enabled_feature in features:
- sources.extend(features[enabled_feature])
font['sources'] = [Source(thing) for thing in sources]
line = gen_lvconv_line(f'{name}.c', **font)
subprocess.check_call(line)