mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Use texelFetch+debug grid in atlas
This commit is contained in:
6
main.go
6
main.go
@ -90,7 +90,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/KawkabMono-Regular.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/Consolas.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())
|
||||
}
|
||||
@ -175,8 +175,6 @@ var b = rand.Float32()
|
||||
|
||||
func (p *program) Render() {
|
||||
|
||||
// println("Will profile with pprof...")
|
||||
|
||||
defer p.GlyphRend.Draw()
|
||||
|
||||
if p.shouldDrawGrid {
|
||||
@ -201,7 +199,7 @@ func (p *program) Render() {
|
||||
|
||||
textColor := gglm.NewVec4(r, g, b, 1)
|
||||
// str := "مرحبا بك my friend"
|
||||
str := " hello there يا friend. أسمي عمر wow"
|
||||
str := " hello there يا friend. سمي عمر wow"
|
||||
// str := " ijojo\n\n Hello there, friend|. pq?\n ABCDEFG\tHIJKLMNOPQRSTUVWXYZ\nمرحبا بك"
|
||||
// str := " ijojo\n\n Hello there, friend|. pq?\n ABCDEFG\tHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user