diff --git a/inc/thorvg.h b/inc/thorvg.h index 955cf6b5..b3f2e165 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -1637,6 +1637,7 @@ public: * @retval Result::InvalidArguments If no name is provided or if @p size is zero while @p data points to a valid memory location. * @retval Result::NonSupport When trying to load a file with an unsupported extension. * @retval Result::Unknown If an error occurs at a later stage. + * @retval Result::InsufficientCondition If attempting to unload the font data that has not been previously loaded. * * @warning: It's the user responsibility to release the @p data memory. * diff --git a/src/renderer/tvgText.cpp b/src/renderer/tvgText.cpp index 4bd40881..4b5eb35c 100644 --- a/src/renderer/tvgText.cpp +++ b/src/renderer/tvgText.cpp @@ -78,7 +78,7 @@ Result Text::load(const char* name, const char* data, uint32_t size, const strin //unload font if (!data) { if (LoaderMgr::retrieve(name)) return Result::Success; - return Result::InvalidArguments; + return Result::InsufficientCondition; } if (!LoaderMgr::loader(name, data, size, mimeType, copy)) return Result::NonSupport;