-- Leo's gemini proxy

-- Connecting to thrig.me:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Letter Score


Or how much "weight" does a character in a font have? The stupid, brute force way follows: write each letter to a (cleared) image, and count how many pixels have values. Higher count, higher scoring letter. (ASCII only, Unicode will obviously take longer and may have more bounding box issues.) The count is font specific: a bold font will score different from regular or italic, and some fonts are more chonky than others. The following score list is for a "Doves Type" TTF that I got somewhere on the Internet some time ago.


letterscore.pl

dovestype-score.txt


    $ wc -l dovestype-score.txt
          95 dovestype-score.txt
    $ sort -n dovestype-score.txt | perl -ne 'print if $. < 10 || $. > 85'
    0 ' '
    38 .
    39 `
    41 '
    48 ,
    57 -
    77 "
    80 :
    83 _
    508 B
    515 X
    545 D
    553 Z
    556 N
    561 K
    602 Q
    639 H
    717 W
    737 M

So uh "M" is the most weighty of characters—for this font; with Unifont Version 12.0.01 "Q" and "@" take up the most pixels. Also space clocks in at 0 which mostly shows that the code is not obviously buggy.


Wait, why do I have an outdated unifont under ~/.fonts, did that get dragged over from the old macbook?

-- Response ended

-- Page fetched on Tue May 21 16:29:11 2024