I would like to copy a glyph from sourceFont to newFont and following script works fine before the last line.
Without the last line (i.e. commented out), a glyph is copied as a new glyph with .001 suffix in sourceFont and create newFont with no glyph cell.
But with the last line, the script could create newFont with a glyph cell named uni4E9C but only Glyph Note copied, and strangely, outline of the new glyph with .001 suffix in sourceFont disappears.
How can I copy a glyph from sourceFont to newFont?
import GlyphsApp
sourceFont = Glyphs.font
targetGlyph = sourceFont.glyphs['uni4E9C'].copy()
sourceFont.glyphs.append(targetGlyph)
newFont = GSFont()
newFont.familyName = "My New Fonts"
Glyphs.fonts.append(newFont)
newFont.glyphs.append(targetGlyph)
I really would like to do is subsetting/merging the the glyphs of the sourceFont according to its glyph category etc., and that script is for checking the behavior of the glyph copy function.
When working on a font project contains many glyphs such as Hiragana, Katakana, Kanji (JIS Level 1, Level 2 etc.) and symbols, I would like to generate subset fonts for each project member to design like
Unfortunately those custom parameters are active at Instance tab only and does not affect on Font View, and that is not what I would like to do.
I would like to make the production flow like as follow:
Cheif designer designs core Kanji glyphs.
Junior designers design rest of the Kanji glyphs referencing or reusing parts of 1. glyphs (Day 1)
Junior designers design rest of the Kanji glyphs referencing or reusing parts of 1. and 2. glyphs (Day 2)
Cont.
Assigned glyph range for the each Junior designers to be designed are fixed at start, and at the end of each day, merging the designed glyphs together and subsetting it (w/ reference glyphs) for each designers preparing for the next day’s production.
I’m not really sure what glyphs you prepare and need to remove (subset) later. I would think that you can keep all the prepared parts and just set them to not export.
The problem is that the layers in each glyph need to be connected to a master. That is done by setting the associatedMasterId and layerId. In this case it is easier to just use the same master ID so they automatically match.