Git Product home page Git Product logo

Comments (13)

bitcrazed avatar bitcrazed commented on August 30, 2024 4

Hey @kumarharsh - Glad to see that most of your issues are resolved in recent builds of Console.

The problem with symbols (esp. emoji, CJK glyphs, etc.) not rendering correctly is due to Console still rendering text using GDI which doesn't support font-fallback. So, if your currently selected font doesn't have a glyph for a given Unicode code-point, and we can't use font-fallback to find a similar font that does, we have to display an "I don't know what this glyph should be" symbol.

However, we ARE working on a new DirectWrite text renderer which will support font-fallback, and will enable the Console to find & render the VAST majority of Unicode glyphs. Stay tuned! ;)

from pure.

oranja avatar oranja commented on August 30, 2024 2

It makes sense that the global windows font supports a narrower subset of Unicode characters than the terminal itself.
@kumarharsh , it should be possible to set a different font for window titles. in Windows 10. To help diagnose the problem, do you mind setting the window font to match the terminal font? You can even try to install and use a Powerline-patched font. It might render nice geeky results regardless of this issue.

Anyway, I highly doubt that this is a pure, or even a fish, issue.

from pure.

kumarharsh avatar kumarharsh commented on August 30, 2024 1

In an amusing turn of events after again switching to WSL yesterday, I found myself clicking on this issue without reading who posted it. It's still the same issue 😂

So, I don't have an update as such, since the issue is definitely with conhost. But @bitcrazed has stated that it might get fixed in a (as yet unannounced) future build of Windows.


Update: I did decide to stick with pure this time. I just changed the symbols for git indicators and prompt to use supported characters, and I'm in business!

# in ~/.config/fish/fish_variables
SETUVAR pure_symbol_git_arrow_down:'↓'
SETUVAR pure_symbol_git_arrow_up:'↑'
SETUVAR pure_symbol_prompt:'>'

from pure.

rafaelrinaldi avatar rafaelrinaldi commented on August 30, 2024

Thanks for reporting @kumarharsh, will look into that as soon as I can.

from pure.

kumarharsh avatar kumarharsh commented on August 30, 2024

I've looked into some other prompts too, and they also output boxes for some special characters, such as and . It seems like the default font (consolas) supports these characters, but the conhost doesn't

from pure.

kumarharsh avatar kumarharsh commented on August 30, 2024

Yes, that's what I wanted to say earlier: I think it's a conhost issue, not a pure or fish issue per se. I've tried changing fonts to 'Ubunut Mono' and even Source Code Pro, changing code pages in conemu, enabling pseudographic font, and some more things, but nothing helps.

from pure.

rafaelrinaldi avatar rafaelrinaldi commented on August 30, 2024

@kumarharsh @oranja I think it's more of a unicode issue. It's not a perfect mapping between OS's. We can create a table of characters to use based on that. Should fix the issue.

from pure.

edouard-lopez avatar edouard-lopez commented on August 30, 2024

@kumarharsh This is a BashOnWindows issue, please report to the official BashOnWindows repo or search for font-related issue.
Please, drop a link to this tread when you find a solution.

from pure.

bitcrazed avatar bitcrazed commented on August 30, 2024

Hey all. I am trying to tease apart what's going on here.

Based on the screenshot above, I am guessing that you're running ConEmu on Win10? Hint - OS versions, build numbers, etc. are most useful when trying to diagnose issues ;)

I am guessing that something somewhere is calling SetConsoleTitleW(...) passing UTF-8 encoded title text (which will need to be converted to UCS-2), or calling SetConsoleTitleA(...), passing Unicode text (rather than ASCII), resulting in confusion/corruption.

If you're able to repro using Windows Console, please file an issue at https://github.com/microsoft/console. If not, and you can repro in EonEmu, please file an issue in ConEmu's issues: https://github.com/Maximus5/ConEmu.

Thanks.

from pure.

kumarharsh avatar kumarharsh commented on August 30, 2024

@bitcrazed I tried to run the fish shell in cmd.exe, and most of the issues in my screenshot above seem to have been resolved, especially the titlebar issue.

Windows console doesn't render the characters for git status, etc. which are used by pure: see here: https://github.com/rafaelrinaldi/pure/blob/master/conf.d/pure.fish#L13-L15. I presume this issue of extending the support for characters is already known to the console team (like microsoft/terminal#115)?

from pure.

gangsthub avatar gangsthub commented on August 30, 2024

cc/ @bitcrazed, What font do you recommend (that is free) and can display correctly emojis and is monospaced for a proper use within the Console? Thanks in advance!

from pure.

kumarharsh avatar kumarharsh commented on August 30, 2024

@gangsthub As of now, Windows console can't display emojis or some other glyphs like those used in powerline using any font. Ligatures, etc are also not supported yet. I've tried with Fira and Operator.

from pure.

bitcrazed avatar bitcrazed commented on August 30, 2024

@gangsthub You may have some luck with some patched fonts, but ultimately, even patched fonts won't give you broad emoji support, nor ligatures, etc. - these features require a font rendering system based on DirectWrite, not GDI which the Console currently uses.

from pure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.