Add Adobe engine configuration.
This is similar to what was done in the `type1' module. * src/cid/cidriver.c (t1cid_driver_class): Update declaration. * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H. (cid_driver_init): Update code.
This commit is contained in:
parent
93e3cffddf
commit
a5c02f49b5
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
|
||||
|
||||
[cid] Add Adobe engine configuration.
|
||||
|
||||
This is similar to what was done in the `type1' module.
|
||||
|
||||
* src/cid/cidriver.c (t1cid_driver_class): Update declaration.
|
||||
* src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
|
||||
(cid_driver_init): Update code.
|
||||
|
||||
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
|
||||
|
||||
[psaux] Change subfont synthesis for CID fonts.
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_AUX_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
||||
#include FT_TYPE1_DRIVER_H
|
||||
|
||||
#include "ciderrs.h"
|
||||
|
||||
@ -463,9 +464,38 @@
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
cid_driver_init( FT_Module driver )
|
||||
cid_driver_init( FT_Module module )
|
||||
{
|
||||
FT_UNUSED( driver );
|
||||
PS_Driver driver = (PS_Driver)module;
|
||||
|
||||
FT_UInt32 seed;
|
||||
|
||||
|
||||
/* set default property values, cf. `ftcffdrv.h' */
|
||||
driver->hinting_engine = FT_T1_HINTING_ADOBE;
|
||||
|
||||
driver->no_stem_darkening = TRUE;
|
||||
|
||||
driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1;
|
||||
driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1;
|
||||
driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2;
|
||||
driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2;
|
||||
driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3;
|
||||
driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3;
|
||||
driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
|
||||
driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
|
||||
|
||||
/* compute random seed from some memory addresses */
|
||||
seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^
|
||||
(FT_Offset)(char*)&module ^
|
||||
(FT_Offset)(char*)module->memory );
|
||||
seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
|
||||
|
||||
driver->random_seed = (FT_Int32)seed;
|
||||
if ( driver->random_seed < 0 )
|
||||
driver->random_seed = -driver->random_seed;
|
||||
else if ( driver->random_seed == 0 )
|
||||
driver->random_seed = 123456789;
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@
|
||||
FT_MODULE_FONT_DRIVER |
|
||||
FT_MODULE_DRIVER_SCALABLE |
|
||||
FT_MODULE_DRIVER_HAS_HINTER,
|
||||
sizeof ( FT_DriverRec ),
|
||||
sizeof ( PS_DriverRec ),
|
||||
|
||||
"t1cid", /* module name */
|
||||
0x10000L, /* version 1.0 of driver */
|
||||
|
Loading…
Reference in New Issue
Block a user