drawbot
drawbot copied to clipboard
Add argument for listFontGlyphNames() ?
Could it be possible to pass a font as argument in listFontGlyphNames(), in addition to the current method ?
Like with listNamedInstances()
font("Times")
glyphs = listFontGlyphNames()
#Additonnal method could be
glyphs = listFontGlyphNames("Times")
Getting font attributes/info and optionally provide a fontName or path:
-
listOpenTypeFeatures(fontNameOrPath=None)
-
listFontVariations(fontNameOrPath=None)
Getting font attributes/info without a option to provide a fontName or path (you need to set a font(..)
first):
-
fontContainsCharacters()
-
fontContainsGlyph(..)
-
fontFilePath()
-
fontFileFontNumber()
-
listFontGlyphNames()
-
fontAscender()
-
fontDescender()
-
fontXHeight()
-
fontCapHeight()
-
fontLeading()
-
fontLineHeight()
Im actually in favour of deprecating the fontNameOrPath
argument...
any other ideas @justvanrossum ?
No strong opnion here. I'm fine with deprecating, although I bet it will make some people unhappy.
the other option is to support fontNameOrPath
in the other callbacks... or how to decide which one get the optional argument and which one not
I believe that adding support for fontNameOrPath
in other callbacks could be very beneficial.