Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add argument for listFontGlyphNames() ? #523

Open
HugoJourdan opened this issue Mar 20, 2023 · 4 comments
Open

Add argument for listFontGlyphNames() ? #523

HugoJourdan opened this issue Mar 20, 2023 · 4 comments

Comments

@HugoJourdan
Copy link

HugoJourdan commented Mar 20, 2023

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
Copy link
Owner

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 ?

@justvanrossum
Copy link
Collaborator

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

@typemytype
Copy link
Owner

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants