Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"x" in 0xFF is confusing #944

Open
jansindl3r opened this issue Feb 10, 2020 · 16 comments
Open

"x" in 0xFF is confusing #944

jansindl3r opened this issue Feb 10, 2020 · 16 comments

Comments

@jansindl3r
Copy link

>>> 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.

@j-f1
Copy link
Contributor

j-f1 commented Feb 10, 2020

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

@jansindl3r
Copy link
Author

jansindl3r commented Feb 10, 2020

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

@jansindl3r
Copy link
Author

jansindl3r commented Feb 10, 2020

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?

@j-f1
Copy link
Contributor

j-f1 commented Feb 10, 2020

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

@jansindl3r
Copy link
Author

jansindl3r commented Feb 10, 2020

@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

@tonsky tonsky changed the title very confusing alternative glyph "x" in 0xFF is confusing Feb 11, 2020
@tonsky
Copy link
Owner

tonsky commented Feb 11, 2020

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.

@yvvt0379
Copy link

But I think centered x looks more balanced visually.

@jansindl3r
Copy link
Author

@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.

@RubenVerg
Copy link

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.

@jansindl3r
Copy link
Author

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?

@RubenVerg
Copy link

also, imo looks really cool :)

@RubenVerg
Copy link

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

@dalepsmith
Copy link

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

x-fira-code

I like the 0×FF style.

@RubenVerg
Copy link

that's unexpected, tho.

@bradleyscollins
Copy link

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

@seqizz
Copy link

seqizz commented Dec 29, 2020

Sorry for necrobumping a bit, but I wanted to provide another example after getting confused for a second:

image

Just to say it doesn't "look cool" every time. Above example is a confusing mess imho, some xs shrinked, some not.

What would be really cool is, having this configurable somehow, not sure how though, via harfbuzz feature maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants