Hacker News new | past | comments | ask | show | jobs | submit login

Yes, and that's exactly the problem with this approach. There's no accounting for the different metrics of the fonts.

Font size and font family should ideally always be set together. If you're setting a font-size, then you should force a font-family, and vice versa. Otherwise, you should set neither and let the user agent decide. This ensures that you would never get a broken combination that's uncomfortable or unusable.

It's similar to the idea that whenever you're setting a foreground color, you should always set the background color as well.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: