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

Frames and special characters from bitmap TTF font are not visible #7927

Closed
atlka opened this issue Oct 15, 2020 · 17 comments
Closed

Frames and special characters from bitmap TTF font are not visible #7927

atlka opened this issue Oct 15, 2020 · 17 comments
Labels
Area-Fonts Related to the font Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@atlka
Copy link

atlka commented Oct 15, 2020

Windows 10 Pro

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.19041.0 Microsoft Windows NT 10.0.19041.0

Windows Terminal
Version: 1.3.2651.0

Steps to reproduce

Use TTF font containing only embeded bitmaps, for example https://www.pg.gda.pl/~atlka/fonts/terminusa.ttf with 12pt size and 96DPI (no scaling) screen settings.
In the profile settings.json insert:

"fontFace": "Terminusa",
"fontSize": 12,

Expected behavior

All bitmap glyphs form bitmap font are displayed on the terminal like in the cmd.exe window.

Actual behavior

You can see letters and digits but no special chars and frames - they are just blanks.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 15, 2020
@zadjii-msft
Copy link
Member

no special chars and frames

What characters are you trying to output exactly? The exact UTF-8 encoding of the characters would help here immensely, or even just copy-pasting the character into github

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 15, 2020
@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Oct 15, 2020
@atlka
Copy link
Author

atlka commented Oct 15, 2020

far with Windows Terminal example:
far-windows-terminal

far with Cmd.exe example:
far-cmd

Cmd.exe with ssh.exe and test UTF8 file:
box-drawing

With Windows Terminal we can see only blanks here.
If I try to display a char which glyph is not included in bitmap font Windows Terminal displays it, probably substituting it from other font - the default Cascadia font I think.

@zadjii-msft zadjii-msft added Area-Fonts Related to the font Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Oct 15, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 15, 2020
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Oct 15, 2020
@DHowett
Copy link
Member

DHowett commented Oct 16, 2020

oh my gosh, you're totally right!

/cc @miniksa for fun

When we get the geometries from the font for the box-drawing characters, there aren't any. This is obvious in retrospect. I totally forgot that TTF files with bitmap strikes were a thing.

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 16, 2020
@miniksa
Copy link
Member

miniksa commented Oct 16, 2020

Man, fonts are hard. We just need to realize these are bitmap strikes and not use the scaling thing I guess.

@tidux
Copy link

tidux commented Feb 16, 2021

TTF/OTF fonts provide embedded bitmaps for regular number/letter characters as well, which is still missing. Perhaps expose a "use embedded bitmaps in font" toggle to settings.json? That's how FreeType Fontconfig does it on Linux.

@wolf99
Copy link
Contributor

wolf99 commented May 27, 2021

Just came from #10038.
I'm not familiar with the labels and milestones, do the current ones mean that this is intended to be fixed for WT v2.0 (i.e. Winter 2021) ?

@zadjii-msft
Copy link
Member

Yep

@atlka
Copy link
Author

atlka commented Jun 4, 2021 via email

@wolf99
Copy link
Contributor

wolf99 commented Jun 4, 2021

I would tend to agree with @atlka.
I have noticed this when using tig (https://jonas.github.io/tig/). The git graph therein no longer shows any lines.
This worked just fine in previous versions so this is a regression rather than a feature IMHO.

@tsu-kunn
Copy link

tsu-kunn commented Sep 8, 2021

I would tend to agree with @atlka.
I don't have this problem with VSCode or Git Bash, and I hope it will be fixed.

@atlka
Copy link
Author

atlka commented Sep 30, 2021 via email

@miniksa miniksa added the Help Wanted We encourage anyone to jump in on these. label Oct 6, 2021
@miniksa
Copy link
Member

miniksa commented Oct 6, 2021

I hear what you're saying. We just only have so many folks to go around on fixing issues. We'd happily welcome a community submission here if someone knows how to detect a font with bitmaps embedded here in our DirectX engine route and make it do the old behavior.

From our perspective, this likely remains a priority 3 just because it's a graphical glitch that can be self-serviced by the user through changing to a different font. That's not to say it isn't important, but it is ranking lower than all the accessibility and crash and default application bugs and such that we've been juggling as of late. I'm sorry it's taking so long.

@willeccles
Copy link

Just out of curiosity, why does this affect only some fonts (or so it seems)? I don't know much about fonts, and using cozette works fine for me (box drawing characters and such all show up just fine) using the "vector" TTF. I presume it's because cozette supplies more information than some fonts do?

@tidux
Copy link

tidux commented Oct 25, 2021

@willeccles some fonts are defined as fixed size sets of bitmaps, rather than sets of vectors for dynamic font sizes. For a Windows centric example, Courier New is a vector font and Courier is a bitmap font. Vector fonts are generally considered more modern, and are the default in most places for a good reason, but bitmap fonts have absolutely zero blurring and distortion, so many people prefer them for long sessions of work in terminals to reduce eye strain. This issue applies specifically to bitmap fonts.

@miniksa
Copy link
Member

miniksa commented Nov 3, 2021

I have a feeling like this might be enabled by #11623 in the future.

@lhecker
Copy link
Member

lhecker commented May 3, 2023

Sorry for taking such a long time, but I believe this issue has been fixed in #14959. Here's how it looks like now:

image

Other bitmap fonts, like Terminus TTF also work much better now (although that one in particular requires you to manually adjust the "cellHeight" - see #14255). This change will ship in 1.18 later this month.

@lhecker lhecker closed this as completed May 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label May 3, 2023
@atlka
Copy link
Author

atlka commented May 4, 2023 via email

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 Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

9 participants