-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No bold text in terminal output #157
Comments
Imo this can't be tested programmatically with some random characters in a reliable manner unless you test a critical subset. There are fonts that handle bold for some glyphs and dont for others (esp. bold box drawing chars are kinda broken in all monospace fonts). |
Hi @protasenko, thanks for reporting. Running I think that adding a test which evaluates that printing a fixed sentence with a bold word that will place the If the host application of xterm does not display the bold characters after ensuring that this test succeeds most probably means that this is a font issue and not an xterm.js issue. @protasenko are you OK with closing this issue? |
Hi @parisk, just cloned latest source and started demo app.js. Your |
Thanks @protasenko for the info. I am not sure what midnight commander is actually. Could you provide some more information about it and how it is being used along with xterm.js? Maybe we should remove the |
Turns out I was on 90% zoom, that caused the bold font to have different character size than normal. |
Interesting case @sorgloomer. Not sure if we can handle this programmatically though. |
I agree. I did a quick experiment with absolute positioned spans, one per each character, but the result is unbearably slow, and I didn't even try background coloring. |
You can "fake" bold in any font using CSS. .terminal .xterm-bold { @parisk : Midnight commander is a port of an old DOS program originally called Norton Commander |
Shifting the shadow to the right and having no blur would probably be better so the text is not blurry. Still not ideal though. .terminal .xterm-bold {
text-shadow: 1px 0px 0px rgba(0, 0, 0, 1);
} We could also use a fix similar to what we need to do for braille chars and wrap each char in a fixed width span? |
The sub-pixel blur just softens the edges a bit since I like a smoother font. Shifting both left and right by sub-pixel instead of a full pixel right stops the text from running together too much. And don't specify rgba(0,0,0,1) since not all text is black :) But, I don't see why bold in a monospace font would stop being monospace! |
Yeah bold shouldn't affect the width, this broken bold stuff is just a precaution when the font is broken AFAIK. |
This issue is stale and no longer relevant with the canvas renderer/chars being forced to align with a grid. |
isBoldBroken()
always returns true since it inserts the test span atbody
level where the font is most likely not mono-spaced. Instead, it should test at or below the node where terminal font is specified (.terminal
). As an example, the below version will allow bold text to be rendered by terminal:The text was updated successfully, but these errors were encountered: