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

Serving NSFont to font #515

Open
roberto-arista opened this issue Feb 27, 2023 · 9 comments
Open

Serving NSFont to font #515

roberto-arista opened this issue Feb 27, 2023 · 9 comments

Comments

@roberto-arista
Copy link
Contributor

It might be a good addition to be able to serve a NSFont to all the font methods.
Especially since system fonts are not usable anymore through their name.

Started as conversation in the RoboFont discord server: https://discord.com/channels/1052516637489766411/1055056206735101993/1079691208550527007

cc @typemytype

@roberto-arista roberto-arista changed the title serving NSFont to font Serving NSFont to font Feb 27, 2023
@justvanrossum
Copy link
Collaborator

I can't read the discord thread. What is the use case for using system fonts?

@roberto-arista
Copy link
Contributor Author

For this particular case, I was trying to annotate the glyph cell background in the font overview with a system font.

@justvanrossum
Copy link
Collaborator

When you say "the font overview", do you mean "RoboFont's font overview"? If so, how does that use DrawBot?

@roberto-arista
Copy link
Contributor Author

  1. yes
  2. it uses a subset of drawBot functionalities: https://www.robofont.com/documentation/reference/api/mojo/mojo-drawingtools/

@justvanrossum
Copy link
Collaborator

But isn't that implementation separate from DrawBot? I see how it's useful there, but not immediately in DrawBot-proper.

@typemytype
Copy link
Owner

CoreText does not allow font names starting with a . (those are system fonts) but there are available and accessible with NSFont. systemFontOfSize_(size) .

DrawBot already supports NSImage object in image(..)

An other option would be to have a small wrapper for system fonts.

@justvanrossum
Copy link
Collaborator

CoreText does not allow font names starting with a . (those are system fonts) but there are available and accessible with NSFont. systemFontOfSize_(size) .

I understand that. Why do we need to be able to use them in DrawBot?

@typemytype
Copy link
Owner

Why do we need to be able to use them in DrawBot?

Because its strange Apple does not allow systemFonts .<fontName> anymore, even they are installed and accessible with NSFont.systemFontOfSize_ and similar. The other option is to download all these fonts and install them if you would like to use them.

@justvanrossum
Copy link
Collaborator

Because its strange Apple does not allow systemFonts

That is not an answer to my question, though...

I'm not necessarily opposed to accepting NSFont (and or CGFont then?) in all font-releated drawbot calls, but so far the only answer I got for "why do we need this in DrawBot" is a use case for a drawbot-like API which isn't DrawBot.

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