coral-xyz / backpack

🎒 Next level crypto wallet
https://backpack.app
GNU General Public License v3.0
1.37k stars 817 forks source link

Add alt characters for Inter numbers 1, 3, 6 and 9 #3200

Open trucy opened 1 year ago

trucy commented 1 year ago

Can we enable alternate characters 1, 3, 6 and 9 available for Inter? I think it would make our balances and numbers look a little more polished :)

Above: what we have now Below: turning on alt characters for 1, 3, 6 and 9

Screenshot 2023-03-07 at 8 48 41 AM

I'm not sure how to do this in code, but it seems possible here

AFZL210 commented 1 year ago

we can try modifying the font-feature-settings could you please assign this to me?

trucy commented 1 year ago

@AFZL210 How's it going? This one's all yours if you want to try!

AFZL210 commented 1 year ago

@trucy when I tried adding the font-feature-setting to a separate project, it worked as intended. However, when I try to add it to the balance component, it's not working. I'm trying to figure out the issue and why it's not working. The solution is a simple one-liner.

wentokay commented 1 year ago

to give you a bit more context, I think we're currently using @fontsource/inter in the extension code, we might be able to use google inter in the html files instead, although we're trying to share more code between desktop and mobile app at the moment so we also have https://github.com/tamagui/tamagui/tree/master/packages/font-inter (@peterpme might be able to share some details about that)

AFZL210 commented 1 year ago

I think that is why it's not working, or there is a different approach to using the font feature in this case. I will definitely try

tusharv01 commented 1 year ago

Enabling these alternate characters depends on the specific software or application you are using. If you are using a text editor or word processor that supports OpenType features, you can access the alternate characters by selecting the text you want to modify and then choosing the alternate character from the font menu or using a keyboard shortcut.

If you are using a website or application that does not support OpenType features, you may need to manually insert the alternate characters by copying and pasting them from a character map or using a keyboard shortcut.

It's also worth noting that not all versions of Inter may include the alternate characters you are looking for, so you may need to download a specific version of the font that includes these characters.