Skip to content

Font-selection dialog doesn't remember fonts which have multi-word names and nonstandard weights #518

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

Open
DizzyHSlightlyVoided opened this issue Oct 7, 2021 · 3 comments

Comments

@DizzyHSlightlyVoided
Copy link

I don't know that this is something you really have control over, but here's what happened with my build:

Steps to reproduce:

  1. Open the font dialog to a font with multiple words in the name, such as "Comic Neue", and which has font weights other than Regular, Italic, Bold, etc.
  2. Set the font weight to one of these nonstandard weights, i.e. "Light" in this case, and close the dialog.
  3. Reopen the font dialog.

The "Font" box is now empty and the "Font Style" box is set to "Regular", regardless of previous selections.

It should be said that the font works properly, and it displays it properly even after you exit the client and open it again -- it's just that it's not recognized by the font-dialog in particular after the selection's been made.

For the record, the font is stored in the .wld file as:

set newWorld(top,font) {-family {Comic Neue Light} -size 11 -weight normal -slant roman -underline 0 -overstrike 0}
@talvo
Copy link
Collaborator

talvo commented Oct 7, 2021

Can you share the output from selecting:
Help -> About Potato
Click Show Package Info

If you're on Windows it should be using a native dialog box, on Linux it will be one written in Tcl/Tk I think. But either way I can try and debug :)

@DizzyHSlightlyVoided
Copy link
Author

Here you go:

Potato: 2.0.0b18
Tcl: 8.6.11
Tk: 8.6.11

System Info:
Platform: windows
OS: Windows NT (10.0)
Machine: amd64 (64-bit)
Windowing System: win32

Additional Packages:
All Platforms:
tls: 1.7.16
potato-flash: 1.0

Windows:
Winico: 0.6
potato-winflash: 1.1

Linux:
potato-linflash: Not Present
linflash: Not Present

MacOS X:
tkdock: Not Present

... And if it is a Windows-specific thing, then dang.

@talvo
Copy link
Collaborator

talvo commented Oct 9, 2021

I don't have the specific font you used, but I've experimented a little and it seems to be intermittent; if I set it to "Footlight MT" with the "Light Oblique" style, it doesn't come up correctly next time. But if I set it to "Franklin Gothic" with any irregular style (such as "Cond Demi" or "Heavy Italic") it comes up correctly. In both cases, in what Tk is returning, the style is appended to the font name ("Footlight MT Light" or "Franklin Gothic Heavy") - not counting "oblique"s or "italic"s which are automatically translated into an "italic" style and thus not part of the name - so I don't know why some fonts are going back into the dialog correctly and others aren't. Might need to take advice from the Tk community and/or raise a bug report on that one...

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

2 participants