-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Ascender float32 // Typographic ascender. | ||
Descender float32 // Typographic descender. | ||
LineGap float32 // Suggested line spacing gap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a drive-by comment: why float32
?
shouldn't we use some fixed-point integer type (like x/image/math/fixed.Int26_6
) instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks ! I've used float32
for simplicity, but x/image/math/fixed.Int26_6
will probably be required for integration and performances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps this should be reflected in this PR? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, thinking of it a bit more, it is not obvious to me that x/image/math/fixed.Int26_6
is a better choice. From what I've read, the performance of float32
is similar on modern computers. I'm not sure about the integration point.
I've opened this issue to discuss the question.
Kerx TableKernx | ||
GSUB TableGSUB // An absent table has a nil slice of lookups | ||
GPOS TableGPOS // An absent table has a nil slice of lookups | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's just a sketch, but: what about MATH TableMATH
?
https://docs.microsoft.com/en-us/typography/opentype/spec/math
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is simply that Harfbuzz does not support layout using MATH, thus, for now, this field is not required by the shaper.
However we could expose this table (just as Harfbuzz does), so that other math shaper can consume it.
Co-authored-by: Sebastien Binet <binet@cern.ch>
Co-authored-by: Sebastien Binet <binet@cern.ch>
Co-authored-by: Sebastien Binet <binet@cern.ch>
This is a sketch of a possible font interface. The common interface may be implemented by the "simple" font formats like Type1 and bitmap. The opentype.FaceOpentype would be use by the shaper (Harfbuzz) for Opentype font files.
This package could also provide a way to render glyphs (it's the purpose of the FaceRenderer interface), but I've not thought about it yet.