Remove commented out code

This commit is contained in:
bloeys
2022-07-03 22:37:22 +04:00
parent 115310cff7
commit edd8d5b71b
3 changed files with 4 additions and 28 deletions

View File

@ -2,7 +2,6 @@ package glyphs
import (
"errors"
"fmt"
"image"
"image/draw"
"image/png"
@ -94,7 +93,6 @@ func NewFontAtlasFromFont(f *truetype.Font, face font.Face, pointSize uint) (*Fo
}
lineHeightFixed = fixed.I(lineHeightFixed.Ceil())
lineHeight := lineHeightFixed.Ceil()
fmt.Println("calculated line height:", lineHeight)
//Calculate needed atlas size
atlasSizeX := 64
@ -172,7 +170,6 @@ func NewFontAtlasFromFont(f *truetype.Font, face font.Face, pointSize uint) (*Fo
}
//Draw glyph and advance dot
// fmt.Println("G:", string(g), "Y:", drawer.Dot.Y.Ceil(), "; rect:", imgRect.String())
draw.DrawMask(drawer.Dst, imgRect, drawer.Src, image.Point{}, mask, maskp, draw.Over)
drawer.Dot.X += gAdvanceFixed + charPaddingXFixed

View File

@ -83,25 +83,6 @@ func (gr *GlyphRend) DrawTextOpenGLAbs(text string, screenPos *gglm.Vec3, color
pos.SetX(pos.X() + advanceF32)
}
//Draw baselines
// g := gr.Atlas.Glyphs['-']
// lineData := []float32{
// g.U, g.V,
// g.U + g.SizeU, g.V,
// g.U, g.V + g.SizeV,
// g.U + g.SizeU, g.V + g.SizeV,
// 1, 0, 0, 1, //Color
// 0, startPos.Y(), 1, //Model pos
// float32(gr.ScreenWidth), 5, 1, //Model scale
// }
// instancedData = append(instancedData, lineData...)
// lineData[13] -= float32(gr.Atlas.LineHeight)
// instancedData = append(instancedData, lineData...)
// gr.GlyphCount++
// gr.GlyphCount++
gr.GlyphVBO = append(gr.GlyphVBO, instancedData...)
}
@ -288,7 +269,6 @@ func NewGlyphRend(fontFile string, fontOptions *truetype.Options, screenWidth, s
gr.GlyphMesh.Buf.SetLayout(buffers.Element{ElementType: buffers.DataTypeVec3})
gr.SetScreenSize(screenWidth, screenHeight)
// fmt.Printf("lineHeight=%d, glyphInfo=%+v\n", gr.Atlas.LineHeight, gr.Atlas.Glyphs['A'])
return gr, nil
}