diff --git a/Sources/SwiftMath/MathBundle/MathTable.swift b/Sources/SwiftMath/MathBundle/MathTable.swift index 0f8a604..1c2028f 100644 --- a/Sources/SwiftMath/MathBundle/MathTable.swift +++ b/Sources/SwiftMath/MathBundle/MathTable.swift @@ -8,23 +8,6 @@ import Foundation import CoreText -// struct GlyphPart { -// /// The glyph that represents this part -// var glyph: CGGlyph! -// -// /// Full advance width/height for this part, in the direction of the extension in points. -// var fullAdvance: CGFloat = 0 -// -// /// Advance width/ height of the straight bar connector material at the beginning of the glyph in points. -// var startConnectorLength: CGFloat = 0 -// -// /// Advance width/ height of the straight bar connector material at the end of the glyph in points. -// var endConnectorLength: CGFloat = 0 -// -// /// If this part is an extender. If set, the part can be skipped or repeated. -// var isExtender: Bool = false -// } - /** This class represents the Math table of an open type font. The math table is documented here: https://www.microsoft.com/typography/otspec/math.htm @@ -306,3 +289,22 @@ internal struct MathTable { } } +extension MathTable { + + struct GlyphPart { + /// The glyph that represents this part + var glyph: CGGlyph! + + /// Full advance width/height for this part, in the direction of the extension in points. + var fullAdvance: CGFloat = 0 + + /// Advance width/ height of the straight bar connector material at the beginning of the glyph in points. + var startConnectorLength: CGFloat = 0 + + /// Advance width/ height of the straight bar connector material at the end of the glyph in points. + var endConnectorLength: CGFloat = 0 + + /// If this part is an extender. If set, the part can be skipped or repeated. + var isExtender: Bool = false + } +}