I’m writing a script using part of Rainer’s script Report Highest and Lowest Glyphs that generates a list of the tallest glyphs in font until they get to its capHeight and the lowest glyphs until they reach the baseline.
I can access the name of the glyph but I’m not sure how to open a new tab with this. I’ve experienced before that, if I translate these glyphs into strings those glyphs that don’t have a Unicode value wouldn’t be in the new tab’s text. Any idea how to use these data that I already have to open a new tab with these characters?
You can use one of the snippets from the Python for Glyphs repository, I think it is simply tab (the three letters) followed by a tab (the key on the left side of your keyboard).
Thank you so much, Rainer. I’ve managed to do what I wanted. I forgot about the / trick before the name of the glyph so I could add the slash before the name and then open a new tab with it.
Also, I have another question about something I’m not used to. (I don’t want to bother with a lot of new posts)
I want to get the Glyph object of these glyphs I’ve sorted and, while Font.selection returns this:
(
"GSGlyph <0x7fbabdf041c0>: A"
)
If I append a GSGlyph of each glyph of my sorted list to a new list of GSGlyph objects like this newList.append(GSGlyph('A')) it returns a different kind of object I can’t use as a glyph:
[
<GSGlyph "A" with 0 layers>
]
I would appreciate very much help in this sense since I would like to use this data to create proofs.