Typophile

Find/Highlight composites

ttmt

Hi all

Is there a fontlab function or a macro to highlight the composites in a font. I'm using fontQA to validate a font and it reports that one weight has more composites than other weights.
It's not a critical problem but i would like to know where the extra composites came from.

ttmt

I got this from Atila Korap at Linotype. The version with working indents is at http://codepad.org/0VV7nHfD

__doc__ = '''Marks glyphs that have components.'''

from FL import *

for g in fl.font.glyphs:
if len( g.components) > 0:
if len(g.nodes) == 0:
g.mark = 25

fl.UpdateFont(-1)

Thanks Dunwich Type I'll try it out.

In case you don't feel comfortable with adjusting the script, here is one that I think does what you need. Open exactly two fonts and run it. It compares all glyphs and reports glyphs whose number of components differs. Glyphs are identified by name, so glyph names should match in both fonts.
(I guess that one of your glyphs carries two identical and same-positioned components which easily goes unnoticed.)

You can also use the Find... command (Edit menu). A small "find" window comes up with pop-up menus where you can choose "Components" and "more than" and then type 0 (zero) in the field. If you click on the check mark button, they will all be highlighted in red.

Captured from web.archive.org on 1 Nov 2011. view this capture