diff --git a/fontc/src/lib.rs b/fontc/src/lib.rs index 84c733524..e78738df5 100644 --- a/fontc/src/lib.rs +++ b/fontc/src/lib.rs @@ -1592,7 +1592,12 @@ mod tests { ); assert_eq!( - (0..4).map(GlyphId::new).collect::>(), + vec![ + GlyphId::new(0), + GlyphId::new(1), + GlyphId::new(2), + GlyphId::new(5), + ], [0x20, 0x21, 0x2d, 0x3d] .iter() .map(|cp| font.cmap().unwrap().map_codepoint(*cp as u32).unwrap()) diff --git a/glyphs-reader/src/font.rs b/glyphs-reader/src/font.rs index 65800c67c..9d40ac4cb 100644 --- a/glyphs-reader/src/font.rs +++ b/glyphs-reader/src/font.rs @@ -80,6 +80,10 @@ impl FeatureSnippet { pub struct Glyph { pub glyphname: String, pub layers: Vec, + /// The left kerning group + pub left_kern: Option, + /// The right kerning group + pub right_kern: Option, } #[derive(Debug, PartialEq, Hash)] @@ -166,6 +170,8 @@ pub struct Axis { pub struct RawGlyph { pub layers: Vec, pub glyphname: String, + pub kern_left: Option, + pub kern_right: Option, #[fromplist(rest)] pub other_stuff: BTreeMap, } @@ -975,6 +981,14 @@ impl RawFont { if let Some(kerning) = self.other_stuff.remove("kerning") { self.other_stuff.insert("kerningLTR".to_string(), kerning); }; + for glyph in self.glyphs.iter_mut() { + if let Some(Plist::String(group)) = glyph.other_stuff.remove("leftKerningGroup") { + glyph.kern_left = Some(group); + } + if let Some(Plist::String(group)) = glyph.other_stuff.remove("rightKerningGroup") { + glyph.kern_right = Some(group); + } + } Ok(()) } @@ -1340,6 +1354,8 @@ impl TryFrom for Glyph { Ok(Glyph { glyphname: from.glyphname, layers: instances, + left_kern: from.kern_left, + right_kern: from.kern_right, }) } } @@ -1953,7 +1969,14 @@ mod tests { fn glyph_order_default_is_file_order() { let font = Font::load(&glyphs3_dir().join("WghtVar.glyphs")).unwrap(); assert_eq!( - vec!["space", "exclam", "hyphen", "manual-component"], + vec![ + "space", + "exclam", + "hyphen", + "bracketleft", + "bracketright", + "manual-component" + ], font.glyph_order ); } @@ -2192,6 +2215,22 @@ mod tests { .collect::>() ); + let actual_groups: Vec<_> = font + .glyphs + .iter() + .filter_map(|(name, glyph)| { + if glyph.left_kern.is_some() || glyph.right_kern.is_some() { + Some(( + name.as_str(), + glyph.left_kern.as_deref(), + glyph.right_kern.as_deref(), + )) + } else { + None + } + }) + .collect(); + let actual_kerning = font .kerning_ltr .get("m01") @@ -2201,12 +2240,21 @@ mod tests { .collect::>(); assert_eq!( - vec![ - ("exclam", "exclam", -360), - ("exclam", "hyphen", 20), - ("hyphen", "hyphen", -150), - ], - actual_kerning, + ( + vec![ + ("bracketleft", Some("brackets"), Some("brackets")), + ("bracketright", Some("brackets"), Some("brackets")), + ], + vec![ + ("@MMK_L_brackets", "exclam", -165), + ("bracketleft", "bracketright", -300), + ("exclam", "@MMK_R_brackets", -160), + ("exclam", "exclam", -360), + ("exclam", "hyphen", 20), + ("hyphen", "hyphen", -150), + ], + ), + (actual_groups, actual_kerning), ); } } diff --git a/glyphs2fontir/src/source.rs b/glyphs2fontir/src/source.rs index 998fac0ad..cd2e281bf 100644 --- a/glyphs2fontir/src/source.rs +++ b/glyphs2fontir/src/source.rs @@ -620,7 +620,14 @@ mod tests { #[test] fn find_glyphs() { assert_eq!( - HashSet::from(["space", "hyphen", "exclam", "manual-component"]), + HashSet::from([ + "space", + "hyphen", + "exclam", + "bracketleft", + "bracketright", + "manual-component" + ]), glyph_state_for_file(&glyphs3_dir(), "WghtVar.glyphs") .keys() .map(|k| k.as_str()) @@ -685,10 +692,17 @@ mod tests { .map(|a| a.tag) .collect::>() ); - let expected: IndexSet = vec!["space", "exclam", "hyphen", "manual-component"] - .iter() - .map(|s| (*s).into()) - .collect(); + let expected: IndexSet = vec![ + "space", + "exclam", + "hyphen", + "bracketleft", + "bracketright", + "manual-component", + ] + .iter() + .map(|s| (*s).into()) + .collect(); assert_eq!(expected, context.get_init_static_metadata().glyph_order); } diff --git a/resources/testdata/designspace_from_glyphs/README.md b/resources/testdata/designspace_from_glyphs/README.md new file mode 100644 index 000000000..1a86d1028 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/README.md @@ -0,0 +1,6 @@ +Created by converting .glyphs files using fontmake, e.g.: + +```shell +$ fontmake -o=ufo resources/testdata/glyphs3/WghtVar.glyphs +$ mv master_ufo/* resources/testdata/designspace_from_glyphs/ +``` \ No newline at end of file diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/fontinfo.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/fontinfo.plist new file mode 100644 index 000000000..3ad1eda79 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/fontinfo.plist @@ -0,0 +1,53 @@ + + + + + ascender + 800 + capHeight + 700 + copyright + Copy! + descender + -200 + familyName + WghtVar + italicAngle + 0 + openTypeHeadCreated + 2022/12/01 04:52:20 + openTypeNameDescription + The greatest weight var + openTypeNameLicenseURL + https://example.com/my/font/license + openTypeNameVersion + New Value + openTypeOS2Selection + + 7 + 8 + + openTypeOS2Type + + 3 + + postscriptUnderlinePosition + -100 + postscriptUnderlineThickness + 50 + styleMapFamilyName + WghtVar + styleMapStyleName + bold + styleName + Bold + unitsPerEm + 1000 + versionMajor + 42 + versionMinor + 42 + xHeight + 500 + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketleft.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketleft.glif new file mode 100644 index 000000000..58d3becdd --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketleft.glif @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketright.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketright.glif new file mode 100644 index 000000000..4bd39ccd6 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/bracketright.glif @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/contents.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/contents.plist new file mode 100644 index 000000000..47862ecda --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/contents.plist @@ -0,0 +1,18 @@ + + + + + bracketleft + bracketleft.glif + bracketright + bracketright.glif + exclam + exclam.glif + hyphen + hyphen.glif + manual-component + manual-component.glif + space + space.glif + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/exclam.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/exclam.glif new file mode 100644 index 000000000..c16771227 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/exclam.glif @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/hyphen.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/hyphen.glif new file mode 100644 index 000000000..4bc2c7341 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/hyphen.glif @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/manual-component.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/manual-component.glif new file mode 100644 index 000000000..cd1d614cb --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/manual-component.glif @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/space.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/space.glif new file mode 100644 index 000000000..983348125 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/glyphs/space.glif @@ -0,0 +1,7 @@ + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/groups.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/groups.plist new file mode 100644 index 000000000..15368f4da --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/groups.plist @@ -0,0 +1,16 @@ + + + + + public.kern1.brackets + + bracketleft + bracketright + + public.kern2.brackets + + bracketleft + bracketright + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/kerning.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/kerning.plist new file mode 100644 index 000000000..c49f61f57 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/kerning.plist @@ -0,0 +1,21 @@ + + + + + bracketleft + + bracketright + -150 + + exclam + + exclam + -100 + + hyphen + + hyphen + -50 + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/layercontents.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/layercontents.plist new file mode 100644 index 000000000..b9c1a4f27 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/layercontents.plist @@ -0,0 +1,10 @@ + + + + + + public.default + glyphs + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/lib.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/lib.plist new file mode 100644 index 000000000..5390b2cd8 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/lib.plist @@ -0,0 +1,55 @@ + + + + + com.github.googlei18n.ufo2ft.filters + + + name + eraseOpenCorners + namespace + glyphsLib.filters + pre + + + + com.schriftgestaltung.customParameter.GSFont.disablesAutomaticAlignment + + com.schriftgestaltung.customParameter.GSFont.useNiceNames + 1 + com.schriftgestaltung.customParameter.GSFontMaster.customValue + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue1 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue2 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue3 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.iconName + Bold + com.schriftgestaltung.customParameter.GSFontMaster.weightValue + 700 + com.schriftgestaltung.customParameter.GSFontMaster.widthValue + 100 + com.schriftgestaltung.fontMasterOrder + 1 + com.schriftgestaltung.weightValue + 700 + com.schriftgestaltung.widthValue + 100 + public.glyphOrder + + space + exclam + hyphen + bracketleft + bracketright + manual-component + + public.postscriptNames + + manual-component + manualcomponent + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/metainfo.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/metainfo.plist new file mode 100644 index 000000000..7b8b34ac6 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Bold.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.github.fonttools.ufoLib + formatVersion + 3 + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/fontinfo.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/fontinfo.plist new file mode 100644 index 000000000..6fc0f394c --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/fontinfo.plist @@ -0,0 +1,65 @@ + + + + + ascender + 737 + capHeight + 702 + copyright + Copy! + descender + -42 + familyName + WghtVar + italicAngle + 0 + openTypeHeadCreated + 2022/12/01 04:52:20 + openTypeNameDescription + The greatest weight var + openTypeNameLicenseURL + https://example.com/my/font/license + openTypeNameVersion + New Value + openTypeOS2Selection + + 7 + 8 + + openTypeOS2Type + + 3 + + postscriptBlueValues + + -16 + 0 + 737 + 753 + + postscriptOtherBlues + + -58 + -42 + + postscriptUnderlinePosition + -100 + postscriptUnderlineThickness + 50 + styleMapFamilyName + WghtVar + styleMapStyleName + regular + styleName + Regular + unitsPerEm + 1000 + versionMajor + 42 + versionMinor + 42 + xHeight + 501 + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketleft.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketleft.glif new file mode 100644 index 000000000..b6bf45046 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketleft.glif @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketright.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketright.glif new file mode 100644 index 000000000..6431af611 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/bracketright.glif @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/contents.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/contents.plist new file mode 100644 index 000000000..47862ecda --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/contents.plist @@ -0,0 +1,18 @@ + + + + + bracketleft + bracketleft.glif + bracketright + bracketright.glif + exclam + exclam.glif + hyphen + hyphen.glif + manual-component + manual-component.glif + space + space.glif + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/exclam.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/exclam.glif new file mode 100644 index 000000000..5bc6d8c77 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/exclam.glif @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/hyphen.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/hyphen.glif new file mode 100644 index 000000000..8b2d57e97 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/hyphen.glif @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/manual-component.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/manual-component.glif new file mode 100644 index 000000000..1da63bcd3 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/manual-component.glif @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/space.glif b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/space.glif new file mode 100644 index 000000000..c05cd73f7 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/glyphs/space.glif @@ -0,0 +1,7 @@ + + + + + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/groups.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/groups.plist new file mode 100644 index 000000000..15368f4da --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/groups.plist @@ -0,0 +1,16 @@ + + + + + public.kern1.brackets + + bracketleft + bracketright + + public.kern2.brackets + + bracketleft + bracketright + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/kerning.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/kerning.plist new file mode 100644 index 000000000..716f79663 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/kerning.plist @@ -0,0 +1,30 @@ + + + + + bracketleft + + bracketright + -300 + + exclam + + exclam + -360 + hyphen + 20 + public.kern2.brackets + -160 + + hyphen + + hyphen + -150 + + public.kern1.brackets + + exclam + -165 + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/layercontents.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/layercontents.plist new file mode 100644 index 000000000..b9c1a4f27 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/layercontents.plist @@ -0,0 +1,10 @@ + + + + + + public.default + glyphs + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/lib.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/lib.plist new file mode 100644 index 000000000..f6d8314a3 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/lib.plist @@ -0,0 +1,55 @@ + + + + + com.github.googlei18n.ufo2ft.filters + + + name + eraseOpenCorners + namespace + glyphsLib.filters + pre + + + + com.schriftgestaltung.customParameter.GSFont.disablesAutomaticAlignment + + com.schriftgestaltung.customParameter.GSFont.useNiceNames + 1 + com.schriftgestaltung.customParameter.GSFontMaster.customValue + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue1 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue2 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.customValue3 + 0 + com.schriftgestaltung.customParameter.GSFontMaster.iconName + + com.schriftgestaltung.customParameter.GSFontMaster.weightValue + 400 + com.schriftgestaltung.customParameter.GSFontMaster.widthValue + 100 + com.schriftgestaltung.fontMasterOrder + 0 + com.schriftgestaltung.weightValue + 400 + com.schriftgestaltung.widthValue + 100 + public.glyphOrder + + space + exclam + hyphen + bracketleft + bracketright + manual-component + + public.postscriptNames + + manual-component + manualcomponent + + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/metainfo.plist b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/metainfo.plist new file mode 100644 index 000000000..7b8b34ac6 --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar-Regular.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.github.fonttools.ufoLib + formatVersion + 3 + + diff --git a/resources/testdata/designspace_from_glyphs/WghtVar.designspace b/resources/testdata/designspace_from_glyphs/WghtVar.designspace new file mode 100644 index 000000000..b955de11c --- /dev/null +++ b/resources/testdata/designspace_from_glyphs/WghtVar.designspace @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/testdata/glyphs2/WghtVar.glyphs b/resources/testdata/glyphs2/WghtVar.glyphs index 1e277cd7b..82a4ad937 100644 --- a/resources/testdata/glyphs2/WghtVar.glyphs +++ b/resources/testdata/glyphs2/WghtVar.glyphs @@ -1,8 +1,7 @@ { .appVersion = "3151"; DisplayStrings = ( -"-", -"!!--" +"![]!" ); copyright = "Copy!"; customParameters = ( @@ -84,7 +83,7 @@ unicode = 0020; }, { glyphname = exclam; -lastChange = "2023-06-05 23:22:51 +0000"; +lastChange = "2023-06-07 22:35:08 +0000"; layers = ( { layerId = m01; @@ -175,6 +174,100 @@ width = 600; unicode = 002D; }, { +glyphname = bracketleft; +lastChange = "2023-06-07 22:37:02 +0000"; +layers = ( +{ +layerId = m01; +paths = ( +{ +closed = 1; +nodes = ( +"324 637 LINE", +"324 51 LINE", +"454 51 LINE", +"454 -10 LINE", +"259 -10 LINE", +"259 696 LINE", +"454 696 LINE", +"454 637 LINE" +); +} +); +width = 600; +}, +{ +layerId = "E09E0C54-128D-4FEA-B209-1B70BEFE300B"; +paths = ( +{ +closed = 1; +nodes = ( +"324 629 LINE", +"324 58 LINE", +"454 58 LINE", +"454 -17 LINE", +"243 -17 LINE", +"243 704 LINE", +"454 704 LINE", +"454 629 LINE" +); +} +); +width = 600; +} +); +leftKerningGroup = brackets; +rightKerningGroup = brackets; +unicode = 005B; +}, +{ +glyphname = bracketright; +lastChange = "2023-06-07 22:35:47 +0000"; +layers = ( +{ +layerId = m01; +paths = ( +{ +closed = 1; +nodes = ( +"259 696 LINE", +"454 696 LINE", +"454 -10 LINE", +"259 -10 LINE", +"259 51 LINE", +"389 51 LINE", +"389 637 LINE", +"259 637 LINE" +); +} +); +width = 600; +}, +{ +layerId = "E09E0C54-128D-4FEA-B209-1B70BEFE300B"; +paths = ( +{ +closed = 1; +nodes = ( +"243 704 LINE", +"454 704 LINE", +"454 -17 LINE", +"243 -17 LINE", +"243 58 LINE", +"373 58 LINE", +"373 629 LINE", +"243 629 LINE" +); +} +); +width = 600; +} +); +leftKerningGroup = brackets; +rightKerningGroup = brackets; +unicode = 005D; +}, +{ glyphname = "manual-component"; lastChange = "2022-12-01 04:57:39 +0000"; layers = ( @@ -210,15 +303,25 @@ unicode = 003D; ); kerning = { m01 = { +bracketleft = { +bracketright = -300; +}; exclam = { +"@MMK_R_brackets" = -160; exclam = -360; hyphen = 20; }; hyphen = { hyphen = -150; }; +"@MMK_L_brackets" = { +exclam = -165; +}; }; "E09E0C54-128D-4FEA-B209-1B70BEFE300B" = { +bracketleft = { +bracketright = -150; +}; exclam = { exclam = -100; }; diff --git a/resources/testdata/glyphs3/WghtVar.glyphs b/resources/testdata/glyphs3/WghtVar.glyphs index 22ec2e3ec..b3f879b9f 100644 --- a/resources/testdata/glyphs3/WghtVar.glyphs +++ b/resources/testdata/glyphs3/WghtVar.glyphs @@ -2,8 +2,7 @@ .appVersion = "3151"; .formatVersion = 3; DisplayStrings = ( -"-", -"!!--" +"![]!" ); axes = ( { @@ -93,7 +92,7 @@ unicode = 32; }, { glyphname = exclam; -lastChange = "2023-06-05 23:22:51 +0000"; +lastChange = "2023-06-07 22:35:08 +0000"; layers = ( { layerId = m01; @@ -184,6 +183,100 @@ width = 600; unicode = 45; }, { +glyphname = bracketleft; +kernLeft = brackets; +kernRight = brackets; +lastChange = "2023-06-07 22:37:02 +0000"; +layers = ( +{ +layerId = m01; +shapes = ( +{ +closed = 1; +nodes = ( +(324,637,l), +(324,51,l), +(454,51,l), +(454,-10,l), +(259,-10,l), +(259,696,l), +(454,696,l), +(454,637,l) +); +} +); +width = 600; +}, +{ +layerId = "E09E0C54-128D-4FEA-B209-1B70BEFE300B"; +shapes = ( +{ +closed = 1; +nodes = ( +(324,629,l), +(324,58,l), +(454,58,l), +(454,-17,l), +(243,-17,l), +(243,704,l), +(454,704,l), +(454,629,l) +); +} +); +width = 600; +} +); +unicode = 91; +}, +{ +glyphname = bracketright; +kernLeft = brackets; +kernRight = brackets; +lastChange = "2023-06-07 22:35:47 +0000"; +layers = ( +{ +layerId = m01; +shapes = ( +{ +closed = 1; +nodes = ( +(259,696,l), +(454,696,l), +(454,-10,l), +(259,-10,l), +(259,51,l), +(389,51,l), +(389,637,l), +(259,637,l) +); +} +); +width = 600; +}, +{ +layerId = "E09E0C54-128D-4FEA-B209-1B70BEFE300B"; +shapes = ( +{ +closed = 1; +nodes = ( +(243,704,l), +(454,704,l), +(454,-17,l), +(243,-17,l), +(243,58,l), +(373,58,l), +(373,629,l), +(243,629,l) +); +} +); +width = 600; +} +); +unicode = 93; +}, +{ glyphname = "manual-component"; lastChange = "2022-12-01 04:57:39 +0000"; layers = ( @@ -220,15 +313,25 @@ unicode = 61; ); kerningLTR = { m01 = { +bracketleft = { +bracketright = -300; +}; exclam = { +"@MMK_R_brackets" = -160; exclam = -360; hyphen = 20; }; hyphen = { hyphen = -150; }; +"@MMK_L_brackets" = { +exclam = -165; +}; }; "E09E0C54-128D-4FEA-B209-1B70BEFE300B" = { +bracketleft = { +bracketright = -150; +}; exclam = { exclam = -100; };