Skip to content

Use a fallback font to display missing characters #573

Closed

Description

@ffigiel

My shell prompt displays a hourglass character to indicate background jobs. This character is displayed as a rectangular block in mintty:
image

Gnome terminal displays the character properly:
image

This is how I print this character. I'm using fish shell, but the problem is present on bash as well.
I tried various fonts, but the problem seems to be unaffected by this.

What else could I try to fix the problem?

Activity

  1. ffigiel commented on Aug 5, 2016

    @ffigiel
    Author

    I'm using cygwin but on its side everything looks good:

    ~ > printf '\u231b' | hexdump
    0000000 8ce2 009b
    0000003
    
  2. mintty commented on Aug 5, 2016

    @mintty
    Owner

    The rectangular block indicates that the character is not available in the font being used. This is not a bug as such. However, the character is displayed also, e.g., in notepad, configured to the same font as mintty. The only explanation that comes to my mind is that different "font fall-back" mechanisms of Windows are used. I don't know how this could be changed. Maybe it's not possible with the current output API (ExtTextOut).

  3. ffigiel commented on Aug 5, 2016

    @ffigiel
    Author

    Yes, looks like notepad goes through available fonts to find one with the missing character. It would be nice if mintty could do that. Thanks for help anyway 😄

  4. changed the title [-]Some unicode characters are displayed as blocks[/-] [+]Use a fallback font to display missing characters[/+] on Aug 5, 2016
  5. mintty commented on Aug 9, 2016

    @mintty
    Owner

    Windows Font Linking can be configured in the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
    If you add an entry for your preferred mintty text font, it might work.
    Maybe something similar can be achieved by Windows API calls, so mintty could establish some reasonable default behaviour. Suggestions welcome.

  6. Perlence commented on Oct 23, 2016

    @Perlence

    Font linking does help, thank you!

  7. mintty commented on Oct 23, 2016

    @mintty
    Owner

    Good that you could configure a personal workaround.
    However, as a generic improvement, this approach is not suitable for mintty.
    See my comment in #605.

  8. Perlence commented on Oct 24, 2016

    @Perlence

    @mintty Latest SciTE supports font fallback and also ligatures:

    SciTE

  9. mintty commented on Oct 25, 2016

    @mintty
    Owner

    Thanks, I see in the code it uses ExtTextOutW like mintty; if you can identify where/how it handles font fallback and ligatures, I will take a closer look.

  10. mintty commented on Dec 4, 2016

    @mintty
    Owner

    Released Uniscribe support in 2.7.1.
    This does not solve all potential font fallback cases, though.

  11. musm commented on Dec 4, 2016

    @musm

    thank you!

  12. Perlence commented on Dec 5, 2016

    @Perlence

    @mintty Amazing work!

  13. mintty commented on Mar 11, 2017

    @mintty
    Owner

    Released 2.7.5 with default FontRender=uniscribe.

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