Tool to measure font colour

Post general font related questions (e.g. how to install, convert and use fonts) and requests (looking for fonts, designers etc.) here.
Post Reply
honest.bern
Posts: 34
Joined: Mon May 05, 2008 8:28 am
Location: England
Contact:

Tool to measure font colour

Post by honest.bern » Sat Oct 28, 2017 9:22 pm

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?

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 7442
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Tool to measure font colour

Post by Bhikkhu Pesala » Sat Oct 28, 2017 11:31 pm

You might have more luck if you ask on TypeDrawers.
My FontsReviews: MainTypeFont CreatorHelpFC11.5 Pro + MT8.0 @ Win10 1803

Alfred
Top Typographer
Top Typographer
Posts: 1006
Joined: Thu Apr 18, 2013 8:08 am

Re: Tool to measure font colour

Post by Alfred » Sun Oct 29, 2017 12:47 pm

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!
FC11.0 Pro (Help) + MT8.0 Pro (Help) • Windows 10

MikeW
Posts: 538
Joined: Mon May 20, 2013 2:51 pm

Re: Tool to measure font colour

Post by MikeW » Sun Oct 29, 2017 2:36 pm

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.

Mike

honest.bern
Posts: 34
Joined: Mon May 05, 2008 8:28 am
Location: England
Contact:

Re: Tool to measure font colour

Post by honest.bern » Sun Oct 29, 2017 8:06 pm

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.

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 7442
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Tool to measure font colour

Post by Bhikkhu Pesala » Sun Oct 29, 2017 10:14 pm

These tools were suggested on TypeDrawers:
My FontsReviews: MainTypeFont CreatorHelpFC11.5 Pro + MT8.0 @ Win10 1803

MikeW
Posts: 538
Joined: Mon May 20, 2013 2:51 pm

Re: Tool to measure font colour

Post by MikeW » Sun Oct 29, 2017 10:20 pm

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.

Mike
Attachments
Arial.txt
(568 Bytes) Downloaded 45 times

honest.bern
Posts: 34
Joined: Mon May 05, 2008 8:28 am
Location: England
Contact:

Re: Tool to measure font colour

Post by honest.bern » Tue Oct 31, 2017 10:39 pm

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.

Attachments:
“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.

Results

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.)

Conclusion

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.
Attachments
Arial weight.pdf
(16.66 KiB) Downloaded 19 times
Arial weight.ods
(18.73 KiB) Downloaded 13 times

Post Reply