freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Error Description Strings


From: Werner LEMBERG
Subject: Re: [ft-devel] Error Description Strings
Date: Mon, 20 Aug 2018 17:42:10 +0200 (CEST)

> 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.html

> I wonder if
> 
> https://stackoverflow.com/questions/31161284/how-can-i-get-the-corresponding-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.

> (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.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]