mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text/v2: update comments
This commit is contained in:
parent
b0c5a49f96
commit
8291a98756
@ -128,7 +128,8 @@ func AppendGlyphs(glyphs []Glyph, text string, face Face, options *LayoutOptions
|
||||
|
||||
// AppndVectorPath appends a vector path for glyphs to the given path.
|
||||
//
|
||||
// AppendVectorPath works only when face is *GoTextFace so far. For other types, AppendVectorPath does nothing.
|
||||
// AppendVectorPath works only when the face is *GoTextFace or a composite face using *GoTextFace so far.
|
||||
// For other types, AppendVectorPath does nothing.
|
||||
func AppendVectorPath(path *vector.Path, text string, face Face, options *LayoutOptions) {
|
||||
forEachLine(text, face, options, func(line string, indexOffset int, originX, originY float64) {
|
||||
face.appendVectorPathForLine(path, line, originX, originY)
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"github.com/hajimehoshi/ebiten/v2/vector"
|
||||
)
|
||||
|
||||
// Face is an interface representing a font face. The implementations are only GoTextFace and StdFace.
|
||||
// Face is an interface representing a font face. The implementations are only faces in this package, like GoTextFace and StdFace.
|
||||
type Face interface {
|
||||
// Metrics returns the metrics for this Face.
|
||||
Metrics() Metrics
|
||||
@ -125,7 +125,7 @@ type Glyph struct {
|
||||
// EndIndexInBytes is the end index in bytes for the given string at AppendGlyphs.
|
||||
EndIndexInBytes int
|
||||
|
||||
// GID is an ID for a glyph of TrueType or OpenType font. GID is valid when the font is GoTextFont.
|
||||
// GID is an ID for a glyph of TrueType or OpenType font. GID is valid when the face is GoTextFace.
|
||||
GID uint32
|
||||
|
||||
// Image is a rasterized glyph image.
|
||||
|
Loading…
Reference in New Issue
Block a user