googlefonts / googlefonts/glyphsLib

GSComponent.transformation written incorrectly

Open
#634 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
201
Forks
56
Avg merge
17m
Merged PRs (30d)
1

Description

```
>>> from glyphsLib import GSComponent
>>> foo = GSComponent("test")
>>> foo.transform = (1.0, 0.0, 0.0, 1.0, 5.0, 0.0)
>>> from glyphsLib.writer import dumps
>>> dumps(foo)
'{\nname = test;\ntransform = "(1.0, 0.0, 0.0, 1.0, 5.0, 0.0)";\n}\n'
```

Glyphs won't read this in properly; it expects this format (curly braces):

```
{
alignment = -1;
name = acutecomb;
transform = "{1, 0, 0, 1, 189, 286}";
}
```

Contributor guide

Open the contributing guide

Research direction

Start with GSComponent and glyphsLib.writer.dumps, using the reproduction in the issue to trace how the transform tuple is serialized. Compare the emitted transform with the curly-brace format Glyphs expects, then verify that dumps produces readable component data in that format.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.