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.
Take text size into account when advancing lines. I would probably not
run into this issue if I would visually test this on anything else than
unscaled pixel art font.
Because we can't forward-declare class members we would need to include
whole Mesh (along with all OpenGL headers and other stuff) just to use
Primitive enum. The old Mesh::Primitive is now alias to new one, is
marked as deprecated and will be removed in future release.
Encourages vectorization and generic usage even more. Some functions
were rewritten to make use of the new features, resulting in shorter and
more readable code. This also fixes the annoying naming collision with
WINAPI Rectangle() function.
The old Rectangle is now subclass of Range2D, is marked as deprecated
and will be removed in future release.
Buffer usage is used as parameter in many functions, e.g. in
*Framebuffer::read() and *Texture::image(), but they are rather seldom
used and including whole Buffer.h file just for one enum is just
overkill. The old Buffer::Usage is now alias to BufferUsage, it is
marked as deprecated and will be removed in future release.
The original code assumed that the text bounds lower left corner is
always at origin. It is now not the case with multi-line text. All tests
now pass again.
All three rendering functions (separated, interleaved with upload to GPU,
interleaved with mapping to GPU) are now using common code and then they
reorder the data to fit particular requirements. The data shuffling might
slow down things a bit, but it is optimized for the most common path (we
are rendering to interleaved array, which then get unpacked if needed,
not the other way around), so it shouldn't be an issue. No premature
optimization again, please.
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.
No redundant naming. Text::Renderer2D and Text::Renderer3D is typedef'd
to old name, the typedefs are deprecated and will be removed in some
future release.
The testing is now slightly more sloppy due to inability to not pass any
Font or GlyphCache object. But it is actually better from user point of
view, as it is now impossible to do that by accident.
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
The parameter unnecessarily complicates the implementation, as it needs
to be reimplemented in _every_ plugin (and all current plugins have bug
in it).
Font and text layouting is now abstracted out from its implementation.
Font class is renamed to FreeTypeFont and all the work can be done
through AbstractFont and AbstractLayouter interface.
The coordinate is always 0 and Mesh can be configured to add it
implicitly. The code is now nearly the same for 2D and 3D, will redo it
without templates later.
The text will be rendered without all the nifty features like kerning
and it will most probably fail on everything non-latin, but HarfBuzz is
currently PITA on some systems.
HarfBuzz usage can be configured using USE_HARFBUZZ CMake option.
* Common layouting code in separate non-templated class.
* Direct creation of interleaved vertex array and compressed index
buffer, saves some memory operations and removes MeshTools dependency.
* Preparation for mutable TextRenderer implementation.
The library uses FreeType for glyph pre-rendering and basic glyph
geometry and HarfBuzz for text layouting (i.e. ligatures, kerning, ...).
Currently all used glyphs must be prerendered into texture atlas, other
glyphs are simply not rendered (although the layouting code handles them
like if they are there).
Text rendering supports UTF-8, although glyph pre-rendering is currently
ASCII only, as I couldn't find any working implementation of Unicode
STL function in recent GCC versions. Will be fixed later.