Created
April 15, 2022 20:46
-
-
Save kateliev/02475049270354954fee8e240522ebf2 to your computer and use it in GitHub Desktop.
FontLab Select Auto Layers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FLM: Select Auto Layers | |
#----------------------------------------------------------- | |
# (C) Vassil Kateliev, 2022 (http://www.kateliev.com) | |
#------------------------------------------------------------ | |
# No warranties. By using this you agree | |
# that you use it at your own risk! | |
# - Dependencies ----------------- | |
from __future__ import absolute_import | |
import fontlab as fl6 | |
import fontgate as fgt | |
from typerig.proxy.fl.objects.glyph import pGlyph | |
from typerig.proxy.fl.objects.font import pFont | |
# - Run --------------------------- | |
font = pFont() | |
select_glyphs = [] | |
for glyph in font.pGlyphs(): | |
if glyph.layer().autoLayer: | |
select_glyphs.append(glyph.name) | |
if len(select_glyphs): | |
font.selectGlyphs(select_glyphs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment