feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -62,7 +62,11 @@ Result Text::load(const std::string& path) noexcept
{
#ifdef THORVG_FILE_IO_SUPPORT
bool invalid; //invalid path
if (!LoaderMgr::loader(path, &invalid)) {
auto loader = LoaderMgr::loader(path, &invalid);
if (loader) {
if (loader->sharing > 0) --loader->sharing; //font loading doesn't mean sharing.
return Result::Success;
} else {
if (invalid) return Result::InvalidArguments;
else return Result::NonSupport;
}