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

Font rendering issues in Terminal #610

Closed
mqudsi opened this issue May 9, 2019 · 40 comments
Closed

Font rendering issues in Terminal #610

mqudsi opened this issue May 9, 2019 · 40 comments
Assignees
Labels
Area-Fonts Related to the font Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Milestone

Comments

@mqudsi
Copy link

mqudsi commented May 9, 2019

I have Terminal up and running under 18362.0, but it seems to have problems with certain types of fonts.

Here it is working fine with the font set to "SF Console":

image

But it breaks when the font is changed to "SF Console Medium" (but not because the font isn't found or anything). The app doesn't crash but the text is rendered... let's just say extremely incorrectly:

image

If you focus extremely well and zoom in all the way, you can see that text is being rendered.. just very oddly so. Change the font back and it redraws correctly to what it used to contain.

Here's the same screenshot from conhost with the font set to "SF Console Medium" via the registry:

image

It's not just an issue with setting a variant of a font, or this particular font. Here's how the default (free) "Roboto Slab" is rendered, but I'm not sure if it's the same problem (it doesn't look like it):

image

@zadjii-msft
Copy link
Member

@miniksa is the guy who will know why this is happening.

@zadjii-msft zadjii-msft added this to the Windows Terminal v1.0 milestone May 9, 2019
@zadjii-msft zadjii-msft added Area-Fonts Related to the font Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. labels May 9, 2019
@miniksa
Copy link
Member

miniksa commented May 14, 2019

Is "SF" the San Francisco font from Apple that we're absolutely not authorized nor licensed to use outside of an Apple computer?

If so, I can't investigate this and have to slam it closed. I can't debug/diagnose fonts I'm not licensed to use and I can't condone having other people break that license agreement.

@mqudsi
Copy link
Author

mqudsi commented May 14, 2019

No, that is SF Mono. SF Console is a clone intended to look like it but not one I'm authorized to share; which is why I mention Roboto Slab, which is open source and publicly available.

@miniksa
Copy link
Member

miniksa commented May 14, 2019

Where can I get it and confirm the licensing?

@mqudsi
Copy link
Author

mqudsi commented May 14, 2019

It's made by Google, released under the Apache 2.0 license. GitHub repo: https://github.com/googlefonts/robotoslab

You can download the prebuilt TrueType files here: https://github.com/google/fonts/tree/master/apache/robotoslab

@miniksa
Copy link
Member

miniksa commented May 14, 2019

OK thanks. I'll take a look at it then when I get around to being able to work on rendering stuff instead of triaging GitHub issues and PRs all day. :P

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Terminal The new Windows Terminal. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@iKlsR
Copy link

iKlsR commented Jun 10, 2019

I'm having a similar issue, I can only seem to use the base regular font, any medium or other variation and the app won't start and changes to a very tiny clipped variation if already running similar to the 4th screenshot. Font is Fira Code. Fira Code Medium works fine everywhere else.

@mdtauk
Copy link

mdtauk commented Jun 10, 2019

If the new terminal is going to support Bold and Italic fonts, shouldn't the font picker be showing Font Families, rather than individual fonts?

@DHowett-MSFT
Copy link
Contributor

I mean, there isn’t a font picker right now, so it isn’t showing anything?

@mdtauk
Copy link

mdtauk commented Jun 10, 2019

I mean, there isn’t a font picker right now, so it isn’t showing anything?

True, but the fact the font picked is not of a regular weight, it could be part of the problem. But I assume the plan is to have a font picker in an app setting dialog of some kind :)

@mqudsi
Copy link
Author

mqudsi commented Jun 10, 2019

I think a good question is whether individual fonts within a family are looked up by their common name or their postscript name.

@zadjii-msft
Copy link
Member

Also maybe related: #1163

@vsalvino
Copy link

This issue occurs with any font using the non-regular weight. For Example, IBM Plex Mono provides a ton of weights, none of them work in the terminal except regular specified with "fontFace": "IBM Plex Mono". Specifying "fontFace": "IBM Plex Mono Medium" produces the same rendering issue above.

@bmo-at
Copy link

bmo-at commented Jul 15, 2019

This issue occurs with any font using the non-regular weight. For Example, IBM Plex Mono provides a ton of weights, none of them work in the terminal except regular specified with "fontFace": "IBM Plex Mono". Specifying "fontFace": "IBM Plex Mono Medium" produces the same rendering issue above.

Same for Nerd Fonts. As long as regular is installed, regular will be used. If you uninstall everything but, say for example bold, bold is used instead. This should instead be configurable in the settings file, with another attribute (e.g. fontWeight) for the profile:

        {
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "One Dark Pro",
            "commandline" : "wsl.exe -d Debian",
...
            "fontFace" : "Hack NF",
            "fontSize" : 11,
            "fontWeight": "bold",
...
            "useAcrylic" : true
        }

@miniksa
Copy link
Member

miniksa commented Jul 15, 2019

This issue occurs with any font using the non-regular weight. For Example, IBM Plex Mono provides a ton of weights, none of them work in the terminal except regular specified with "fontFace": "IBM Plex Mono". Specifying "fontFace": "IBM Plex Mono Medium" produces the same rendering issue above.

Thanks for the datapoint. I don't think I tried non-"regular" font weights yet while originally writing the renderer. This is probably just something I overlooked and need to finish writing.

Same for Nerd Fonts. As long as regular is installed, regular will be used. If you uninstall everything but, say for example bold, bold is used instead. This should instead be configurable in the settings file, with another attribute (e.g. fontWeight) for the profile:

I agree, it should be configurable. I just haven't got around to it yet.

@bmo-at
Copy link

bmo-at commented Jul 15, 2019

image
Just had to give a shoutout to you guys for how ballin this Terminal is already. Performance is like greased lightning, visuals are terrific and stability is very good for such an early preview.
The switching for different kinds of shells (PS, cmd and wsl) is terrifc also.

Keep it going! 💪🏻

@offero

This comment has been minimized.

@zadjii-msft zadjii-msft added the Priority-3 A description (P3) label Jan 22, 2020
@cinnamon-msft cinnamon-msft added v1-Scrubbed Priority-2 A description (P2) and removed Priority-3 A description (P3) labels Jan 28, 2020
@MartinSGill

This comment has been minimized.

@austinwagner

This comment has been minimized.

@johnwildes

This comment has been minimized.

@DHowett-MSFT

This comment has been minimized.

@shanselman
Copy link
Member

shanselman commented Mar 3, 2020

Not sure where to file this. Could be in Cascadia Code itself @cinnamon-msft or could be Terminal Version: 0.9.433.0.

Repro is easy. "echo ⚡" with Cascadia Code PL vs using the patched DelugiaCode NF.

Note it on the command line vs when used in a prompt. This is DelugiaCodeNF 1909.16 (just a patched Cascadia). It's not in color on the prompt, then it's color in the prompt. But the size is right.

image

And this is Cascadia Code PL 1911.21. It's color everywhere but tiny.

image

@austinwagner
Copy link

@shanselman Is the color part a bug? It looks to me like a lightning bolt glyph was added into the patched font and that the unpatched font is falling back on the default Windows emoji glyph.

@shanselman
Copy link
Member

@austinwagner The bug (behaviorally) is the small/wrong size. You're saying that Cascadia has a small glyph inside and that is wrong?

@austinwagner
Copy link

@shanselman Apologies for being unclear. I was referring to the color difference only. The size is almost certainly wrong.

@gitfool

This comment has been minimized.

@DHowett-MSFT
Copy link
Contributor

Good, good, y'all can head over to #900

@DHowett-MSFT
Copy link
Contributor

This is in fact a bug submitted by @shanselman himself so 🤷‍♂

@calloncampbell
Copy link

I followed the instructions by @shanselman post https://www.hanselman.com/blog/HowToMakeAPrettyPromptInWindowsTerminalWithPowerlineNerdFontsCascadiaCodeWSLAndOhmyposh.aspx and I still see wonky icons.

Windows Terminal version 0.9.433.0

image

@shanselman
Copy link
Member

@calloncampbell I'll help you via twitter, not in a GH issue

@calloncampbell
Copy link

OK my issue is not related. I had downloaded the wrong font. Thanks @shanselman for the help.

@sergio-u

This comment has been minimized.

@miniksa
Copy link
Member

miniksa commented Apr 22, 2020

@XzAeRo
Copy link

XzAeRo commented Apr 23, 2020

@miniksa FYI the wonky icons comment was due to an uninstalled font

@miniksa
Copy link
Member

miniksa commented Apr 24, 2020

With the completion of this checklist: #610 (comment), I am deeming this bug closed and resolved by other issues on the tracker. Thanks. Please file new issues against the latest version if there are still problems not addressed or covered by the open #900 or #455.

@miniksa miniksa closed this as completed Apr 24, 2020
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Apr 24, 2020
@tm9k1
Copy link

tm9k1 commented Jun 11, 2020

@miniksa were you able to get around the fontWeight config var?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Fonts Related to the font Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests