| ▲ | rezmason 8 hours ago | |||||||
Were fonts always able to do "texture healing"? Has no one tried this before? | ||||||||
| ▲ | fontain 8 hours ago | parent | next [-] | |||||||
“Texture healing works by finding each pair of adjacent characters where one wants more space, and one has too much. Narrow characters are swapped for ones that cede some of their whitespace, and wider characters are swapped for ones that extend to the very edge of their box. This swapping is powered by an OpenType feature called “contextual alternates,” which is widely supported by both operating systems and browser engines. Contextual alternates are normally used for certain scripts, like Arabic, where the shape of each glyph depends on the surrounding glyphs. And they are also used for cursive handwriting fonts where the stroke of the “pen” might have different connection points across letters. Texture healing is a novel application of this technology to code.” | ||||||||
| ▲ | dhosek 7 hours ago | parent | prev | next [-] | |||||||
Always able to do it? Yes. Even before OpenType alternates, the extended ligature support in TeX 3.x would have also allowed for this sort of thing. Why has no one tried it before? Because (a) nobody thought of it and (2) OpenType alternates, while they’ve been around for a while, have not always been supported in the sorts of programs that use monospace fonts (code editors and terminals) | ||||||||
| ▲ | layer8 6 hours ago | parent | prev | next [-] | |||||||
It really only makes sense on high-DPI displays (or large font sizes), which didn’t used to be that wide-spread. Conversely, nobody seems to be doing pixel-based hinting anymore, which is why all newer fonts tend to look terrible at small font sizes on lower-DPI displays. | ||||||||
| ▲ | micampe 7 hours ago | parent | prev [-] | |||||||
There have been other attempts; Commit Mono uses a slightly different approach: https://commitmono.com/ (don’t know which came first) | ||||||||
| ||||||||