The virtual method is moved to doRenderGlyph(), for plugin implementers
it means that the function only needs to be renamed (and moved to private
section) and plugin version interface needs to be updated.
The common layouting code allows to remove many redundant code from
Renderer and also ability to test cursor position/bounding rectangle
updated properly. Rectangle updating now treats rectangle with zero size
as invalid and replaces it with glyph quad instead of merging the two. It
means that the returned rectangle now wraps the text more tightly and
does not always contain origin.
Got finally pissed with the requirement of setting AbstractFont::_size
manually and took this as opportunity to rework the internal plugin API
in a better way. Bumped the interface version, as this is binary
incompatible. MagnumFont doesn't support lineHeight yet.
It looks like I forgot to `delete` three times in the tests. It just
proves that the previous API was flawed (or unusable for people spoilt
with RAII like me).
Use static libraries for plugins which aren't used as dependencies (as
they don't export any symbols anyway), use shared libraries for plugins
used as dependencies (as they already export the symbols and static
libraries cause linker errors on mingw32).
Allows to store glyph advance also for notfound glyph, which is exactly
what we want for unknown characters. Also added version information to
allow further extensions.
We are providing already done font with parameters that GlyphCache can
handle. Moreover in ES DistanceFieldGlyphCache might expect RGB input
images because Luminance is not renderable in most cases, thus it
wouldn't work with Luminance TGA input.
The fonts is simply a file with character and glyph parameters
along with glyph cache image. There is also MagnumFontConverter, which
allows to create the font from any currently opened font.
Added tests for both, they both need active GL context due to GlyphCache
instance. MagnumFont doesn't have test for creating glyph cache yet.