diff options
Diffstat (limited to 'docs/posts')
-rw-r--r-- | docs/posts/font_size_fallacies/index.html | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/docs/posts/font_size_fallacies/index.html b/docs/posts/font_size_fallacies/index.html new file mode 100644 index 0000000..0f0c463 --- /dev/null +++ b/docs/posts/font_size_fallacies/index.html | |||
@@ -0,0 +1,153 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang="en"> | ||
3 | <head> | ||
4 | <link rel="stylesheet" href="/style.css"> | ||
5 | <meta charset="UTF-8"> | ||
6 | <meta name="viewport" content="initial-scale=1"> | ||
7 | <meta content="#ffffff" name="theme-color"> | ||
8 | <meta name="HandheldFriendly" content="true"> | ||
9 | <meta property="og:title" content="nerdypepper"> | ||
10 | <meta property="og:type" content="website"> | ||
11 | <meta property="og:description" content="a static site {for, by, about} me "> | ||
12 | <meta property="og:url" content="https://peppe.rs"> | ||
13 | <link rel="icon" type="image/x-icon" href="/favicon.png"> | ||
14 | <title>Font Size Fallacies · peppe.rs</title> | ||
15 | <body> | ||
16 | <div class="posts"> | ||
17 | <div class="post"> | ||
18 | <a href="/" class="post-end-link">⟵ Back</a> | ||
19 | <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/font_size_fallacies.md | ||
20 | ">View Raw</a> | ||
21 | <div class="separator"></div> | ||
22 | <div class="date"> | ||
23 | 17/03 — 2020 | ||
24 | <div class="stats"> | ||
25 | <span class="stats-number"> | ||
26 | 32.36 | ||
27 | </span> | ||
28 | <span class="stats-unit">cm</span> | ||
29 |   | ||
30 | <span class="stats-number"> | ||
31 | 3.2 | ||
32 | </span> | ||
33 | <span class="stats-unit">min</span> | ||
34 | </div> | ||
35 | </div> | ||
36 | <span class="post-title"> | ||
37 | Font Size Fallacies | ||
38 | </span> | ||
39 | <div class="post-text"> | ||
40 | <p>I am not an expert with fonts, but I do have some | ||
41 | experience <sup id="fnref1"><a href="#fn1" rel="footnote">1</a></sup>, and common sense. This post aims to debunk some | ||
42 | misconceptions about font sizes!</p> | ||
43 | |||
44 | <p>11 px on your display is <em>probably not</em> 11 px on my display. | ||
45 | Let's do some quick math. I have two displays, 1366x768 @ | ||
46 | 21” and another with 1920x1080 @ 13”, call them <code>A</code> and | ||
47 | <code>B</code> for now.</p> | ||
48 | |||
49 | <p>Display <code>A</code> has 1,049,088 pixels. A pixel is a square, of | ||
50 | side say, <code>s</code> cm. The total area covered by my 21” display | ||
51 | is about 1,066 cm<sup>2</sup> (41x26). Thus,</p> | ||
52 | |||
53 | <pre><code>Display A | ||
54 | Dimensions: 1366x768 @ 21" (41x26 sq. cm) | ||
55 | 1,049,088 s^2 = 1066 | ||
56 | s = 0.0318 cm (side of a pixel on Display A) | ||
57 | </code></pre> | ||
58 | |||
59 | <p>Bear with me, as I repeat the number crunching for Display | ||
60 | <code>B</code>:</p> | ||
61 | |||
62 | <pre><code>Display B | ||
63 | Dimensions: 1920x1080 @ 13" (29.5x16.5 sq. cm) | ||
64 | 2,073,600 s^2 = 486.75 | ||
65 | s = 0.0153 cm (side of a pixel on Display B) | ||
66 | </code></pre> | ||
67 | |||
68 | <p>The width of a pixel on Display <code>A</code> is <em>double</em> the width of a | ||
69 | pixel on Display <code>B</code>. The area occupied by a pixel on Display | ||
70 | <code>A</code> is <em>4 times</em> the area occupied by a pixel on Display <code>B</code>.</p> | ||
71 | |||
72 | <p><em>The size of a pixel varies from display to display!</em></p> | ||
73 | |||
74 | <p>A 5x11 bitmap font on Display <code>A</code> would be around 4 mm tall | ||
75 | whereas the same bitmap font on Display <code>B</code> would be around | ||
76 | 1.9 mm tall. A 11 px tall character on <code>B</code> is visually | ||
77 | equivalent to a 5 px character on <code>A</code>. When you view a | ||
78 | screenshot of Display <code>A</code> on Display <code>B</code>, the contents are | ||
79 | shrunk down by a factor of 2!</p> | ||
80 | |||
81 | <p>So screen resolution is not enough, how else do we measure | ||
82 | size? Pixel Density! Keen readers will realize that the 5<sup>th</sup> | ||
83 | grade math problem we solved up there showcases pixel | ||
84 | density, or, pixels per cm (PPCM). Usually we deal with | ||
85 | pixels per inch (PPI).</p> | ||
86 | |||
87 | <p><strong>Note:</strong> PPI is not to be confused with DPI <sup id="fnref2"><a href="#fn2" rel="footnote">2</a></sup> (dots | ||
88 | per inch). DPI is defined for printers.</p> | ||
89 | |||
90 | <p>In our example, <code>A</code> is a 75 ppi display and <code>B</code> is around | ||
91 | 165 ppi <sup id="fnref3"><a href="#fn3" rel="footnote">3</a></sup>. A low ppi display appears to be | ||
92 | ‘pixelated’, because the pixels are more prominent, much | ||
93 | like Display <code>A</code>. A higher ppi usually means you can view | ||
94 | larger images and render crispier fonts. The average desktop | ||
95 | display can stuff 100-200 pixels per inch. Smart phones | ||
96 | usually fall into the 400-600 ppi (XXXHDPI) category. The | ||
97 | human eye fails to differentiate detail past 300 ppi.</p> | ||
98 | |||
99 | <p><em>So … streaming an 8K video on a 60” TV provides the same | ||
100 | clarity as a HD video on a smart phone?</em></p> | ||
101 | |||
102 | <p>Absolutely. Well, clarity is subjective, but the amount of | ||
103 | detail you can discern on mobile displays has always been | ||
104 | limited. Salty consumers of the Xperia 1 <sup id="fnref4"><a href="#fn4" rel="footnote">4</a></sup> will say | ||
105 | otherwise.</p> | ||
106 | |||
107 | <p>Maybe I will talk about font rendering in another post, but | ||
108 | thats all for now. Don't judge a font size by its | ||
109 | screenshot.</p> | ||
110 | |||
111 | <div class="footnotes"> | ||
112 | <hr/> | ||
113 | <ol> | ||
114 | |||
115 | <li id="fn1"> | ||
116 | <p><a href="https://github.com/nerdypepper/scientifica">https://github.com/nerdypepper/scientifica</a> <a href="#fnref1" rev="footnote">↩</a></p> | ||
117 | </li> | ||
118 | |||
119 | <li id="fn2"> | ||
120 | <p><a href="https://en.wikipedia.org/wiki/Dots_per_inch">https://en.wikipedia.org/wiki/Dots_per_inch</a> <a href="#fnref2" rev="footnote">↩</a></p> | ||
121 | </li> | ||
122 | |||
123 | <li id="fn3"> | ||
124 | <p><a href="https://www.sven.de/dpi/">https://www.sven.de/dpi/</a> <a href="#fnref3" rev="footnote">↩</a></p> | ||
125 | </li> | ||
126 | |||
127 | <li id="fn4"> | ||
128 | <p><a href="https://en.wikipedia.org/wiki/Sony_Xperia_1">https://en.wikipedia.org/wiki/Sony_Xperia_1</a> <a href="#fnref4" rev="footnote">↩</a></p> | ||
129 | </li> | ||
130 | |||
131 | </ol> | ||
132 | </div> | ||
133 | |||
134 | </div> | ||
135 | |||
136 | <div class=intro> | ||
137 | Hi. <a href=https://peppe.rs/index.xml class=feed-button>Subscribe</a> | ||
138 | <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p> | ||
139 | <p> | ||
140 | I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. | ||
141 | I write open-source stuff to pass time. I also design fonts: scientifica, curie. | ||
142 | Things I find cool usually end up here. | ||
143 | </p> | ||
144 | <p>Get in touch at [email protected] or [email protected].</p> | ||
145 | </div> | ||
146 | |||
147 | <a href="/" class="post-end-link">⟵ Back</a> | ||
148 | <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/font_size_fallacies.md | ||
149 | ">View Raw</a> | ||
150 | </div> | ||
151 | </div> | ||
152 | </body> | ||
153 | </html> | ||