image atlas will assume that all needed fonts will fit in "image.NewRGBA (image.Rect(0, 0, 1024, 1024))", right? can i can call loadglyph(), when when a rune is needed? or should i call LoadGlyphs() with all possible runes during initialization?
i think this will be slow, if i will initialize LoadGlyphs() with asian texts, right? On Thursday, April 20, 2017 at 2:52:53 PM UTC+8, Egon wrote: > > On Tuesday, 18 April 2017 08:02:02 UTC+3, saif wrote: >> >> Hi, >> >> I like to ask for your suggestions. >> >> I found a nice project, and was trying to modify them but got stuck with >> fonts. >> (github.com/dskinner/material) >> >> I like the fonts to be configurable, but when I tried to parse the fonts >> at runtime, it seems slow. >> >> The idea from the example is to preparse fonts with 72 fontsize, then >> create a a texture to be rendered. >> Is there a better way to do this? >> > >> >> Thanks, >> S >> > > Create a glyph or text atlas invalidating, updating, paging it as needed. > > For a basic glyph atlas > https://gist.github.com/egonelbre/fbbf4651a4f75f8450fd4fc2244c283f -- you > can of course use multiple pages and use better layouting algorithm to > preserve memory. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.