[cff, truetype] Fix logic for `FT_Property_Set'.
Otherwise some properties could be set to arbitrary values, which is harmless, but querying could give wrong positive results. * src/cff/cffdrivr.c (cff_property_set) [hinting-engine], * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]: Only allow defined values.
This commit is contained in:
parent
22167629d1
commit
0b3cb8a8af
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2016-05-05 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cff, truetype] Fix logic for `FT_Property_Set'.
|
||||
|
||||
Otherwise some properties could be set to arbitrary values, which is
|
||||
harmless, but querying could give wrong positive results.
|
||||
|
||||
* src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
|
||||
* src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
|
||||
Only allow defined values.
|
||||
|
||||
2016-04-25 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Add blue-zone support for Gujarati script.
|
||||
|
|
|
@ -701,12 +701,14 @@
|
|||
FT_UInt* hinting_engine = (FT_UInt*)value;
|
||||
|
||||
|
||||
#ifndef CFF_CONFIG_OPTION_OLD_ENGINE
|
||||
if ( *hinting_engine != FT_CFF_HINTING_ADOBE )
|
||||
error = FT_ERR( Unimplemented_Feature );
|
||||
else
|
||||
if ( *hinting_engine == FT_CFF_HINTING_ADOBE
|
||||
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|
||||
|| *hinting_engine == FT_CFF_HINTING_FREETYPE
|
||||
#endif
|
||||
)
|
||||
driver->hinting_engine = *hinting_engine;
|
||||
else
|
||||
error = FT_ERR( Unimplemented_Feature );
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -72,12 +72,14 @@
|
|||
FT_UInt* interpreter_version = (FT_UInt*)value;
|
||||
|
||||
|
||||
#ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
if ( *interpreter_version != TT_INTERPRETER_VERSION_35 )
|
||||
error = FT_ERR( Unimplemented_Feature );
|
||||
else
|
||||
if ( *interpreter_version == TT_INTERPRETER_VERSION_35
|
||||
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
|| *interpreter_version == TT_INTERPRETER_VERSION_38
|
||||
#endif
|
||||
)
|
||||
driver->interpreter_version = *interpreter_version;
|
||||
else
|
||||
error = FT_ERR( Unimplemented_Feature );
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue