[personal profile] mjg59
In the past I used to argue that accurate desktop DPI was important, since after all otherwise you could print out a 12 point font and hold up the sheet of paper to your monitor and it would be different. I later gave up on the idea that accurate DPI measurement was generally useful to the desktop, but there's still something seductively attractive about the idea that a 12 point font should be the same everywhere, and someone recently wrote about that. Like many seductively attractive ideas it's actually just trying to drug you and steal your kidneys, so here's why it's a bad plan.

Solutions solve problems. Before we judge whether a solution is worthwhile or not, we need to examine the problem that it's solving. "My 12pt font looks different depending on the DPI of my display" isn't a statement of a problem, it's a statement of fact. How do we turn it into a problem? "My 12pt font looks different depending on which display I'm using and so it's hard to judge what it'll look like on paper" is a problem. Way back in prehistory when Apple launched the original Mac, they defined 72dpi as their desktop standard because the original screen was approximately 72dpi. Write something on a Mac, print it and hold the paper up to the monitor and the text would be the same size. This sounds great! Except that (1) this is informative only if your monitor is the same distance away as your reader will be from the paper, and (2) even in the classic Mac period of the late 80s and early 90s, Mac monitors varied between 66 and 80dpi and so this was already untrue. It turns out that this isn't a real problem. It's arguably useful for designers to be able to scale their screen contents to match a sheet of paper the same distance away, but that's still not how they'll do most of their work. And it's certainly not an argument for enforcing this on the rest of the UI.

So "It'll look different on the screen and paper" isn't really a problem, and so that's not what this is a solution for. Let's find a different problem. Here's one - "I designed a UI that works fine on 100DPI displays but is almost unusable on 200DPI displays". This problem is a much better one to solve, because it actually affects real people rather than the dying breed who have to care about what things look like when turned into ink pasted onto bits of dead tree. And it sounds kind of like designing UIs to be resolution independent would be a great solution to this. Instead of drawing a rectangle that's 100 pixels wide, let me draw one that's one inch wide. That way it'll look identical on 100dpi and 200dpi systems, and now I can celebrate with three lines of coke and wake up with $5,000 of coffee table made out of recycled cinema posters or whatever it is that designers do these days. A huge pile of money from Google will be turning up any day now.

Stop. Do not believe this.

Websites have been the new hotness for a while now, so let's apply this to them. Let's imagine a world in which the New York Times produced an electronic version in the form of a website, and let's imagine that people viewed this website on both desktops and phones. In this world the website indicates that content should be displayed in a 12pt font, and that both the desktop and phone software stacks render this to an identical size, and as such the site would look identical if the desktop's monitor and the phone were the same distance away from me.

The flaw in this should be obvious. If I'm reading something on my phone then the screen is a great deal closer to me than my desktop's monitor usually is. If the fonts are rendered identically on both then the text on my phone will seem unnecessarily large and I won't get to see as much content. I'll end up zooming out and now your UI is smaller than you expected it to be, and if your design philosophy was based on the assumption that the UI would be identical on all displays then there's probably now a bunch of interface that's too small for me to interact with. Congratulations. I hate you.

So "Let's make our fonts the same size everywhere" doesn't solve the problem, because you still need to be aware of how different devices types are used differently and ensure that your UI works on all of them. But hey, we could special case that - let's have different device classes and provide different default font sizes for each of them. We'll render in 12pt on desktops and 7pt on phones. Happy now?

Not really, because it still makes this basic assumption that people want their UI to look identical across different machines with different DPI. Some people do buy high-DPI devices because they want their fonts to look nicer, and the approach Apple have taken with the Retina Macbook Pro is clearly designed to cater to that group. But other people buy high-DPI devices because they want to be able to use smaller fonts and still have them be legible, and they'll get annoyed if all their applications just make the UI larger to compensate for their increased DPI. And let's not forget the problem of wildly differing displays on the same hardware. If I have a window displaying a 12pt font on my internal display and then drag that window to an attached projector, what size should that font be? If you say 12pt then I really hope that this is an accurate representation of your life, because I suspect most people have trouble reading a screen of 12pt text from the back of an auditorium.

That covers why I think this approach is wrong. But how about why it's dangerous? Once you start designing with the knowledge that your UI will look the same everywhere, you start enforcing that assumption in your design. 12pt text will look the same everywhere, so there's no need to support other font sizes. And just like that you've set us even further back in terms of accessibility support, because anyone who actually needs to make the text bigger only gets to do so if they also make all of your other UI elements bigger. Full marks. Dismissed.

The only problem "A 12pt font should be the same everywhere" solves is "A 12pt font isn't always the same size". The problem people assume it solves is "It's difficult to design a UI that is appropriate regardless of display DPI", and it really doesn't. Computers aren't sheets of paper, and a real solution to the DPI problem needs to be based on concepts more advanced than one dating back to the invention of the printing press. Address the problem, not your assumption of what the problem is.

What is the point of points then?

Date: 2012-07-13 08:17 am (UTC)
From: (Anonymous)
Point is 1/72", period. If you think that physical dimensions are not suitable for UI and web design use pixels or degrees or whatever. On the other hand, fixing this *regression* in X server is a matter of one-line combination of xrandr and sed in .xsession, no need for lengthy flame wars ;)

zimous

Re: What is the point of points then?

Date: 2012-07-13 08:42 am (UTC)
From: (Anonymous)
The beauty of using points or EMs on computer systems is that the measure is abstracted from the constraints of the hardware. So a point isn't just 1/72" of an inch, period. It is a means of insuring consistency across myriad platforms.

For the designer who wants consistent presentation across a diverse range of devices the use of traditional font measures provides a far more reliable mechanism than using pixels or percentages in underlying style sheets.

At the very least it prevents us from having to rely on Microsoft, Webkit, or Gecko to do math and get it right.

Re: What is the point of points then?

Date: 2012-07-13 10:22 am (UTC)
From: (Anonymous)
No, 1 pt is roughly 1/72" (well, today it might be exactly, but originally it was a different unit). We can "overload" the unit to mean something else, but saying a text size is 12pt is the same as saying it is 1/6 of an inch.

Now, it is my opinion that operating systems should offer reasonable font sizes to their users, and 12pt is probably good for desktops (hum, how about using webcam to estimate the distance of the person's head [using the average human face width :]), whereas something else is good for phones and projectors.

All applications should use relative font sizes for everything else that's not in the default font size.

Gtk+ applications scale beautifully on the desktop (imho, at least, though I am sure it's easy to find counter-examples) with differing font sizes (and text lengths, very common with localization), but they do not scale well to smaller devices (projectors, otoh, which are just enlarged desktops, are usually fine): it seems to work well with a certain minimum size.

- Danilo

Re: What is the point of points then?

Date: 2012-07-13 10:08 pm (UTC)
From: [identity profile] thub.myopenid.com
I'm definitely in the "points should measure physical size" camp, but that may be because I have a desktop publishing background and when HTML started using point sizes I found it baffling and still do. I'm perfectly happy to have 12 pt text look the same size on my 10" netbook as it does on my 22" desktop monitor. However, when I plug my netbook (with old Fedora 12 and Gnome 2) into my 720P, 37" TV, my previously legible text is now a 3 pixel high smudge. Clearly a better experience can be had here.

I think all text should be one of two things (unless I'm missing some important use case that doesn't fit with either):
a) Relative to an arbitrary size the individual user finds comfortable and usable or
b) relative to actual point sizes with an user controlled scaling factor such as when working with a document for printing.

In the first case, as developers, we (you/they/me/whoever) could either ask the user to select a comfortable text size or use some magical set of rules to choose a reasonable default text size. I imagine the rules would be based on things like the size and pixel depth relative to some common font type (e.g. 70% of the base size should be at least eight pixels high, ensuring some legibility for many fonts at small size; 500% of base size should allow a reasonable amount of text across the overall screen width; etc.). The user should also be able to set this base size to the equivalent of, say, 12 pt real-life print-on-paper text. This base size would be the reference against which all other text is scaled. Perhaps a percentage could be used for this scaling, as is done in HTML and CSS.

In the second case, it could be assumed that if the developer or designer is specifying point size, they are also implying that this text is in reference to printed text and text will default to being rendered based on pixel density in accurate physical point size, subject to application- or document-specific user controls to control scaling, such as viewing a word processor document at 150% or zooming to the width of the page and scaling the text as one would expect.

I realise what I'm really asking for is for all desktop and mobile platforms to abandon their current standards and conform to the product of my brilliance :-) but really I'm just whining about the misappropriation of a unit of measurement.

Some unrealistic demands, just for fun:
1) Hardware manufacturers, shape up and provide good quality EDID information in all your monitors, TVs, and other displays.
2) Platform developers, use that EDID data and a healthy dose of prescience to determine ideal default text sizes algorithmically and provide APIs based around my brilliant scheme detailed above.
3) Designers, stop being such control freaks and use relative text sizes wherever possible to take advantage of the APIs in demand #2.

Whew! Being right all the time takes a lot of typing! :-)
- Thub

Re: What is the point of points then?

Date: 2012-07-14 10:21 am (UTC)
From: [personal profile] jjsarton
I think also that 1 pt, inch cm, ... shall have the physical wanted size.
Your unrealistic demand what made unrealistic by people and companies which ignore all about others. the web developper which mean that all must be expressed in pixel, Microsoft,..., Apple which decided that a new inch has a size of 72/96 on the display in order to render wrong web page correctly.
1) The OS can read the display EDID and assume according the the vertical and horizontal size the type of display, but this can't be perfect. The type of display and accordingly the viewing distance may be dependant of the screen width/height as reported by EDID, what is the width/height for which the device shall be considered as a tv (large distance or tablet (low distance) ?
2) This may be reported by X which can report the physical size of the display with an accuracy of +/- 5 mm if the EDID are taken into account.
3) Not only text size but also pictures sizes.

An other point which has to be taken into account and wihch is always ignored idt the width of a text area. In order to allow a good readability the width shall not be larger as approx 20 cm (~ 8 inch) for a typical viewing distance of ~60 cm / ~30 inch on a computer display.

Re: What is the point of points then?

Date: 2012-07-13 10:37 am (UTC)
From: (Anonymous)
1. Web designers create non-scalable designs and use 16px font.
2. "Hey guys, don't use pixels, it's device dependent, which is bad. Use points."
3. Web designers create non-scalable designs and use 12pt font.
4. Web browsers on Linux mess up webpages.
5. "Hey guys, we need to standardize point on Linux, let's make it equal to 96/72 pixels. M$ does it that way and look at their market share!"

Sorry for the sarcasm, but it seems so braindead to me. Fixed DPI is just lesser evil regarding the current state. By technical means it is a regression.

z.

Re: What is the point of points then?

Date: 2012-07-14 11:22 am (UTC)
From: [personal profile] jjsarton
1. There use mostly 12 px some times also 10 px.
2. Actually a point is the same as pixel, only a little bit larger (1.333 px).
3. noc-scalable bit 12px font with Arial/Helvitica in order to make the textes less readable.
3. ?
5. No physical size is pysical size and not a size dependant of the display dpi.

No tell developer that there do a wrong job.

Profile

Matthew Garrett

About Matthew

Power management, mobile and firmware developer on Linux. Security developer at Aurora. Ex-biologist. [personal profile] mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer. Also on Mastodon.

Page Summary

Expand Cut Tags

No cut tags