W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > April to June 2017

A measure of element growth due to changing font family.

From: Wayne Dick <wayneedick@gmail.com>
Date: Wed, 19 Apr 2017 15:30:17 -0700
Message-ID: <CAJeQ8SBBz7diGncdtKqRwT6wnW3_LJgb7Mr-_DAuMpdE82qeAw@mail.gmail.com>
To: public-low-vision-a11y-tf <public-low-vision-a11y-tf@w3.org>, GLWAI Guidelines WG org <w3c-wai-gl@w3.org>
 Font Height Coefficient

I have been working on a value that will predict the region growth caused
by font family change. The precise problem definition is this.

If a user changes font family how will it modify the size of elements
containing text.

Once we know the distribution of font family size modifications, do we want
to set limits on the size changes?

If we assume a fixed width then change of font will only increase or
decrease the height of the element containing text. To model this in latin
language alphabets I studied the behavior of the keyboard characters
determined by the code values from 32(space) to 126(circumflex). They
keyboard character string is the following.






Now I set up the experiment as follows:

   1. Concatenate 100 of the keyboard character strings together.
   2. Separate individual characters with a "<wbr>" element for soft line
   breaks at any character. Note: This step ensures that lines are filled
   completely with characters so that our box of characters doesn't have a
   ragged right edge.
   3. Placed this string in a paragraph, id="Box".
   4. "Box" had a width of 400px = (16x25). The font-size in "Box" was
   16px. The line height was 1em.
   5. Compute the height of "Box" for font family Arial, 3216.
   6. For each font family the normalized height coefficient is the font
   family height devided by 3216, the height of Arial. Note: The height
   coefficient Arial is 1.

Here are the height coefficients for some common fonts:

   - Arial, 1.00
   - Century, 1.07
   - Comic Sans MS, 1.07
   - Consolas, 1.05
   - Courier, 1.15
   - Courier New, 1.15
   - Euclid, 1.07
   - Garamond, 0.97
   - Georgia, 1.05
   - Helvetica, 1.00
   - Impact, 0.87
   - Lucida Console, 1.15
   - Tahoma, 1.02
   - Times, 0.98
   - Times New Roman, 0.98
   - Verdana, 1.18
   - Wide Latin, 1.90

"Wide Latin" is the extreme outlier. It almost doubles the height. Do we
want to limit the height coefficient to say 1.2 or 1.3? We would need more
data to set a limit?

We could then say that users can change the font to any font with a height
coefficient of &leq; 1.30.

Test some fonts yourself.

Compute the height coefficient of a font

Use Chrome or Firefox for this prototype version. Note if a font is not
supported it will revert to a funny script font named, Handlee. It should
look different from what our target population will use. That is admittedly
kludgey but this is a prototype.


Received on Wednesday, 19 April 2017 22:31:32 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 21:08:12 UTC