googlefonts / googlefonts/glyphsLib

How can I get/set sidebearing of layer?

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

Description

I’m having troubles getting LSB and RSB of layer:

if I do:
```
font = GSFont()

for glyph in font.glyphs:
for layer in glyph.layers:
print (layer.LSB)
```

I get that GSLayer doesn’t have LSB attribute.

How can I change sidebearings of glyphs?

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the GSLayer API and the existing glyphsLib usage around layer metrics. No file, test, or entry point is named in the issue, so first identify where sidebearings are represented and how related properties are exposed. Done means documenting the supported way to read and change LSB and RSB, with a small usage example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.