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
Fails to render properly if font does not support Nerd Fonts #1
Labels
Comments
There are various ways you can determine which font the console is using. However these differ between Windows and Linux (and not all distros follow the same pattern). I would prefer to use Ansi escape codes if possible. Two reasons:
Currently Ansi escape doesn't support querying font capabilities. |
I think the best thing to do is:
|
Suggestion: enum NerdFontsSupported
{
Yes,
No,
// Maybe a separate PR added later
Detect
}
class MarkdownConsole
{
// New property
public NerdFontsSupported { get; set; } = NerdFontsSupported.Detect;
} |
David-Rushton
added a commit
that referenced
this issue
Aug 28, 2022
Merged
David-Rushton
added a commit
that referenced
this issue
Aug 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
Markdown.Console
requires Nerd Fonts.If your font has not been patched fallback characters are used, These are less than ideal and lead to a messy output. The aim of this project is to deliver beautiful rendering of markdown in the console. Messy fallbacks undermine this.
Here are few ways we could address this. I've not given this a lot of thought. So there may well be other/better ways of addressing.
Ideas
Only use Nerd Fonts if available
Detecting font support in the terminal may be impossible. Using a whitelist of font names is also problematic.
Make Nerd Fonts configurable
This is probably the easiest option. But in many case you may not know at design time what will be available at runtime.
Example
Win 11 Cascadia Code without Nerd Fonts
Win 11 Cascadia Code with Nerd Fonts
The text was updated successfully, but these errors were encountered: