|
|
|
|
|
by swsieber
2547 days ago
|
|
Did you know that you can abuse font ligatures to have adjustable indents even when using spaces and not tabs? Its possible using font ligautures to turn predefined sequences of characters into a different set of glyphs. This is usually used to display nicely joined letters, or rendering multi-character math symbols as a nicer single wide character. An example of the letters thing is the sequence "fi" on mac. It's one I see on macs and in my android keyboard autocomplete. But you can abuse it. I took a mac fixed width font and added a ligature that turned four spaces into three spaces. And what do you know, it actually worked. I tried it in IntelliJ and with whitespace highlighting on, it correctly takes up 3 spaces but has 4 space markings - so IntelliJ handles it properly. I don't advocate this, but i would like to make a cli tool someday that lets you take a ttf and add in whater spacing conversion ligature you want. |
|
Every time this subject comes up I get farther down on the opinion that not moving forward from file formats based on what a Model 33 Teletype was capable dealing with is a mistake that keeps on giving.