hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

Has anybody made an ACTUALLY monospaced font? Where stuff like 😍 emoji and weird Unicode letters ⓛⓘⓚⓔ 𝓣𝓗𝓔𝓢𝓔 are the same width as an i and an m?

Bill Mill

@sil unless I'm mistaken, that would be against the unicode spec - 😍 is a full-width character so it should take two spaces, as are many asian characters (ex ឤ)

spec annex: unicode.org/reports/tr11/
this rust crate doc I've never used is helpful: docs.rs/unicode-width/latest/u

(this is possibly me way not getting the joke, but I've been interested in calculating accurate unicode string width in a terminal)

www.unicode.orgUAX #11: East Asian Width

@llimllib really? it's not meant to be possible at all??

OK, didn't know that. Also that's really annoying in my monospace text editor :)

@sil yeah, I think it's basically an encoding of how asian languages were supported pre-unicode-standard; some characters were "half-width" (which in the terminal means width 1) and others "full-width" (2 grid spaces)

@sil and basically every terminal emulator gets it wrong all the time!

@mitchellh wrote about it here, he had to implement a worse method to be compatible with other terminals: mitchellh.com/writing/grapheme

Mitchell Hashimoto · Grapheme Clusters and Terminal Emulators

@llimllib @mitchellh nightmare.

I don't think I'd mind if I could make my text editor display extra-width characters as double width exactly. It's that they're fractions of a width, so if you're doing some sort of monospace grid and you want to use non-ASCII characters, nothing lines up at all, and it's really annoying!

@sil @llimllib What editor and what terminal emulator? Neovim (nightly) + Ghostty should display this correctly, I believe.

@mitchellh @llimllib Sublime Text, 'cos I'm editing files which are grids for tile-based levels in a game and that's my text editor. Maybe I should look around for others...!

@sil @llimllib Oh, boooooooo. Sublime is great. I'm interested in all monospace programs improving this handling. If any Sublime people see this, feel free to reach out. I'd love to help.

@sil @mitchellh Here's kitty+neovim nightly, ghostty+nvim, and textedit

Kitty displays entirely the wrong emoji

Also I've reposted because fonts affect character width! Monaco made the ④ a double-width, but iosevka has it as a single width. All these fonts in the screenshot are iosevka term slab

@llimllib @sil Note the font doesn’t determine the character width (in cells), the code point and Unicode standard do, so it should be consistent across fonts.

@mitchellh @sil That’s why I was surprised that in Monaco it was different

@sil Is the problem here that the non-Latin characters are being swapped in from a different font that has different metrics?

@mavit it is. I don't actually know a solution to this other than "make one font which has every character in it and they're all the same width", which is the thing I was vaguely hoping someone had already done :-)

@sil @llimllib I have complained about this very issue many times.

It is even more annoying that many/most full-width characters are not made to take up exactly 2 spaces. They are all over the place.