DEV Community

Discussion on: When centering text is more difficult than you think!

Collapse
 
kamil7x profile image
Kamil Trusiak

Actually this font alignment might be by design. Some time ago I read an article about Youtube's logo alignment. Unfortunately I cannot find it right now, but I found another quick article about optical center.

thesignchef.com/article/how-to-a-d...

Here you can see, how this button would look perfectly centered mathematically, for comparison

Image description

Collapse
 
sinandev profile image
Sinan

Yes, it actually might be by design. But I doubt that it is always better to have it lower or higher. The article you shared also says that mathematically centered text or logos look a little bit low. That would mean that we should align them higher, not lower?

This is why I think all fonts should be centered mathematically and later offset by css-rules etc.

Collapse
 
kamil7x profile image
Kamil Trusiak

The question is, which one would happen more often:

  1. using mathematically centered font and offsetting it
  2. using font with offset and doing nothing with css

Because as a developer, I wouldn't be happy if designer told me to offset every single text. I know I can make a few rules to cover most cases, but why would I, if I can use font that doesn't need that?

Collapse
 
fjones profile image
FJones

Even mathematically-centered becomes "interesting", when decenders come into play. Though I do agree that ultimately such adjustments should be up to type setting, not type design.