Skip to main content
Question

Noto Sans in UI

  • November 14, 2023
  • 5 replies
  • 665 views

dv8withn8

Anyone have tips on aligning Noto Sans in their UI? It seems to align best at odd numbered line heights. The problem is, this can create a need for half pixel paddings to keep sizing consistent (multiples of 8) and better aligned with adjacent icons.

5 replies

Josh
  • Former Community Manager
  • 1019 replies
  • November 14, 2023

What size is the button?
Also does using the align middle text property change the behavior at all?


dv8withn8
  • Author
  • New Member
  • 2 replies
  • November 14, 2023

No, changing the text’s vertical alignment has no effect.


Josh
  • Former Community Manager
  • 1019 replies
  • November 14, 2023

Ah yeah sorry you’ll first need to adjust the text to have a fixed height then the alignment should work. I see what you’re saying though. This may just be how Noto defines their line height. One other thing you could try is the vertical trim property which can be found in the type settings. This might help you align things vertically.

Also is your button height an even number of pixels?


dv8withn8
  • Author
  • New Member
  • 2 replies
  • November 14, 2023

Yeah, the component, (a chip/label, etc) is intended to be 16px tall. I was relying on the line height of the text to influence this but Noto at 16 causes the drastic misalignment with the perfectly centered icon. My concern is leading-trim’s CSS support, but I’ll ask engineers their perspective. Thanks for the suggestions!


Josh
  • Former Community Manager
  • 1019 replies
  • November 14, 2023

Yeah I don’t think leading-trim is widely supported yet. I just did some tests in the browser too and it does seem like the odd number line-height gives a better result. I do think this is just how the font is designed and not something unique to Figma.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings