mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Fix horizontal positioning by making sure space advance is int
This commit is contained in:
4
main.go
4
main.go
@ -94,7 +94,7 @@ func (p *program) Init() {
|
||||
fmt.Printf("DPI: %f, font size: %d\n", dpi, p.FontSize)
|
||||
|
||||
w, h := p.win.SDLWin.GetSize()
|
||||
p.GlyphRend, err = glyphs.NewGlyphRend("./res/fonts/alm-fixed.ttf", &truetype.Options{Size: float64(p.FontSize), DPI: p.Dpi, SubPixelsX: subPixelX, SubPixelsY: subPixelY, Hinting: hinting}, w, h)
|
||||
p.GlyphRend, err = glyphs.NewGlyphRend("./res/fonts/arabtype-variable.ttf", &truetype.Options{Size: float64(p.FontSize), DPI: p.Dpi, SubPixelsX: subPixelX, SubPixelsY: subPixelY, Hinting: hinting}, w, h)
|
||||
if err != nil {
|
||||
panic("Failed to create atlas from font file. Err: " + err.Error())
|
||||
}
|
||||
@ -190,7 +190,7 @@ func (p *program) Update() {
|
||||
|
||||
var isDrawingBounds = false
|
||||
var drawManyLines = false
|
||||
var textToShow = " Hello there يا friend. اسمي عمر wow!"
|
||||
var textToShow = "Hello there يا friend. اسمي عمر wow!"
|
||||
|
||||
var xOff float32 = 0
|
||||
var yOff float32 = 0
|
||||
|
||||
Reference in New Issue
Block a user