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

Can the fontFilePath() take fontName as a parameter #408

Open
MrBrezina opened this issue Nov 13, 2020 · 5 comments
Open

Can the fontFilePath() take fontName as a parameter #408

MrBrezina opened this issue Nov 13, 2020 · 5 comments

Comments

@MrBrezina
Copy link

MrBrezina commented Nov 13, 2020

It would be convenient if one could call the fontFilePath(fontName) similarly to listFontVariations(). There are situations where I would like to know a path to an installed font, but I do not necessarily want to use it for drawing. Totally, low priority, of course. I can do this for now:

font(fontName)
path = fontFilePath()
@justvanrossum
Copy link
Collaborator

Somewhat off topic:

I am personally not convinced listFontVariations() should have gotten that argument in the first place, given the symmetry with FormattedString().listFontVariations(): in the latter case the font argument makes no sense. See also justvanrossum/drawbot-skia#10

Or: perhaps FormattedString should not have gotten methods like listFontVariations() and fontFilePath().

Either way, something's not quite satisfying with these functions/methods as they stand.

@typemytype
Copy link
Owner

Retrieving info from the a font important and maybe it should be separated from a FormattedString and even from global callbacks

I still like this proposal to collect all (calculated) info of a font in a font info like object

see #257

maybe the filePath and variations settings could be bundled there as well
Im also aware not to reinvent font.info object over again...

@MrBrezina
Copy link
Author

Oh yeah, that definitely looks like a more complete solution! Or an independent library, simpler version of fontTools. We have a wrapper like that with a few common queries we tend to have on binary fonts.

What is font.info? Maybe I am missing something basic.

@gferreira
Copy link
Contributor

@MrBrezina font.info

@MrBrezina
Copy link
Author

MrBrezina commented Nov 23, 2020 via email

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

4 participants