The parameter unnecessarily complicates the implementation, as it needs
to be reimplemented in _every_ plugin (and all current plugins have bug
in it).
Provides a way to convert font into different format (either with or
without contents of associated glyph cache) or import/export glyph cache
(i.e. to avoid recreating it from scratch every time).
Avoids some nullptr-related errors and leads to simpler implementation,
as we need to only handle ImageReference and BufferImage types. All
other Image classes are implicitly convertible to ImageReference and
implicit conversion works only with references, not with pointers. The
usage might be clumsy at this point, as Trade::*Importer classes return
pointer to Trade::ImageData which then needs to be dereferenced.
Hopefully introducing C++14's std::optional (or equivalent) might help
solve that issue.
Also removed "convenience" overloads for setting e.g. 2D subdata of 3D
texture. The convenience overload doesn't cover all subdata cases (only
XY plane, not YZ or XZ ones) and overly complicates the implementation.
This can be done in the future in Image classes themselves.
Moreover when the deleted function was private, the compilation failed
with (rather cryptic) error that the function is private instead of
noticing that the function is deleted.
Implementation is moved into `do*()` private virtual functions, public
interface is doing additional sanity checks around them. Opening files
is by default done in base implementation, which loads the files into
memory and then calls function for opening raw data.
Added interface for opening multi-file fonts from raw data, default
implementation just calls single-file implementation.
Function for creating glyph cache converts the text from UTF-8 to UTF-32
and then calls the implementation, removing the burden from
reimplementing this in each plugin.
Added unit test for file and single data opening, bumped plugin version
to 0.2.
Implementation is moved into private virtual `do*()` functions and
public interface does additional sanity checks around them. Exporting to
file is by default done in base implementation, which takes exported
data and then saves them to the file.
Added unit test for file export, bumped plugin interface version to 0.2.
Implementation is moved into private virtual `do*()` functions and the
public interface does additional checks aroung them to simplify plugin
development. Opening files is by default done by the base
implementation, which then calls function for opening raw data with file
contents.
Added test for file opening, bumped plugin interface version to 0.3.
Y# Please enter the commit message for your changes. Lines starting