googlefonts / googlefonts/fontc
.designspace axis with discrete values panics
- 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