Describe your feature request
Foot currently allows font glyphs to "bleed" (extend outside their bounding box) from left to right. This was done for two main cases:
- Support rendering (mainly) glyphs from private use areas (PUAs)
- Handle italics "leaning" into the next character
Depending on your definition of a valid font, point 2 can be argued to be caused by broken fonts (the glyphs are extending outside their bounding box).
1 is better solved with the text-sizing protocol (by setting an explicit width). Or we can add a config option defining which codepoints should be allowed to render double width.
Q: if we already support this, and a lot of fonts are affected, why should we remove support?
A: first, I don't know if it really is "a lot of fonts". This is something we'll have to investigate. I'd argue that if all major fonts don't bleed, then "a lot of fonts" isn't really an argument. Yes, we'll break a couple of fonts, people will be mad etc. But if we can say that "look, all major fonts are well behaving..." then it'll be easier for people to accept.
Second, we only do left-to-right. We don't do right-to-left, or any vertical bleeding. I don't ever intend to support that. And if so, why should we support left-to-right?
So what do we gain by removing support for font bleeding? Reduced rendering complexity, and rendering performance.
It should be noted that one can already turn this off in foot by setting tweak.overflowing-glyphs=no (it defaults to yes). You do gain most of the performance improvements by doing that, but code complexity obviously remains.
Without having looked to deep into it, my belief is terminal emulators fall into one of two categories: either they support font bleeding in all directions, or they don't support it at all. Foot is the odd one, only supporting left-to-right.
Examples
Generated by running
foot -c /dev/null -o tweak.overflowing-glyphs=no -f <font>:size=20
followed by
printf "\n\e[48:2::0:0:0m pgjbdPMW \e[3m pgjbdPMW \e[1m pgjbdPMW \e[0;48:2::0:0:0;1m pgjbdPMW\e[m\n\n"
TODO
### Describe your feature request
Foot currently allows font glyphs to "bleed" (extend outside their bounding box) from left to right. This was done for two main cases:
1. Support rendering (mainly) glyphs from private use areas (PUAs)
2. Handle italics "leaning" into the next character
Depending on your definition of a valid font, point 2 can be argued to be caused by broken fonts (the glyphs _are_ extending outside their bounding box).
1 is better solved with the text-sizing protocol (by setting an explicit width). Or we can add a config option defining which codepoints should be allowed to render double width.
Q: if we already support this, and a lot of fonts are affected, why should we remove support?
A: first, I don't know if it really is "a lot of fonts". This is something we'll have to investigate. I'd argue that if all major fonts don't bleed, then "a lot of fonts" isn't really an argument. Yes, we'll break a couple of fonts, people will be mad etc. But if we can say that "look, all major fonts are well behaving..." then it'll be easier for people to accept.
Second, we only do left-to-right. We don't do right-to-left, or any vertical bleeding. I don't ever intend to support _that_. And if so, why should we support left-to-right?
So what do we gain by removing support for font bleeding? Reduced rendering complexity, and rendering performance.
It should be noted that one can already turn this off in foot by setting `tweak.overflowing-glyphs=no` (it defaults to `yes`). You do gain most of the performance improvements by doing that, but code complexity obviously remains.
Without having looked to deep into it, my belief is terminal emulators fall into one of two categories: either they support font bleeding in all directions, or they don't support it at all. Foot is the odd one, only supporting left-to-right.
### Examples
Generated by running
```sh
foot -c /dev/null -o tweak.overflowing-glyphs=no -f <font>:size=20
```
followed by
```sh
printf "\n\e[48:2::0:0:0m pgjbdPMW \e[3m pgjbdPMW \e[1m pgjbdPMW \e[0;48:2::0:0:0;1m pgjbdPMW\e[m\n\n"
```
| Font | Output |
|----|----|
| Cascadia |  |
| Dejavu |  |
| Fira |  |
| Inconsolata |  |
| Intel One Mono |  |
| Iosevka Term |  |
| Jetbrains |  |
| IBM Plex |  |
**TODO**
* [x] Check all major fonts
* [ ] (optionally) check a bunch of other terminal emulators