forked from enlightenment/efl
fixed evas_common_hinting_available so it works properly with both freetype 2.1 and 2.2
SVN revision: 26421
This commit is contained in:
parent
94e3e465bf
commit
4bd6d8870a
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
@ -379,23 +382,34 @@ evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
|
||||||
EAPI Evas_Bool
|
EAPI Evas_Bool
|
||||||
evas_common_hinting_available(Font_Hint_Flags hinting)
|
evas_common_hinting_available(Font_Hint_Flags hinting)
|
||||||
{
|
{
|
||||||
if (hinting == FONT_NO_HINT) return 1;
|
switch (hinting)
|
||||||
else if (hinting == FONT_AUTO_HINT)
|
|
||||||
{
|
{
|
||||||
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
case FONT_NO_HINT:
|
||||||
return 1;
|
case FONT_AUTO_HINT:
|
||||||
#else
|
/* these two hinting modes are always available */
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
case FONT_BYTECODE_HINT:
|
||||||
}
|
/* Only use the bytecode interpreter if support for the _patented_
|
||||||
else if (hinting == FONT_BYTECODE_HINT)
|
* algorithms is available because the free bytecode
|
||||||
{
|
* interpreter's results are too crappy.
|
||||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
*
|
||||||
return 1;
|
* On freetyp 2.2+, we can ask the library about support for
|
||||||
|
* the patented interpreter. On older versions, we need to use
|
||||||
|
* macros to check for it.
|
||||||
|
*/
|
||||||
|
#if FREETYPE_MINOR >= 2
|
||||||
|
return FT_Get_TrueType_Engine_Type(evas_ft_lib) >=
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_PATENTED;
|
||||||
#else
|
#else
|
||||||
return 1;
|
# ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||||
|
return 1;
|
||||||
|
# else
|
||||||
|
return 0;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* shouldn't get here - need to add another case statement */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
#include FT_GLYPH_H
|
#include FT_GLYPH_H
|
||||||
#include FT_SIZES_H
|
#include FT_SIZES_H
|
||||||
|
#include FT_MODULE_H
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# if __GNUC__ >= 4
|
# if __GNUC__ >= 4
|
||||||
|
|
Loading…
Reference in New Issue