Bugfix composite glyphs
[why]
Glyphs with references, for example a i acute that is assembled (in some
fonts) from dottless i and actue fail to come out with correct
bearings.
[how] It is rather hard to adjust all the layers correctly. The simple approach is to replace the composit glyphs with their actual component-outlines. After that the scaling can happen as any ordinary glyph.
The drawback is that the font needs more memory, especially if it has a large amount of composite glyphs.
We need to do this in two loops because the unlinking must happen before any referenced glyph has been modified.
[note] Also fix some code already fixed in PR #34 here for convenience.
Fixes: #29 Fixes: #32 Fixes: https://github.com/fontforge/fontforge/issues/5222
Related: #25
This PR has two commits, both fix the problem
commit / solution 1
- Keeps composite glyphs composits (does not replicate the referenced glyphs)
- Introduces small shifts of the components if the width change is bigger
commit / solution 2
- Converts all composite glyphs to ordinary outline glyphs (means the outlines are duplicated)
- Size increase
- No resizing errors even with big changes