On Emscripten as well, however I'm keeping the Configuration::setTitle()
a no-op because the title is usually set by the HTML markup already and
so dynamic code implicitly changing it to something else doesn't make
much sense.
Because these are static, there can be various problems when linking
them later, so better to test that as early as possible.
This was done in the magnum-bootstrap CI setup before, but that's often
too late to discover problems.
Statically built plugins get imported automatically when using CMake
3.1 and newer. Otherwise simply #include a corresponding
importStaticPlugin.cpp file.
As we are now using absolute includes, there is no need to prefix
everything with "magnum<Namespace>" etc. All generated configuration
files are renamed to configure.h and their path is included _before_
everything else to avoid accidental collisions.
The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
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.
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.
Not sure how to handle everything properly (e.g. namespaces and naming
for implementation classes, tests...), will update coding style for
plugins accordingly later.