question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fonts: testing font sizes

See original GitHub issue

enumerating fonts is slow, and just saying “hey you have these system fonts” is boring. So lets collect sizes. Now, it’s bit pointless (and SLOW) testing fonts that the user is expected to have and there is a size collision

for example: TB on linux bundles 140 font files (for 134 fonts) and all fonts are restricted to those. But something like 53 of those fonts are all the exact same size, so we could drop 52 of those … and there are some other buckets of sizes with multiple fonts in them. Since they are all expected, we only need to measure one of each size

for example: on windows

		// ignore: expected + dupe sizes
			// "SimSun-ExtB", // = MS Gothic
			// "MS UI Gothic", // = MS PGothic
			// "Segoe UI Symbol", // = Segoe UI
			// "Cambria", // = cambria math
			// "Helvetica","Small Fonts" // = Arial (which we catch if not in fonts, in bases)
			// "Courier", //  = courier new
			// "MS Serif","Roman","Times", // = TNR
			// "MS Sans Serif", // = Microsoft Sans Serif

and there’s likely more: such as “Cordia New” and “CordiaUPC” always seem to be bundled together (I just need to check) and they are the same size. Same with “Browallia New”, “BrowalliaUPC” | “Angsana New”, “AngsanaUPC” …

what I’m lacking is some data sets to make decisions: for example, of the 232 legit windows font names being tested, I do not have 102 of them on my windows 7

Am after TB on linux, FF on windows 8/8.1/10/11, FF mac. For Firefox, disable RFP so I can get size collisions for all the fonts you may have

STR


example

here is my windows 7

2571.4 x 358.5 : Cordia New, CordiaUPC
2590.2 x 332.5 : Browallia New, BrowalliaUPC
2618.56 x 346 : Angsana New, AngsanaUPC
3072 x 294 : FangSong, SimHei, SimSun
3072 x 298.5 : KaiTi, NSimSun, 宋体
3072 x 299.5 : BatangChe, DotumChe, GungsuhChe, 굴림체
3072 x 307.2 : MS Gothic, MS Mincho
3072 x 310 : DFKai-SB, MingLiU_HKSCS-ExtB, 細明體
3072 x 316.5 : MingLiU, MingLiU-ExtB, MingLiU_HKSCS
3728.26 x 316.5 : PMingLiU, PMingLiU-ExtB
3967.7 x 294 : Mongolian Baiti, Times New Roman
3976.26 x 296.5 : MS Shell Dlg, Microsoft Sans Serif
3990.4 x 340 : Lao UI, Segoe UI

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Thorin-Oakenpantscommented, Oct 4, 2022

thanks for the mac info - definitely some saving to be made there (but I also need to expand the list with changes in the last two releases and additional option downloadable system fonts). I’ve been working on Tor Browser linux/windows fonts and FF windows fonts. I don’t have a mac but will be working on those next - see https://github.com/arkenfox/TZP/issues/197 - @fxbrit will be getting some home assignments

windows
   all  205 (was 251)
   rfp   69 (was 115) (kBaseFonts - size collisions of expected)
    tb   81 (was 159) (whitelist - size collisions of expected)

linux
    tb   60 (was 134)

mac is currently

   all  438 (this is too large)
   rfp  213 (kBaseFonts)
    tb   26 (whitelist - bundled (expected)) [note: still to add 123 bundled - size collisions] 
1reaction
umbralOptimatumcommented, Oct 3, 2022

Firefox 105, OS X 10.14.6

2752.44 x 307.2 : SignPainter, SignPainter-HouseScript 3586.56 x 329.6 : Bodoni 72, Bodoni 72 Oldstyle 3812.1 x 362 : Al Tarikh, Baghdad 3812.1 x 384.5 : Al Bayan, Al Nile 3812.1 x 384.6 : ITF Devanagari, ITF Devanagari Marathi 3812.1 x 387 : STIXIntegralsSm, STIXIntegralsUp, STIXIntegralsUpSm 3812.1 x 417 : Mishafi, Mishafi Gold 3812.1 x 640 : Noto Nastaliq Urdu, STIXSizeTwoSym 3812.1 x 674.5 : STIXIntegralsD, STIXIntegralsUpD 3812.1 x 798 : STIXSizeFourSym, STIXSizeThreeSym 3861.56 x 361.1 : Songti SC, Songti TC 3867.2 x 334 : Bangla Sangam MN, Malayalam Sangam MN 4091.1 x 384.6 : Kohinoor Bangla, Kohinoor Devanagari, Kohinoor Telugu 4092.76 x 361.1 : PingFang HK, PingFang SC, PingFang TC 4198.7 x 313.934 : Heiti SC, Heiti TC 4224 x 350 : Avenir Black, Avenir Black Oblique 4276.3 x 384.5 : Hiragino Maru Gothic Pro W4, Hiragino Maru Gothic ProN, Hiragino Maru Gothic ProN W4 4284.9 x 323.534 : Kannada MN, Oriya MN, Tamil MN, Telugu MN 4332.3 x 384.5 : Hiragino Kaku Gothic Pro W3, Hiragino Kaku Gothic ProN, Hiragino Kaku Gothic ProN W3, Hiragino Sans GB, Hiragino Sans GB W3, Hiragino Sans W3 4356.1 x 384.5 : Hiragino Mincho Pro W3, Hiragino Mincho ProN, Hiragino Mincho ProN W3 4511.14 x 384.5 : Hiragino Sans, Hiragino Sans W4 4668.76 x 384.5 : Hiragino Mincho Pro W6, Hiragino Mincho ProN W6 4702.54 x 384.5 : Hiragino Kaku Gothic Pro W6, Hiragino Kaku Gothic ProN W6, Hiragino Sans GB W6, Hiragino Sans W6 5102.54 x 384.5 : Hiragino Kaku Gothic Std W8, Hiragino Kaku Gothic StdN W8, Hiragino Sans W8

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Font-Size Test - Mozilla.org
This font is 4 point size. This font is 5 point size. This font is 6 point size. This font is 7 point...
Read more >
How to Check the Font Size & Face on a Website - Alphr
Checking the Font Type and Size on a Website · Right click on the page you like the look of and select Inspect...
Read more >
Type Scale - A Visual Calculator
Preview and choose the right type scale for your project. Experiment with font size, scale and different webfonts.
Read more >
Fitting Fonts: Finding The Right Font For Your Site
Test the optimal font size based on who your audience is and their readability needs. Older audiences will likely convert more with a...
Read more >
Web Typeface Tester - HomePage Media
Web Typeface Tester. Sometimes you just want to quickly check the legibility of a web font at various sizes and colour combinations. Typeface:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found