Firacode: "x" in 0xFF is confusing

Created on 10 Feb 2020  ·  15Comments  ·  Source: tonsky/FiraCode

>>> hex(1234)
'0x4d2'

returns something that looks not like 0x4d2 but 0×4d2. You are not solving anything with this substitution, you changed meaning of the content.

Most helpful comment

You are not solving anything with this substitution, you changed meaning of the content.

In 50×50 it does exactly what it is supposed to do: shows multiplication where programmers are too lazy to reach for a proper unicode.

In '0x4d2' it is used to show that this combination of characters has a special meaning. I agree that hex numbers and multiplications are two different use-cases, but it was not me who chose to write hex numbers using X. I’m just playing along. If I could, I’d replace it with 4d2₁₆ but that does not seem feasible.

All 15 comments

I disagree. To me, it makes it look nicer when the x is centered.

@j-f1 why should letter x be displayed as a mathematical operator ×? I don't understand

maybe there can be feature changing for to while or def to lambda, it would be way cooler! or what about mapping a-z to z-a?

Unlike those examples, the x× translation occurs only around numbers. It’s a consequence of the style where 50x50 is translated to 50×50.

@j-f1 so what about the hex example then, or url? Or in what language is this useful? Is there one where you write 50x50 and expect those number to multiply? I believe it is confusing in when you change meaning of a glyph. I was very confused when seeing such hex value

You are not solving anything with this substitution, you changed meaning of the content.

In 50×50 it does exactly what it is supposed to do: shows multiplication where programmers are too lazy to reach for a proper unicode.

In '0x4d2' it is used to show that this combination of characters has a special meaning. I agree that hex numbers and multiplications are two different use-cases, but it was not me who chose to write hex numbers using X. I’m just playing along. If I could, I’d replace it with 4d2₁₆ but that does not seem feasible.

But I think centered x looks more balanced visually.

@BornForFever sure it is. But I have been still wondering, can you give me a single use case? Where do people need to write number x number and see it pretty? Is such a syntax used in some language for multiplications? The thing is, you don't know where else it can appear and in what combination. I design and produce fonts. You wouldn't think of letter combinations like gg and gj, but hygge and gjort in Danish – there it is. [0-9]x[0-9] can appear in url slugs, nicknames, api key, passwords. All those can have such combination. It only creates confusion. I don't personally mind anymore, because of this I changed to other font, but I don't think that it is right.

Use case: documentation.
Use case: (in scala) I kinda hate using *s as multiplications, but using × every single time is a mess. I prefer x, which also renders nicely.
Use case: math, where you can't use * as × because it's wrong.

It's important to understand that ligatures don't change the input, it only renders differently only on your screen.

  • Did you mean it is benefitial for documentations? Or I should look into Fira's documentation? I think that the first: x renders as × only in documentation of those who have Fira installed, or those who have a font having the same ligatures. Documentation should be understandable for those who are not that experienced yet, therefore such documentation without Fira installed using x for math would look even more confusing than when using just *

  • Ok

  • Why would mathematicians or anyone use monospaced font for writing down math formulas? And again, you write formula 9x9=81 in your computer looking like 9×9=81, other people who don't have Fira will see 9x9=81.

  • would't it make more sense then to make ligature 9*9 -> 9×9, 9 * 9 -> 9 × 9?

also, imo looks really cool :)

the 'x' is for hex, and rendering it centered, as part of the numbers, is correct imo

I'm getting the x and 0xFF cases inverted.

x-fira-code

I like the 0×FF style.

that's unexpected, tho.

I've got to register agreement with @jansindl3r on this one: 0×f00d is confusing.

By and large, I love ligatures. I just find this one to be an unnecessary mental speedbump:

Example | Disposition
------------- | --
1920×1080 | 👍 Reads smoothly; communicates intent
0×a5a5 | 👎 Jarring; at first blush, appears to communicate dimensions instead of hex

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mlajtos picture mlajtos  ·  4Comments

miniBill picture miniBill  ·  4Comments

whatisaphone picture whatisaphone  ·  3Comments

Photonico picture Photonico  ·  3Comments

hatched picture hatched  ·  3Comments