mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text/v2: refactoring
This commit is contained in:
parent
e0741dcd94
commit
5a8cfb2561
@ -221,8 +221,7 @@ func (g *GoTextFaceSource) shape(text string, face *GoTextFace) (shaping.Output,
|
|||||||
scaledSegs[i] = seg
|
scaledSegs[i] = seg
|
||||||
for j := range seg.Args {
|
for j := range seg.Args {
|
||||||
scaledSegs[i].Args[j].X *= scale
|
scaledSegs[i].Args[j].X *= scale
|
||||||
scaledSegs[i].Args[j].Y *= scale
|
scaledSegs[i].Args[j].Y *= -scale
|
||||||
scaledSegs[i].Args[j].Y *= -1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ import (
|
|||||||
"github.com/hajimehoshi/ebiten/v2/vector"
|
"github.com/hajimehoshi/ebiten/v2/vector"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Face is an interface representing a font face. The implementations are only faces in this package, like GoTextFace and StdFace.
|
// Face is an interface representing a font face.
|
||||||
|
// The implementations are only faces defined in this package, like GoTextFace and StdFace.
|
||||||
type Face interface {
|
type Face interface {
|
||||||
// Metrics returns the metrics for this Face.
|
// Metrics returns the metrics for this Face.
|
||||||
Metrics() Metrics
|
Metrics() Metrics
|
||||||
|
Loading…
Reference in New Issue
Block a user