[cantarell-fonts] import-glyphs: also import postscriptNames
- From: Nikolaus Waxweiler <nwaxweiler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cantarell-fonts] import-glyphs: also import postscriptNames
- Date: Tue, 22 Dec 2020 22:27:46 +0000 (UTC)
commit b0a9c61165c78c7bc6b55ce39c76ce39ac52feb8
Author: Nikolaus Waxweiler <madigens gmail com>
Date: Tue Dec 22 22:13:06 2020 +0000
import-glyphs: also import postscriptNames
scripts/import-glyphs.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/scripts/import-glyphs.py b/scripts/import-glyphs.py
index 81725f84..87e2f58c 100644
--- a/scripts/import-glyphs.py
+++ b/scripts/import-glyphs.py
@@ -16,11 +16,17 @@ target_ufo_glyph_order = target_ufo.lib["public.glyphOrder"]
target_ufo_glyph_order_set = set(target_ufo_glyph_order)
for source_glyph in source_ufo:
- if source_glyph.name not in glyph_list:
+ name = source_glyph.name
+ if name not in glyph_list:
continue
- target_ufo[source_glyph.name] = source_glyph
- if source_glyph.name not in target_ufo_glyph_order_set:
- target_ufo_glyph_order.append(source_glyph.name)
+ target_ufo[name] = source_glyph
+ if name not in target_ufo_glyph_order_set:
+ target_ufo_glyph_order.append(name)
+
+ source_ps_names = source_ufo.lib["public.postscriptNames"]
+ target_ps_names = target_ufo.lib["public.postscriptNames"]
+ if name in source_ps_names:
+ target_ps_names[name] = source_ps_names[name]
target_ufo.save()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]