SOLVED compileGlyph and glyphConstruction
-
I get a
DeprecationWarningwhen I use an older script that usesfont.compileGlyph(newGlyph, baseGlyph, accent, preflight=False)/Applications/RoboFontBeta3.app/Contents/Resources/lib/python36.zip/lib/fontObjects/fontPartsWrappers.py:1870: DeprecationWarning: 'Font.compileGlyph(...)': use 'glyphConstruction'When I use
glyphConstructioninstead, I get this error:AttributeError: 'RFont' object has no attribute 'glyphConstruction'Is there a pythonic way to use the suggested
glyphConstruction, is there aglyphConstruction()function, something like
glyphConstruction(newGlyph, baseGlyph, accent)?
-
@gferreira thank you, that's perfect. I also noticed you added a my favorite
autoUnicodes()function :)
-
hello @martin, thanks for reporting. this was an oversight.
I’ve updated the script, so now lines starting with
?are ignored, and existing glyphs are cleared before adding components. please give it another try: buildAccentedGlyphsRF3.py
-
@gferreira I noticed that the example buildAccentedGlyphsRF3.py does not consider leading
?and addsaandgraveas components over and over toagrave, each time I run the script. Is this intentional?
-
@gferreira thank you, that is precisely what I was looking for!
-
hello @martin,
font.compileGlyphis deprecated in FontParts. Glyph Construction is the new recommended method for building accented glyphs.please have a look at Building accented glyphs with a script for an example script using the
glyphConstructionbuilder. there’s also a script to convert your accents dict into glyph constructions.ps. once you have your accented glyphs in glyph construction syntax, you can use the Glyph Builder interface in the Glyph Construction extension to preview the new glyphs before building them.