status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

Improve quo2 text component

Open Parveshdhull opened this issue 3 years ago • 3 comments

1. letter-spacing

Letter spacing currently used by the component doesn't match with letter spacing for Figma design. And looks like small changes in letter spacing are not affecting the text component. Formula used by Figma for letter spacing: formula (ref) Heading-1/Regular Screenshot

2. Line Height:

The line height currently used by the component doesn't match with line height from the Figma design Paragraph-2/Regular Screenshot

[Original image] Screenshot

Parveshdhull avatar Aug 10 '22 21:08 Parveshdhull

  1. Line Height:

H @Parveshdhull I compared Paragraph-2/Regular and can't find line height difference.

CleanShot 2022-09-09 at 14 35 23@2x

yqrashawn avatar Sep 09 '22 06:09 yqrashawn

hi @yqrashawn, Thank you very much for looking into this. Please can you try with 5-10 lines? Small line heights difference might not be visible, but they add up to a big difference with multiple lines.

Parveshdhull avatar Sep 09 '22 07:09 Parveshdhull

image

There's indeed mismatch. I'll check.

Line 1 image

Line 10 image

yqrashawn avatar Sep 09 '22 08:09 yqrashawn

Closing for now due to inactivity

cammellos avatar Jul 14 '23 10:07 cammellos

reopening issue (https://github.com/status-im/status-mobile/pull/16981#pullrequestreview-1587186278)

Parveshdhull avatar Aug 21 '23 15:08 Parveshdhull

related PR https://github.com/status-im/status-mobile/pull/13960, and related discussion https://github.com/status-im/status-mobile/pull/13960#discussion_r966749759

Parveshdhull avatar Aug 21 '23 15:08 Parveshdhull

add more info here we use inter font, and it has this thing called Dynamic Metrics http://rsms.me/inter/dynmetrics/ it's a formula that calculates letter spacing based on font size

merged PR https://github.com/status-im/status-mobile/pull/13960 fixed the formula in our code

yet, quo2 text component is different from figma design

A is figma design B is screen shot from http://rsms.me/inter/dynmetrics/ C is quo2 text component screenshot on ios, not tested on android

you can see B and C are identical, which means quo2 text implementation is the same as the Inter font recommended dynamic metrics implementation the calculated letter spacing value always looks like 0.31585560420509633% and figma round it to 0.32%, which might be the reason A is not the same as B/C

CleanShot 2023-08-22 at 10 00 03

yqrashawn avatar Aug 22 '23 02:08 yqrashawn

this might help https://www.figma.com/community/plugin/795733302011238428/Inter-Letter-Spacing Inter Letter Spacing figma plugin

yqrashawn avatar Aug 23 '23 02:08 yqrashawn