Page 1 of 1

Tool to measure font colour

Posted: Sat Oct 28, 2017 9:22 pm
by honest.bern
Could anyone point me to a tool to measure the colour of letters in a font? I do not mean rgb colour but the ratio of black and white areas?

Re: Tool to measure font colour

Posted: Sat Oct 28, 2017 11:31 pm
by Bhikkhu Pesala
You might have more luck if you ask on TypeDrawers.

Re: Tool to measure font colour

Posted: Sun Oct 29, 2017 12:47 pm
by Alfred
If you have an image editor with an 'average blur' function you can use that to gauge the relative amounts of black and white in an image, but I can see it quickly becoming tedious to do this for every glyph in a font!

Re: Tool to measure font colour

Posted: Sun Oct 29, 2017 2:36 pm
by MikeW
I have a batch file that runs against a PDF to calculate ink coverage (well, technically the non-inked coverage) that utilizes some ImageMagik commands (which needs to be installed). pdfToolbox also has an area coverage routine. But I don't know your goal as to whether it is for each individual character at a given point size or if you need to take into account a certain page size, etc. That's what the two mentioned possibilities do.


Re: Tool to measure font colour

Posted: Sun Oct 29, 2017 8:06 pm
by honest.bern
I really want to learn about font colour because I know so little about it.

In “Designing Type” Cheng writes: “…The disadvantages of the classic system led to the creation of the new, ‘modern’ system… Modern proportions are based on achieving even colour; each letter is designed to contain the same amount of negative space…”

When I read that I want to know if it is true. I want to be able to measure Trajan’s column and say that the average colour is x%, the darkest letter is y% and the lightest letter is z%. I want to work out how much variation there is between the darkest and lightest unaccented lower-case letters in, say, Arial, and the same for upper case. Of course, I can see that leading and kerning complicate things, and photos need cleaning before they can be measured. But if I have the tools I am willing to measure dozens of characters and publish my results.

I do not know what programs have an ‘average blur’ function: any recommendations would be welcome.

I must learn what ImageMagik and pdfToolbox do.

Re: Tool to measure font colour

Posted: Sun Oct 29, 2017 10:14 pm
by Bhikkhu Pesala
These tools were suggested on TypeDrawers:

Re: Tool to measure font colour

Posted: Sun Oct 29, 2017 10:20 pm
by MikeW
My main profession is layout work. So as far as "color" goes, I relate to it as regards type density on a page, not individual characters. It is hard to reconcile the quote you have as regards characters in a font. And the negative space in particular. Without doing that calculation, my first impression is that statement is untrue insofar as I am understanding it.

In any case, I have attached a text file. I used the letters A-Z and a-z with the Arial font, one letter per page. Made a PDF, ran my IM batch file on it I mentioned. The numbers represent the amount of ink on the page and is, of course, only relative from one character to another.


Re: Tool to measure font colour

Posted: Tue Oct 31, 2017 10:39 pm
by honest.bern
My original aim was to measure (for each glyph) the ratio of the area of ink to the area of the rectangle formed by WinAscent, WinDescent, the left side bearing, and the right side bearing.

The purpose was not to compare the colour of different fonts, but how much colour varies between letters within each font.

It will take me some time to learn what I can do with the suggestions, for which I thank you all. In the mean time I have a small result to share.

“Arial weight.ods” a spreadsheet made with LibreOffice
“Arial weight.pdf” a printout of the spreadsheet

The difficult part of the work has been done by MikeW, who gave me ink-coverage figures for upper- and lower-case a-z in Arial.

I do not know the units for the figures he supplied, but I realise now that that does not matter. Each of the glyphs was printed (or virtually printed) at the same size, so the height (from WinAscent to WinDescent) was the same for each glyph: the height of these rectangles was all the same. The rectangles differ only in width.

(The important figure for width is not the width of the character but the advance width. Thus I saw that in the glyph “upper case A” the extreme left and right corners of the letter extend outside the side bearings, from -3 to 1369. But the side bearings are set at zero and 1366 so the advance width is 1366.)

In the table the rows “glyph” and “ink used” are the figures from MikeW’s document “Arial.txt”.
“Advance width” is the “AW” figure in the “glyph properties” window in FontCreator 11.0 using “arial.ttf”. (I checked a few of these by looking in the individual glyph window at maximum magnification to make sure they were the same.)

“Darkness” is “ink used” divided by “advance width” and multiplied by 1,000 (to remove the leading zeroes.)

Ideally one might want to know what this figure means. Does a value of 5.894 for upper-case “A” mean that this glyph has ink covering 30% of the available area? Or 20%? I have no idea. This is a question for another day. What is clear is that “B” is darker than “Y”.

At the bottom of the page are averages for upper and lower case. That is, the arithmetic mean of darkness for “a”, darkness for “b” … darkness for “z”.

The bottom rows in the table show “darkness” divided by the average darkness of lower-case letters. “1.00” is the average darkness of a lower case letter.


What surprised me most was that, on average, uppercase letters were slightly less dark than lower case.

The lightest lowercase glyph was “v” (0.72), the darkest was “j” (1.49). The lightest capital was “Y” (0.71), the darkest was “B” (1.29). Though this shows that some letters are twice as dark as others, most of the glyphs were much closer in colour.

Weaknesses of this method

I have deliberately ignored accented letters, which I expect will be darker than their unaccented counterparts. I have ignored the word space, which must be one of the commonest glyphs. I have ignored the spacing added in justification. This approach also assumes that the effects of kerning cancel each other.

I have given equal importance to each glyph, rather than using the relative frequency in any language. Thus, my approach is at the opposite extreme to that of MikeW, who looks at an actual page in his work.

What is next?

Before I can report anything else I have to try to learn some unfamiliar tools and do a lot of thinking.

It may be possible to reverse black and white and so print the “negative space” for a letter. I can then add the two figures for the letter to show the total area for the rectangle. From this we can show inked area as a percentage, i.e. an absolute value. (Of course, for this exercise we must use letters that do not cross the side bearings.)


The statement “Modern proportions are based on achieving even colour; each letter is designed to contain the same amount of negative space.” is not strictly true. However, I never believed that each glyph would turn out to have exactly the same colour. The real test will be to find out how much more variation in colour there is in old-style fonts.