We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 195a4ab commit 81d8a2dCopy full SHA for 81d8a2d
1 file changed
ttj/src/context.rs
@@ -15,7 +15,10 @@ pub(crate) struct SerializationContext<'a> {
15
16
impl<'a> SerializationContext<'a> {
17
pub fn new(font: &'a FontRef<'a>, names: NameMap) -> Result<Self, ReadError> {
18
- let (gdef_regions, gdef_locations) = if let Some(Ok(ivs)) = font.gdef()?.item_var_store() {
+ let (gdef_regions, gdef_locations) = if let Ok(Some(ivs)) = font
19
+ .gdef()
20
+ .and_then(|gdef| gdef.item_var_store().transpose())
21
+ {
22
let regions = ivs.variation_region_list()?.variation_regions();
23
24
// Find all the peaks
0 commit comments