-
Notifications
You must be signed in to change notification settings - Fork 436
Conversation
Ouch! I forgot about tests. |
All should be fine now 😊 |
Hi, thanks for contributing! There's a catch with bold characters: there are two ways to display them:
Bright colors are colors ranging from color8 to color15, they are used as a replacement for color0 to color7 for bold characters. termtosvg currently uses bright colors, but I don't know what the right behavior is though. I'm not even sure there is one. Maybe using a bold font if the color palette does not include bright colors, and use bright colors otherwise? What's your color configuration like? I will look at this in more detail in the next few days. |
This is a fallback mechanism for terminals which don't support bold fonts (some old ones). At this moment according to this page, only Eterm render bold text using bright colors. Rendering bold text using bright colors it's a real problem if you want to use light colors and bold text at the same time (like me).
I think termtosvg should avoid rendering bold text using bright colors. It's a very old trick for terminals which nobody uses nowadays. |
I'm relying on bright colors for my own color theme so it would be nice if my own tool could handle them. :D Urxvt (which I'm using) displays bold characters using a bold font and a bright color so that's probably the right thing to do. I didn't notice this earlier because I have disabled the bold font in my configuration. Your patch allows
So it should make everyone happy, except maybe people who don't want a bold font. I'd rather not clutter the configuration file with unused options so I'll consider this later if it's requested. |
Manually merged in master: f623de9 Thanks again! |
FYI this feature is included in the release candidate I've just uploaded to test.pypi.org. You can get it with the following command:
The corresponding git tag is 0.4.0rc0 If you give it a try and find a bug please open an issue about it. :) |
Hi! First, thanks for superb utility!
I found that currently
termtosvg
doesn't support the bold text. It adds styles, but text rendered with normal width.Now, if the character has bold modification flag it adds
font-weight="bold"
attribute to SVG node.