>> I wonder what's the best solution to get FreeType's error strings from 
>> its error numbers?  E.g. "cannot open resource" from `FT_THROW( 
>> Cannot_Open_Resource )'.  Since I cannot locate anything in the docs
>
> This must be an oversight on your side, since FreeType comes with a
complete
> chapter for that:
>
>
https://www.freetype.org/freetype2/docs/reference/ft2-error_enumerations.htm
l

Sure, sorry, forgot to mention this b/c it uses that idea anyways but wraps
it up somewhat nicer (as I think) since it does not need to store anything
in variables.

>> I wonder if
>> 
>> https://stackoverflow.com/questions/31161284/how-can-i-get-the-corresp
>> onding-error-string-from-an-ft-error-code
>> 
>> is the best solution
>
> It is, but the code formatting in the link is extremely ugly and thus hard
to
> read and understand.

What don't you like about the formatting?

>> (seems quite hacky :P)
>
> I don't think so.  It definitely makes the FreeType library itself smaller
> since there is no need to store the error strings...
>
>> and/or if I (or someone else) should add a function like `strerror'
>> to FreeType's API?
>
> Not necessary, I believe.

Am I the first (or third) person to request/use that?  I believe such a
function (that minimises boilerplate on FreeType's users' end) would be nice
when using FreeType in combination with loggers since strings are definitely
easier to review/debug for humans than numbers.  How about a
default-no-but-optional-yes-macro in `ftoption.h'?


_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to