Area of paths and free space


When creating a very bold font or bold master it would be great to have an option to measure the area of shapes and free space to easily balance the color.

This illustrator plugin does the work
but of course it is useless during the font development.

What I’d like to measure:

  1. area of a path
  2. space inside a glyph like H or O
  3. space outside the glyph from Cap Height (or Ascender Height) to baseline, and to sidebearing - just space from left or right side. png

Maybe a script would do the job? Maybe recently released SDK?

1 Like

This could be done with a script. I do not have put in much thought in this but you probably need to render the glyphs and count the pixels.

Yes, this is a very old thread, but I’ve just written a plugin which does this. Please see (and test)

1 Like

There is a GSPath.area() method now.

So there is! Here’s the crash report I get when I try to use it: (21.4 KB)

At one time @SimonC had a plugin, Show Path Area, but it doesn’t work today.
@mekkablue had a script, Report Area in Square Units, which he deprecated about a year ago.

So is there anything now available for Glyphs 3 which will calculate the path area? Even some Macro code would help.

As @GeorgSeifert wrote above, there is an area method on paths. This macro writes the area of each path to the Macro console:

for l in Font.selectedLayers:
	for p in l.paths:
1 Like

Thanks Florian.