Get the top HN stories in your inbox every day.
turnsout
nvartolomei
Commit Mono font does something similar and calls it “Smart kerning”. Visit https://commitmono.com/ and click on the “04 Intelligent” tab for details.
In practice this is unusable. Because the width of the letters now depends on the succeeding character, the text jumps as you write it. Super annoying.
Cool for reading. Awful for writing.
CGamesPlay
It doesn't in this font? Possibly because of what they talk about where it optimistically gives as much space as possible to succeeding glyphs. You can try it on the page; the code sample boxes are editable. I see no jumping when I type "calming", their example word.
[append] Oh, I do see some jumping when I type "optimized". Honestly, it doesn't seem very jarring to me; the jumping is always right where the edit point is so the added or removed letter causes a much bigger jump.
undefined
sensanaty
Unrelated, but why is it that Font marketing pages specifically always have such cool-looking demoes? I love the navigation on that site, I might steal that for my own site
tambourine_man
Probably because if you care about typography, you care about design and you crafted that demo page with passion, instead of picking a free template with 3 columns adorned by free icons of rockets, gears and brains.
sakjur
If this gets popular, I could see a text editor that lets you use a non-healing version of the font for any text that has been written in the viewport and then swaps it out as soon as you no longer looks at that block of text – or straight up uses a different font for my modifications compared to the committed code.
But even without anything like that, if it’s good for reading I like to use different fonts when reviewing and writing code to help with the context-switch, so I think this could be useful to me. And I guess people in regions where a single keystroke isn’t always a single character such as Korea, China, Japan and the arab world might be used to the jarring effect already?
philsnow
> I could see a text editor that lets you use a non-healing version of the font for any text that has been written in the viewport and then swaps it out as soon as you no longer looks at that block of text
The text editor widget on their page is a bunch of "line" divs with individual terms being inside spans. If you add an inline style of
font-feature-settings: "calt" off;
or, more completely, font-feature-settings: "calt" off,"dlig" var(--ligatures,1),"ss01" var(--ligatures,1),"ss02" var(--ligatures,1),"ss03" var(--ligatures,1),"ss04" var(--ligatures,1),"ss05" var(--ligatures,1),"ss06" var(--ligatures,1),"ss07" var(--ligatures,1),"ss08" var(--ligatures,1);
to a single line div or a single term span, it won't do the healing. If one of the CSS pseudo selectors worked for these kinds of elements (I see there are a lot that apply to forms, but.. maybe :active / :active-within would work for editable spans?), you could have healing automatically apply to terms when they 'blur' / when they're no longer active.pdpi
If it's good for reading, it's especially good for Github itself, which is a largely read-only interface for code.
tomhallett
Could the “jump” problem be improved with a subtle transition (200ms, 1s, etc) from one state to the other?
If the editor “repaints” commit mono on the letter-pair boundary, I could see that being a very jumpy UX — ie: the letter I just typed is moving by a few pixels. But if that repaint happens on the word boundary it might be less noticeable?
In either case, a transition could be helpful for commit mono and/or Monaspace. (But agreed with above comments that Monaspace is more subtle because it spreads the spacing over the entire word, so maybe the transition is not actually percievable or worth it). :)
Daneel_
Exactly my experience as well.
naikrovek
[flagged]
idan
It really is super clever! And the crazy part is that it's been possible for a super long time, just nobody thought of the technique. Mad props to Riley Cran and the entire crew at https://lettermatic.com for devising this technique as a part of this project.
csande17
I'm curious: did the team consider applying the technique to letter pairs like Ty and TA that traditionally get kerned closer together in proportional fonts?
As far as I can tell from the demo, these pairs currently aren't affected by texture healing, and they look a little awkward in Radon especially.
rob74
Meh... not convinced. Once you have toggled the checkbox a few times, you start noticing inconsistencies: e.g. in the example shown by default, the second "m" in "time_limit" is obviously wider than the first one because it has more space to "grow" having "i"s on both sides. Not sure if I like this...
JW_00000
Also, type mimi in the first code example: the two 'm's have different width...
zokier
So many people here are now praising texture healing, but to me its just half-way measure. Why are we as a community so resistant for adopting variable-width fonts? This texture healing already breaks perfect character cell grid, so in some ways it feels like worst of both worlds.
I feel at least partially the same about fancy ligatures; we could just use the actual characters in source code, Unicode is widely supported. Raku does that, but it would need better typesetting (with variable-width fonts) to really shine.
SonOfLilit
I hate ligatures in code.
It sometimes breaks out of the grid, but there still is a grid. Things are sometimes not micro-aligned but still macro-aligned, and that matters (to me).
zokier
If two character combination breaking the grid is acceptable then is three character combos ok too? What about four characters, or twenty? Where do you draw the line?
chrismorgan
It only breaks the grid visually (and not by much); for layout purposes, which is what you depend on, the grid is still intact.
Why do we keep using fixed-width fonts? Because a lot of stuff has been written that depends on a columnar grid. Most notably, terminals are absolutely predicated on it and fundamentally cannot support any other mode of operation.
To begin with: visual alignment, ASCII art, diagrams using box-drawing characters, &c., both in code and in the output of diverse tools:
def function_name(and_long_parameter_list,
so_that_it_wraps="like so"):
pass
ABC_D = 1 # Explanation
ABC_EFG = 2.0 # Another one
ABC_HI = 34 # A third one
┌────────┬─────────────┐
│ Tables │ Using │
┝━━━━━━━━┿━━━━━━━━━━━━━┥
│ Cell │ Box-drawing │
│ Cello │ characters │
│ Viola │ ⋮ │
│ Voilà │ │
└────────┴─────────────┘
error: cannot find macro `behold` in this scope
--> <anon>:1:13
|
1 | fn main() { behold!() }
| ^^^^^^
$ ls -la
total 43210
drwxr-xr-x 17 root root 4096 Jan 1 23:45 .
drwxr-xr-x 17 root root 4096 Jan 1 23:45 ..
lrwxrwxrwx 1 root root 7 Feb 29 2020 bin -> usr/bin
drwxr-xr-x 2 root root 0 Dec 31 23:59 boot
⋮
(I included the ⋮ in the box drawing table deliberately, because it demonstrates a weakness in the scheme: terminals and most monospacy text editors force stuff into the grid, just clipping or overflowing the cell if a glyph has to come from a fallback font, but most other things don’t, so you end up with visual alignment breaking if the fallback font used has different metrics. Also the whole East Asian Width thing and ucwidth and whatever is super messy. Your monospace font may or may not include the box-drawing characters, but it’s much more unlikely to include ⋮.)Terminals are also built on columnar behaviour; there are escape codes for moving the cursor to such-and-such a line and column, for example, and things like a side-by-side split require columnar behaviour.
Text editors can go non-monospaced, but it breaks various content for the reasons discussed, and you’ll need monospace for any terminal because loads of stuff will break otherwise, so combined with inertia, even editors that support proportional fonts aren’t often used that way if they default to monospace.
(Me, I’d rather like to use a proportional font while editing, but I’m not moving off Vim for it, so I’ll probably never get it. But for presentation, I like to go at least partially proportional with the monospace font Triplicate’s Poly variant, which breaks strict monospaceness, widening characters like w/m/W/M and narrowing characters like i/j/l/1. As for what Monaspace’s texture healing, I like it most of the time, but am not sold on cases like some_function_w_, where the last two underscores are markedly shorter than the first and it feels unbalanced.)
matj1
I agree with that many present tools expect character grid, but moving away from character grid would be not as much work as it seems IMO.
Code can be aligned with elastic tabstops ( https://nickgravgaard.com/elastic-tabstops/ ) or virtual formatting (that things are aligned according to syntax regardless of whitespace).
Things to align in terminals are mostly tables, and they could be rendered as tables if the terminal supporting that knew that they are tables. Nushell natively supports tabular data structures, so rendering them as proper tables would need just one change – the table renderer.
camgunz
To build on to sibling chrismorgan's excellent post, fixed-width fonts/ASCII art/Unicode drawing are a really elegant way to get 80% of what you'd ever want. Getting to 100% involves a full-on rendering system and markup which is 10x the work and complexity. To date, most people don't want that in their editor.
zokier
Yet the most popular editor is vscode which is browser based and has all the rendering tech just sitting there, largely unused.
lionkor
thats not what it does - it maintains monoSPACE while chaning the characters to not look the same width -- the best of both worlds, if anything
omnimus
Its ok but instead of uneven spacing you get uneven character widths.
It might be ok but there is a reason why type designers make every character to be the same and try to balance everything including spacing.
Monospaced fonts designs are dictated exactly by that limit of fixed character+fixed space.
But maybe the “healing” might not be verydistracting.
solardev
This is really cool!
dpc_01234
I was initially thinking ... "OK, another monospace font (family), look nice", until I got to "texture healing" which really made me want to try it out.
I really like the idea of using different style of font for different things, but as primarily terminal user, I don't even know which terminals support it (if any), and then we would need CLI text editors support as well. But I think it's a great idea.
threePointFive
Theoretically, anything based on xterm should have the capability for it. ESC[<10-19>m is the escape sequence to pick font 0-9. In practice though, is a different question. I use Alacritty, but I cannot find if this is supported and trying to do it myself isn't getting any results.
BitFlogger
Texture healing requires ligatures (specifically `calt`) and Alacritty does not support ligatures.
DiabloD3
Alacritty does not support that, afaik.
csande17
I'm curious what people think of the "Mix & Match" examples.
Radon (the handwriting one) seems to complement the other fonts well because it's basically an italic. But all the others are so similar, with their identical metrics and whatnot, that the "authoritative docstrings" and "Copilot voice" examples are really hard to distinguish.
ly
The mix and match is what convinced me to give this font a try. I’ve been using Operator Mono for years now specifically because of it’s true italics.
I’ve wanted to switch to an open alternative to Operator Mono for a long time now, and I think because of the mix and match, this finally is the one.
whalesalad
tbh this immediately popped into my mind before scrolling down the page - having a handwritten comment is neat and adds another differentiation to reduce strain when browsing code. some will hate it, but personally I want to try it.
graypegg
I've loved Victor Mono [0] Italic for this reason for years! I find prose much easier to read with some slight joined-up lettering, which I totally concede is a 100% personal. Worth a look as well though!
notatoad
yeah, i flipped through the samples without even realizing it was changing anything in the code sample box until i got to the radon variant.
those other variants are not nearly different enough to really convey information.
itsikap
How do you configure different fonts? This was the first thing I wanted to try, but can't figure it out. Am I missing anything obvious?
kkirsche
I tried to use custom css in vscode but couldn’t figure out how to get it to work.
wjdp
I really like this idea. Is this supported anywhere yet or just something for future?
pie_flavor
This is a hearty number of ligatures, and yet it is still not enough for me. Now that != and <= are table stakes, I keep noticing how nice Fira Code's alignment of the * height in *ptr, or the centering of the : in X:Y, or the raising of the x in 0xFF are. And the shaping of the Krypton variant would be my favorite - if the crossbar of the lowercase t was not so far below the height of e.g. the lowercase c. So I think I'm still sticking with Fira Code for now (but will certainly be checking back in a year to see what they've changed with user feedback).
Terretta
Curiously for an example home page, the linked site's example ...
// What if tentative ideas looked handwritten?
/**
* What if docstrings looked authoritative?
*/
... misaligning the two ** in /** is awkward.cflewis
I enjoy the idea, but I do wonder why we don't see more condensed fonts like PragmataPro. I've been using it for close to a decade and I'd love to see more options in the space, but no-one seems willing to go that narrow. Berkeley Graphics has been promising a condensed version of Berkeley Mono for almost a year but nothing has happened there.
Even Monaspace here has a width slider, which starts at "wider than PragmataPro" and just slides to "silly width". I wonder why they didn't try sliding down to a condensed version?
amake
I agree entirely. PragmataPro is my daily driver, and anything else feels way too expansive.
Default Iosevka is close, but the leading is much larger. Luckily you can customize it to be almost identical (set `leading = 1110` in the config; value obtained by trial and error).
kelsolaar
+1 for PragmataPro, bought it 4 years ago and haven't looked back yet.
phunehehe0
Have you tried Quinze? https://www.programmingfonts.org/#quinze
I was on a quest to find the narrowest font and Quinze was the answer. It's something like 20% narrower than Iosevka and M+. I can't find an easy comparison with PragmataPro but if Iosevka is a free interpretation of PragmataPro like you mentioned then Quinze should be narrower as well.
In fact Quinze is so narrow that when I attempted to force its use in all monospace text in the browser, readability took a hit instead of improving. This is because at the same height it is much smaller than "normal" fonts. In my coding setup I use a huge font size which works great with the narrow width.
I guess the downside is that Quinze is very minimal: pretty much only ASCII, no ligature, no customization etc. None of those bother me.
orev
Iosevka is pretty narrow and also popular. Not sure if it meets your definition, but might be worth a look.
sph
I am a big fan of Protesilaos Stavrou's custom "Iosevka Comfy" build (https://github.com/protesilaos/iosevka-comfy). This is probably the best font ever designed to my eyes, even more than my paid version of PragmataPro.
Here is a screenshot of Iosevka Comfy in action: https://share.combo.cc/-bN9f8hAiiG
and Iosevka Comfy Motion, with tasteful serifs: https://share.combo.cc/-BNHfhV4zgu
cflewis
Yeah, it is because AFAIK Iosevka is a free interpretation of PragmataPro! So you are definitely correct :D
inferiorhuman
I just discovered M+. I rather like the "60" variants, and found the default (50) width is too narrow for me. For my tastes legibility seems to suffer with the 50 variants. However, that might be narrow enough for you.
mike986
Speaking of condensed font, anyone has a recommendation for a good (paid or free) Serif condensed font?
I'm using "Bell MT" to replace Times in browser (and also using it for variable-pitch font in emacs Org mode), it is good but I wish it had a taller/condensed version.
Also, one of the best condensed mono font is "The Sans Mono Condensed" which first popularized by early Oreilly books (it has since switched to other mono fonts). The downside is that it only has a western character set but I liked it a lot
jonpacker
Try the "Recursive Mono" or "PT Mono" variants of Iosevka.
jskherman
I'm bothered by the Rd symbol of Radon on the page, it's should be Rn. It makes me double-check if there's actually an element that's not Radium (Ra), not Radon (Rn), but also starts with an R and has a d in its name.
sreetamdas
Noticed this too, it's been since fixed :)
mzs
It does not set the mono flag, so I had to try it with GTK2 gvim to even load the font:
% ttfmono MonaspaceArgon-Regular.otf
monospaced flag = 0
(0 = variable-width, otherwise = monospaced)
Sadly I think that because of that flag it does not enable ligatures.I was able to see ligatures and text healing in vim running in a patched st* though. I really like it thanks! The text healing only moves the line subtly as I type and when I cursor over there are no droppings from the widened 'm' for example. It's well thought-out for code.
If I could ask for a feature it would be to select some variants, like angular 0 with reverse slash or to leave the ! in the != ligature. To see what I mean: https://github.com/be5invis/Iosevka/blob/main/doc/stylistic-...
inferiorhuman
Are you sure? On OSX they're showing up in Font Book under "Fixed Width" fonts. I'm using whatever version was released today, so that might be a recent fix.
mzs
Just checked, don't show-up in under fixed, monaspace 1.000 macos 13.6.1
7839284023
I am having the same issue in KDE Konsole: https://imgur.com/a/Dj1HZiu
I have to explicitly set the "Show all fonts" checkbox which shows all "non monospaced" fonts.
nielsbot
Seems like in modern times, on modern systems, we can move beyond monospaced fonts for code.
I have recommended this many times here, but I use a proportional coding font: Input Sans
peebeebee
What are the reasons for your recommendations? One problem I might see is that it is even harder to spot a typo with this font.
nielsbot
For me, I think proportional fonts are the way text was meant to seen, and monospaced fonts exist to accommodate the limitations of computers, printers and typewriters.
Why is that? In text or punctuation?
For words it’s more readable. The punctuation is designed for coding. The numerals are still monospaced.
kevincox
I would love to use a proportional font for coding but I am not aware of any Vim frontends that cleanly support it. I would be fine to stick with using monospace when using Vim over SSH but even though Neovim has opened the floodgates to frontends it seems that very few support proportional fonts (and the ones that do tend to be painfully slow to use).
mcny
Does it support ligatures such as >= to ≥? I tried the web preview on a phone maybe it is a limitation of Firefox on Android?
For others, this is ligatures https://fonts.google.com/knowledge/glossary/ligature
nielsbot
I don’t think so? I personally don’t use that feature :)
ollien
I'm always really confused about how dotted zeroes became the norm for these fonts. I always confuse them with eights and vastly prefer slashed zeroes. Would love to try this if it had such a variant.
thristian
There's languages where a slashed circle is a letter, and a slashed zero makes things confusing. Dotted zeroes have much less opportunity for confusion in that direction. I guess type designers could emphasise the convex sides of a dotted zero with the concave sides of an "8" to keep them visually distinct, but I don't know if this font does that.
Diti
This is why some fonts like Atkison Hyperlegible use reverse slashed zero, which removes the confusion.
NetOpWibby
I suggested slash zero in an issue and some rando mentioned dotted zeroes serve the same purpose. So annoying.
samus
Texture healing is a really smart and beautiful idea! I will try to apply it to Chinese handwriting, which is often monospace. A lot of common, but really dense characters (especially traditional ones, for example these: 邊鐵餐廳臺藥機麵顧露樓幫讓) could benefit from receiving additionally space to spread out.
aquir
I keep using Berkeley Mono! That font is just perfect! This font and the styles are a bit wonky for me...
StevePerkins
It's a shame that on VS Code at least (I'm not sure if this applies in other contexts), the "textual healing" feature goes hand-in-hand with ligatures. There is no way to enable textual healing if you prefer not to use programming ligatures.
matthewlehner
From https://github.com/githubnext/monaspace?tab=readme-ov-file#v...
> If you want coding ligatures but do not want texture healing, you can elide the calt setting:
Get the top HN stories in your inbox every day.
The "Texture Healing" feature is a really smart use of OpenType features to make problematic monospace combinations look much better without breaking the grid at all.
One naive way to do this would be to create ligature pairs for difficult pairs (mi, lm, etc). But instead, they seem to be selecting character alternates that fill the fixed width differently based on their surroundings.