mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text/v2: adjust offsets for vertical texts
This commit is contained in:
parent
d8af9dff28
commit
c903cea637
@ -192,8 +192,11 @@ func forEachLine(text string, face Face, options *LayoutOptions, f func(text str
|
||||
|
||||
var offsetX, offsetY float64
|
||||
|
||||
// Whichever the direction and the alignments are, the Y position has an offset by an ascent for horizontal texts.
|
||||
// The Y position has an offset by an ascent for horizontal texts.
|
||||
if d.isHorizontal() {
|
||||
offsetY += m.HAscent
|
||||
}
|
||||
// TODO: Adjust offsets for vertical texts.
|
||||
|
||||
// Adjust the offset based on the secondary alignments.
|
||||
h, v := calcAligns(d, options.PrimaryAlign, options.SecondaryAlign)
|
||||
|
Loading…
Reference in New Issue
Block a user