question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[designspaceLib] "layer" attribute to sourcedescriptor (edited)

See original GitHub issue

Following up on the pre-robothon 2018 talk for support layers in designspaces.

We discussed a couple of steps to enable supporting outlines to specific glyphs. The use case would be a variable font can have n masters for most glyphs, but one or more need some extra help and they can have n+i additional shapes. If you

  • A new support attribute in the source element indicates the name of the UFO3 layer the glyph geometry is coming from. (does it need a naming scheme or convention?)
  • The layer does not need to have a complete glyphset, only the glyphs that are present in the layer will be processed.
  • The layer does not need to be in a specific UFO - it can be in the default UFO, but can be any ufo really.
  • The designspace consumer should be able to handle a varying number of masters in each glyph.

To do:

  1. I guess this requires a change to the specification: https://github.com/fonttools/fonttools/blob/master/Doc/source/designspaceLib/readme.rst#attributes
  2. Add support to varlib (what else cu2qu ? ) to support a varying number of masters per glyph.

Kerning is specifically not a part of this proposal because it is difficult to store kerning tables with glyphs that are not present in the font.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
justvanrossumcommented, Apr 18, 2018

I thought the ability of specifying a layer name from which to take glyphs is more or less independent to the need to have “sparse” masters. If possible (and if it makes sense) I would suggest:

  • add an optional layer attribute to the <source> element, meaning “take glyphs from this named layer”
  • allow sparse glyph sets everywhere except in the neutral
1reaction
behdadcommented, Apr 19, 2018

Agree. The name “support” doesn’t make sense to me. Any source can come from another layer. Any source can be sparse. Initially, base source must have all glyphs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 Scripting a designspace — fontTools Documentation
designspaceLib offers a some tools for building designspaces in Python. ... The layerName attribute is the name of the UFO3 layer.
Read more >
fonttools/__init__.py at main - GitHub
A library to manipulate font files from Python. Contribute to fonttools/fonttools development by creating an account on GitHub.
Read more >
PKG-INFO - platform/external/fonttools - android Git repositories
[designspace] Added a new optional ``layer`` attribute to the source element,. and a corresponding ``layerName`` attribute to the ``SourceDescriptor``.
Read more >
fonttools · PyPI
designspaceLib.statNames module. Allow instances to have the same location as a previously defined STAT label. Deprecated some attributes: SourceDescriptor: ...
Read more >
Creating designspace files - RoboFont
DesignspaceLib started as DesignSpaceDocument, a separate library, ... and edit designspace data – without any interactive preview, map etc.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found