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

Some installed fonts are not loading #295

Open
EgMan opened this issue Oct 23, 2018 · 22 comments
Open

Some installed fonts are not loading #295

EgMan opened this issue Oct 23, 2018 · 22 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase

Comments

@EgMan
Copy link

EgMan commented Oct 23, 2018

Windows build:
Microsoft Windows [Version 10.0.16299.665]

What I'm trying to do:
Install a font to windows and load it into the default terminal emulator for WSL ubuntu.

What's wrong:
Not all installed fonts are available. As one example, I have installed GNU unifont as shown here:
image

But I am unable to locate this font in the settings pane of the default terminal.
image
image

On the other hand, other terminal emulators have no problem locating all of my fonts. Here's the font selected ConEmu's settings pane:
image

This is not the only font I've had issues with. For some reason, fonts like Ubuntu Mono show up just fine. But fonts like GNU Unifont or Everson Mono will not show up. Is there some hidden feature of these fonts which makes them incompatible for WSL ubuntu's default terminal? Or is this perhaps a defect? Any help with getting these fonts added would be greatly appreciated. Thank you.

As a side note: I'd also appreciate if anyone could educate me on what is the proper name for "WSL ubuntu's default terminal."

@zadjii-msft
Copy link
Member

As a side note: I'd also appreciate if anyone could educate me on what is the proper name for "WSL ubuntu's default terminal."

The default "terminal" on Windows is conhost.exe. It's the same application that hosts all commandline applications on Windows - cmd.exe, powershell, wsl, all run attached to conhost.exe.

I believe most monospaced fonts should work in conhost, but I can't recall the specific metrics by which we decide if a particular font is usable or not. Perhaps @miniksa might know more?

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues labels Oct 23, 2018
@alabuzhev
Copy link
Contributor

the specific metrics by which we decide if a particular font is usable or not

The Old New Thing - Why are console windows limited to Lucida Console and raster fonts?

@zadjii-msft
Copy link
Member

I don't think that's strictly true anymore. We (@paulcam206) added support for more freely setting the fonts, we fixed the bugs Raymond describes there.

@miniksa
Copy link
Member

miniksa commented Oct 27, 2018

It looks like we're asking GDI for FIXED_PITCH, FF_MODERN, and TrueType fonts that match the charset associated with whatever codepage you have the console set to. See LOGFONT documentation and TranslateCharsetInfo documentation.

If it doesn't show up, then you either have the wrong codepage or GDI thinks that the font doesn't have one of the properties above.

Also the limitations described by Raymond don't all apply anymore. We took a bunch of them out by either fixing bugs or inserting workarounds like clipping glyphs to rectangles.

@Jaykul
Copy link
Contributor

Jaykul commented Nov 5, 2018

You can actually set pretty much any TrueType font (via the SetCurrentConsoleFontEx API) if you don't care about how weird it looks ...

I have C# code for the LOGFONT stuff in my font module if that helps...

@E3V3A
Copy link

E3V3A commented Dec 7, 2018

I just filed this and this issues, but was referred back to you console guys here.

  1. Somehow color escape codes are not being passed down to mintty from ColorTool.exe
  2. For some reason the monospace fonts are not getting found in the (PS) console settings.
  3. For some reason the 2 default (?) fonts (Lucida Console and Consolas) has so terrible unicode support, it doesn't even provide for the basic ASCII graphics unicodes, like these and here.
  • Why do you make such limited fonts the default?
  • What working console font do you recommend for maximum language and unicode glypth support?
    (Perhaps the suggested unifont?)

@zadjii-msft
Copy link
Member

@E3V3A Could you file new issues for each of these? Best practice is to not overload existing threads with new (unrelated) topics.

@mailinglists35
Copy link

mailinglists35 commented Dec 20, 2018

I have copied apples' SF Mono from a macos box but it is not shown in the font choosing ui.
What can a humble end user do to have this font available?
The blog linked above points to a kb article http://support.microsoft.com/kb/247815 but it is no longer available

@miniksa
Copy link
Member

miniksa commented Dec 20, 2018

@mailinglists35, My October 26th post is what the code is looking for when it is choosing a font.
Otherwise, I have no idea why your font isn't appearing. I couldn't tell unless I debugged it.

I'm also relatively certain that your usage of copying and pasting it from a MacOS box to a Windows machine is against Apple's licensing agreement for that font. As such, I cannot help you any further.

@mailinglists35
Copy link

mailinglists35 commented Dec 21, 2018

against Apple's licensing agreement

Using a free developer account I have downloaded Xcode 8 which contains the font.
Using WSL I was able to unpack the downloaded file and extract the font.

Nowehere in the license file I find text restricting personal usage of that font. There are paragraphs about the software and sdk, but literally nothing about the font.

@miniksa
Copy link
Member

miniksa commented Dec 21, 2018

Fonts, especially fonts that major corporations commission as their flagship design system, are generally copyrighted and licensed.

An express lack of written permission means that I must choose the safe option and believe that I do not have permission.

Therefore, I cannot gain access to this font and debug the issue which follows then that I cannot help you. I'm sorry.

@E3V3A
Copy link

E3V3A commented Dec 21, 2018

@mailinglists35
Why don't you choose another font? 🙈
(and perhaps you get some help with the issue. at hand.)

@Jaykul
Copy link
Contributor

Jaykul commented Dec 22, 2018

For what it's worth, the SF Font is San Fransisco, the system font for iOS, macOS, tvOS, and watchOS. which is freely downloadable, but is only for use creating mock-ups of UI for iOS, macOS, tvOS, and watchOS -- you can see the license in the source of that page, or in the license file in the zip.

@mailinglists35
Copy link

mailinglists35 commented Jan 30, 2019

Also Roboto Mono is not displayed. Latest update TTF files here

@MFry
Copy link

MFry commented Oct 2, 2019

This is still an issue.

@zadjii-msft
Copy link
Member

@MFry typically you can tell that something is still an issue if the issue is still open 😉

@AnrDaemon
Copy link

The "Hellfont Cyr" terminal font is not rendered in v2 console. Instead of its 9x16 typeface, some random 12x16 is chosen.

(Left is ForceV2=0, right is ForceV2=1. Same font settings.)

image

@DHowett-MSFT
Copy link
Contributor

@AnrDaemon Sorry, the v2 console doesn't support bitmap fonts.

@AnrDaemon
Copy link

Then why it allows selecting them, pretty please?

@DHowett-MSFT
Copy link
Contributor

@AnrDaemon because the last time anybody made sweeping changes to the property page infrastructure in the console I was an infant. 😄

@AnrDaemon
Copy link

I'm not saying about sweeping changes. I'm saying about disconnection between apparent configuration and actual behavior.
Also, there's no true type font that does not induce eye bleeding after hours of watching it in console.
Iosevka Slab is close, but not all shapes are blending well. (And no, Fira Code is worse than Lucida Console, as it is same sans serif but condensed.)

@zadjii-msft
Copy link
Member

Also, there's no true type font that does not induce eye bleeding after hours of watching it in console.

I mean, speaking as a developer who uses TrueType fonts for hours in the Terminal and doesn't experience eye bleeding, you might want to talk to a doctor about that. 😝

The real answer here is simply that the Vintage Console property sheet simply isn't receiving updates anymore. So at some point, we stopped supporting bitmap fonts in the console, but forgot to remove the code from the property sheet to load those fonts as well. It could be reasoned that this is a bug in behavior for the property sheet. I'll move that to it's own thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase
Projects
None yet
Development

No branches or pull requests

10 participants