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

Use a fallback font to display missing characters #573

Closed
ffigiel opened this issue Aug 5, 2016 · 13 comments
Closed

Use a fallback font to display missing characters #573

ffigiel opened this issue Aug 5, 2016 · 13 comments

Comments

@ffigiel
Copy link

ffigiel commented Aug 5, 2016

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?

@ffigiel
Copy link
Author

ffigiel commented Aug 5, 2016

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

~ > printf '\u231b' | hexdump
0000000 8ce2 009b
0000003

@mintty
Copy link
Owner

mintty commented Aug 5, 2016

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

@ffigiel
Copy link
Author

ffigiel commented Aug 5, 2016

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 😄

@ffigiel ffigiel changed the title Some unicode characters are displayed as blocks Use a fallback font to display missing characters Aug 5, 2016
@mintty
Copy link
Owner

mintty commented Aug 9, 2016

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.

@mintty
Copy link
Owner

mintty commented Aug 9, 2016

This was referenced Sep 6, 2016
@mintty mintty mentioned this issue Oct 23, 2016
@Perlence
Copy link

Perlence commented Oct 23, 2016

Font linking does help, thank you!

@mintty
Copy link
Owner

mintty commented Oct 23, 2016

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.

@Perlence
Copy link

@mintty Latest SciTE supports font fallback and also ligatures:

SciTE

@mintty
Copy link
Owner

mintty commented Oct 25, 2016

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.

@mintty
Copy link
Owner

mintty commented Dec 4, 2016

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

@mintty mintty closed this as completed Dec 4, 2016
@musm
Copy link

musm commented Dec 4, 2016

thank you!

@Perlence
Copy link

Perlence commented Dec 5, 2016

@mintty Amazing work!

@mintty
Copy link
Owner

mintty commented Mar 11, 2017

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants