News for hackers. Stuff that matters.
Re:Let’s fix font size by amelius on Tuesday March 30, 2021 @05:13PM (#26640611)
> > Specify it in pixels

> No thank you.

The article is NOT about px versus em or pt.

It is about specifying sizes in a way that makes sense, i.e. based on visible quantities rather than abstract quantities that are difficult to understand.

Re:Let’s fix font size by setr on Tuesday March 30, 2021 @05:59PM (#26641112)
It’s not just difficult to understand, the em height / character shape described by the article are total nonsense — they have zero relationship to the font itself, and no relationship between one font’s eg height and another.

Which ultimately means that font sizing is entirely nonsense: the only thing you can say is font size 1 is smaller than font size 2, but it’s impossible to say by how much, or guess the difference, except when talking about one, and only one font.

That is, a font with size 16 roughly corresponding to the same size in another font is entirely defined and enforced by nothing at all — it’s purely a “happens to be true”.

Thus, the only real way to handle font sizing predictably is to never switch them out, because you’re really dealing with undefined behavior

Re:Let’s fix font size by tracker1 on Tuesday March 30, 2021 @07:13PM (#26641689)
This is the problem... for me, what I really want to see is 12pt actually meaning 6 lines per inch, regardless of the font specified.
Re:Let’s fix font size by sings on Tuesday March 30, 2021 @05:42PM (#26640916)
Agreed, this definitely goes off on a tangent.

The article is mostly about switching two fonts with the expectation that the visual size of the characters remains consistent. That expectation fails because the em size is arbitrary with respect to the visible caps-height.

As it stands, fonts can have drastically different rendered sizes at the same specified font size. This leads to all sorts of problems, like ensuring fallback fonts have similar metrics to the one you expect to load.

Re:Let’s fix font size by dragonwriter on Wednesday March 31, 2021 @05:50AM (#26645284)
> The article is mostly about switching two fonts with the expectation that the visual size of the characters remains consistent. That expectation fails because the em size is arbitrary with respect to the visible caps-height.

It would fail with caps-height, too, as other visible measures of characters (not just abstract ones like em) have no guaranteed consistent relationship to caps-height, so, as such, there's no guarantee that fonts with the same caps-height have the same “visual size”, or even visual vertical size, since cap height doesn't i close descender and ascender height.

Re:Let’s fix font size by amelius on Wednesday March 31, 2021 @08:23AM (#26646275)
Perhaps we should have a "median-height" property, for specifying the median height of the actual glyphs in the text.
Re:Let’s fix font size by artem247 on Wednesday March 31, 2021 @08:52AM (#26646610)
Typography is a specific skill set, nobody said that it should be 'easy to understand'. Makes sense to whom - to web developer? He is not the intended audience.

If the font size would be specified using only cap height then the work of font designer on specific relationship between negative and positive space and line height would be thrown out. That would be a net negative for the state of typography on Web.

Again putting things into fixed size containers that do not adjust based on different font face is not a good practice and it is not what Web meant to be.

Re:Let’s fix font size by neop1x on Wednesday March 31, 2021 @05:37AM (#26645205)
Fix the OS and CSS to make it possible to define "real physical sizes". When you are printing a book, you are not printing a text with font size of 24 pixels. Forget about pixels, pixel density of modern displays is so hight that you rarely see individual pixels anyway and pixels are irrelenevant. But OS and web standards are still broken, frozen in time where XGA 19" CRT with 1024×768 px were common.
Re:Let’s fix font size by arthur2e5 on Wednesday March 31, 2021 @11:07AM (#26648251)
Other comments (not to your specific one) have already pointed this out, but again: the "px" in CSS is as much a device-independent, physical length unit as "pt" is. It only means 1/96 in = 0.0275 cm.
Re:Let’s fix font size by tracker1 on Tuesday March 30, 2021 @07:11PM (#26641680)
Agreed... would love to see fonts consistently defined sizing... not sure it should be based on the cap-height, but with a line-height of 12pt, I definitely expect to see 6 lines per inch, and that's not what you get.