drawbot icon indicating copy to clipboard operation
drawbot copied to clipboard

Can the fontFilePath() take fontName as a parameter

Open MrBrezina opened this issue 5 years ago • 5 comments

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()

MrBrezina avatar Nov 13 '20 12:11 MrBrezina

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 https://github.com/justvanrossum/drawbot-skia/issues/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.

justvanrossum avatar Nov 13 '20 13:11 justvanrossum

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 https://github.com/typemytype/drawbot/issues/257

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

typemytype avatar Nov 13 '20 18:11 typemytype

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.

MrBrezina avatar Nov 18 '20 11:11 MrBrezina

@MrBrezina font.info

gferreira avatar Nov 21 '20 09:11 gferreira

Ah thanks! My understanding is that fontParts is just for UFO (at least atm.) and I am dealing with compiled fonts in this particular case.

On 21 Nov 2020, at 10:25, Gustavo Ferreira [email protected] wrote:

@MrBrezina font.info

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

MrBrezina avatar Nov 23 '20 11:11 MrBrezina