Page 1 of 1

Partial Decomposition

Posted: Thu Jan 05, 2017 6:59 pm
by PJMiller
Some while ago there was a problem with the hinter not hinting if the font contained composite glyphs with more than three levels of indirection.

viewtopic.php?f=6&t=6105&p=27675#p27675

Since then I have kept the level of indirection down to three or below, but it is easy to exceed this limit without it being immediately obvious. Take Greek Extended for example. Some of the combining characters used for the accents are made up of the accents for the greek alphabet which in turn are usually a composite of the latin accents.

It would be nice if there were a command in the transform wizard to partially decompose a glyph. There is already one for decompose which converts the glyph into a simple glyph.

Partial decomposition would replace the glyphs within a composite glyph with their component glyphs but still as a composite. Say I had a glyph composed of a dot which was the 'period centred' glyph which was itself a composite of the 'period' glyph (but moved) and 'period' was a simple glyph. Then partial decomposition would replace my glyph with 'period' but as a composite in the place it was before the partial decomposition.

Of course it would have no effect on simple glyphs or on composite glyphs composed entirely of simple glyphs. But if it was a composite whose components were composites themselves then it would replace them with their source components recursively until the glyph was a composite of simples.

I hope I have explained this well enough for people to understand.

Re: Partial Decomposition

Posted: Thu Jan 05, 2017 7:07 pm
by Erwin Denissen
We don't like putting time and effort in providing workarounds; we strive to fix issues as much as possible. I hope Werner is able to fix the problem on his side.

But even if we would consider implementing this request; I'm not sure if this is possible, so could you show us a demo font project file before and after applying this requested partial decomposition?

Re: Partial Decomposition

Posted: Thu Jan 05, 2017 7:25 pm
by Bhikkhu Pesala
  • The Font Information window can be used to find glyphs with a component depth of more than one
  • If you wished, you could edit CompleteComposites.xml so that FontCreator never creates composites of a depth greater than 2 or 3

Re: Partial Decomposition

Posted: Thu Jan 05, 2017 8:15 pm
by PJMiller
Erwin Denissen wrote:We don't like putting time and effort in providing workarounds; we strive to fix issues as much as possible. I hope Werner is able to fix the problem on his side.
Who is Werner?

The current work around is to find the glyphs with a depth of more than three by using the Font Information dialog box. Hit the 'copy from current glyph' in the Background Image dialog box. Look at the component glyphs to see if they are composites themselves, trace them back to their source (the simple glyph used in the composites) and then replace the components of the composite you are working on by the simplest components, positioned using the background image you copied earlier.

Re: Partial Decomposition

Posted: Thu Jan 05, 2017 8:49 pm
by Bhikkhu Pesala
PJMiller wrote:Who is Werner?
He is the author of the ttfautohint library that is used by FontCreator.

Re: Partial Decomposition

Posted: Thu Jan 05, 2017 9:58 pm
by PJMiller
Well it would be nice but if it isn't a priority then I will just have to do it manually and it will take longer.