Skip to content

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

Open

Description

@DizzyHSlightlyVoided

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}

Activity

  1. talvo commented on Oct 7, 2021

    @talvo
    Collaborator

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

  2. DizzyHSlightlyVoided commented on Oct 7, 2021

    @DizzyHSlightlyVoided
    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.

  3. talvo commented on Oct 9, 2021

    @talvo
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions