From ffec2d868fdb7f080d49877376e7d91ae87907f3 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 22 Apr 2026 18:10:22 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20make=20bookerly=20and=20smallerfonts=20p?= =?UTF-8?q?atches=20order-independent=20=E2=80=94=20use=20bare=20font=20ID?= =?UTF-8?q?=20in=20bookerly=20when=20resolve=20not=20yet=20injected,=20add?= =?UTF-8?q?=20BOOKERLY=5F12=20to=20smallerfonts=20resolve=20list,=20and=20?= =?UTF-8?q?harden=20CrossPointSettings.h=20anchor=20matching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/bookerly/patch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/bookerly/patch.py b/plugins/bookerly/patch.py index c6c2a70..629c059 100644 --- a/plugins/bookerly/patch.py +++ b/plugins/bookerly/patch.py @@ -196,9 +196,11 @@ def patch_cross_point_settings_cpp(repo_dir, new_ids): ' case OPENDYSLEXIC:\n switch (lineSpacing) {\n case TIGHT:\n return 0.90f;\n case NORMAL:\n default:\n return 0.95f;\n case WIDE:\n return 1.0f;\n }\n case BOOKERLY:\n switch (lineSpacing) {\n case TIGHT:\n return 0.95f;\n case NORMAL:\n default:\n return 1.0f;\n case WIDE:\n return 1.1f;\n }\n }\n}\n\nunsigned long' ) + use_resolve = 'resolve' in content + bookerly_return = 'resolve(BOOKERLY_12_FONT_ID)' if use_resolve else 'BOOKERLY_12_FONT_ID' bookerly_case = ( ' case BOOKERLY:\n' - ' return resolve(BOOKERLY_12_FONT_ID);\n' + f' return {bookerly_return};\n' ) anchor = None