Sebastien Metrot wrote:
Going from nglFont1 to nglFont have been quite a perf hit for nui.
Maybe we are not using it correctly and you could advise us after a
quick look at the code?
nuiLabel code looks alright. Maybe it would be simpler if the layout
was actually a non-dynamic member, but you could not change the font
in a single lifecycle of the widget. Maybe we could add font switching
in nglFontLayout (I remember I had one good reason not to do it, but
forgot it :)).
Otherwise, there is something really odd in nglFontBase : the
FreeType cache is set to 2KB! nglFontLayout::GetMetrics _will_ be slow
as hell since it will rasterize glyphs everytime. I must have
postponed this problem and set an horrible number to make sure it
would not be forgotten. Rats, missed.
I really don't know what number will do. Will depends on the target.
I'll put a good megabyte and wait for complaints about heavy memory
usage by nglFontBase. It's only a limit, it will eat less if you
require less (growing buffer).
Fix commited.
_______________________________________________
http://mail.nongnu.org/mailman/listinfo/ngl-devel