-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The font package currently exposes several types and methods only meant to be used internally by the harfbuzz shaper. Since we very closely follow the C++ implementation, we may introduce breaking changes every time we port new changes (see #225 for some examples).
The font package has this structure because it seemed better to have a separation of concerns between Harfbuzz logic and font metrics access, but it appears now that this separation is not worth holding to.
As hinted by @andydotxyz (in #225 (review)), we should consider hiding away the internal methods.
Here are the types and methods to look for :
- type AATStateTable
- func (f *Face) FontHExtents() (FontExtents, bool)
- func (f *Face) FontVExtents() (FontExtents, bool)
- func (f *Face) GlyphVOrigin(glyph GID) (x, y int32, found bool)
- func (f *Face) HorizontalAdvance(gid GID) float32
- func (f *Face) VerticalAdvance(gid GID) float32
- func (f *Font) GetGlyphContourPoint(glyph GID, pointIndex uint16) (x, y int32, ok bool)
- func (f *Font) GlyphHOrigin(GID) (x, y int32, found bool)
- func (f *Font) GlyphName(glyph GID) string
- func (f *Font) HasVerticalMetrics() bool
- func (f *Font) VariationGlyph(ch, varSelector rune) (GID, bool)
- type GPOS
- type GPOSLookup
- type GSUB
- type GSUBLookup
- type Kern0
- type Kern1
- type Kern2
- type Kern3
- type Kern4
- type Kern6
- type KernSubtable
- type Kernx
- type Layout
- type LookupOptions
- type Morx
- type MorxChain
- type MorxContextualSubtable
- type MorxInsertionSubtable
- type MorxLigatureSubtable
- type MorxNonContextualSubtable
- type MorxRearrangementSubtable
- type MorxSubtable
- type SimpleKerns
- type UnicodeVariations ¶
One solution could be to move them to unexported symbols in the harfbuzz package. What do you think ?
(cc @andydotxyz @whereswaldon)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels