typemytype / drawbot

http://www.drawbot.com
Other
393 stars 61 forks source link

Add argument for listFontGlyphNames() ? #523

Open HugoJourdan opened 1 year ago

HugoJourdan commented 1 year ago

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")
typemytype commented 1 year ago

Getting font attributes/info and optionally provide a fontName or path:

Getting font attributes/info without a option to provide a fontName or path (you need to set a font(..) first):

Im actually in favour of deprecating the fontNameOrPath argument...

any other ideas @justvanrossum ?

justvanrossum commented 1 year ago

No strong opnion here. I'm fine with deprecating, although I bet it will make some people unhappy.

typemytype commented 1 year ago

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

HugoJourdan commented 1 year ago

I believe that adding support for fontNameOrPath in other callbacks could be very beneficial.