googlefonts / googlefonts/fontc

.designspace axis with discrete values panics

Open
#836 5 comments 0 reactions 0 assignees View on GitHub
correctness
Dominant language
Rust
Stars
193
Forks
21
Avg merge
1d 20h
Merged PRs (30d)
60

Description

I have a designspace that contains an Italic [axis](https://fonttools.readthedocs.io/en/latest/designspaceLib/xml.html#axis-element) with discrete values, as should be pretty common:

```xml




```

Result:

```
fontc --keep-direction MyVar.designspace
thread 'main' panicked at ufo2fontir/src/toir.rs:117:43:
called `Option::unwrap()` on a `None` value
```

It seems that the code doesn't work when an axis doesn't have the `minimum` and `maximum` attributes, even though they are not required for a discrete axis.

Contributor guide

No contributing guide indexed for this repository

Research direction

Run `fontc --keep-direction MyVar.designspace` with the discrete-axis designspace from the report, then inspect `ufo2fontir/src/toir.rs:117` and the handling of axis minimum and maximum values. Done means this designspace with an axis lacking those attributes no longer panics and is processed successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.