I have been years away from my math class. Now I would like to figure out the following.
I am writing a simple javascript program where some tabular data is output to PDF file.
The program will automatically decide if to output the data in portrait or landscape layout.
User will have the ability to choose size of the font.
Based on the size of the font and the number of characters in the widest tabular data row,
the program will calculate whether portrait of landscape layout to apply.
I checked how many characters can be output per line under a specific font.
Here is the result:
Font size |
Characters |
Ratio |
Ratio calc |
Notes |
4 |
200 |
50.0 |
(200 / 4) |
|
6 |
130 |
21.7 |
(130 / 6) |
|
8 |
100 |
12.5 |
(100 / 8) |
|
10 |
80 |
8.0 |
(80 / 10) |
|
12 |
65 |
5.4 |
(65 / 12) |
|
14 |
56 |
4.0 |
(56 / 14) |
|
16 |
50 |
3.1 |
(50 / 16) |
|
18 |
43 |
2.4 |
(43 / 18) |
|
20 |
38 |
1.9 |
(38 / 20) |
|
22 |
35 |
1.6 |
(35 / 22) |
|
24 |
32 |
1.3 |
(32 / 24) |
|
26 |
30 |
1.2 |
(30 / 26) |
|
28 |
28 |
1.0 |
(28 / 28) |
|
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…