src/psaux/psintrp.c


Log

Author Commit Date CI Message
Ewald Hew d813b5da 2017-09-25T08:04:09 Extend Adobe interpreter (seac). This concludes the changes needed to add Type 1 support. * src/psaux/psintrp.c: Update includes. (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to implied seac for CFF. * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New function to look up the glyph index. * src/psaux/psft.c (cf2_getT1SeacComponent, cf2_freeT1SeacComponent): New functions to get the charstrings for seac components. * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
Ewald Hew 1e4d3dc8 2017-09-25T07:47:10 Extend Adobe interpreter (callsubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>: Type 1 mode. * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
Ewald Hew 4b58c518 2017-09-25T07:44:56 Extend Adobe interpreter (div, four-byte numbers). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add Type 1 mode. Type 1 requires large integers to be followed by `div'; cf. `Adobe Type 1 Font Format', section 6.2. <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is to ensure `div' and `callsubr' get values they can use.
Ewald Hew d55a701d 2017-09-25T07:59:41 Extend Adobe interpreter (flex in callothersubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1, 2). <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing flex. This is to avoid closing the current contour.
Ewald Hew 81b86c45 2017-09-25T07:14:18 Extend Adobe interpreter (hstem, vstem, hstem3, vstem3). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode. Allow adding hints mid-charstring. <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands for three normal stem hints. This requires some recalculation of stem positions. Correction for left sidebearing.
Ewald Hew e180afa9 2017-09-25T07:11:03 Extend Adobe interpreter (hsbw, sbw). * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the first operation in a Type 1 charstring. (cf2_interpT2CharString): Remove unused variables. <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw' must be the first operation in a Type 1 charstring. <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for left sidebearing.
Ewald Hew 0589e3c0 2017-09-25T06:10:20 Use the new objects. * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix switching between new and old engines. * src/cff/cffgload.c, src/cff/cffparse.c: Update calls. * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h, src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all to use new objects.
Ewald Hew 96682559 2017-09-25T07:54:02 Extend Adobe interpreter (callothersubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Copy code from `t1_decoder_parse_charstrings' (in `t1decode.c'). OtherSubr 3 (change hints) should reset the hintmask, so that the new hints are applied. Fix function calls and stack access.
Ewald Hew 2f4abaec 2017-09-25T07:04:43 Extend Adobe interpreter (setcurrentpoint). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSETCURRENTPT>: Fix stack access.
Ewald Hew 4ed1b98d 2017-09-25T07:02:53 Extend Adobe interpreter (closepath). * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>: Use the right builder function. We can use the `haveWidth' boolean already present, instead of implementing `parse_state'.
Ewald Hew 766f529a 2017-09-24T22:40:07 Rename files. Replace the `cf2' file name prefix with `ps' as the Adobe engine will be used for both PostScript Types 1 and 2 (CFF) instead of just CFF. s/cf2/ps/ for all following. * src/psaux/cf2*: Rename files. * src/psaux/*: Update includes. * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC, PSAUX_DRV_H): Update file references.
Ewald Hew 77c1b331 2017-09-25T07:50:03 Extend Adobe interpreter (pop). * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled OtherSubr results are stored. Implement the PostScript stack using an array. <cf2_escPOP>: Ensure that the stack is not cleared after getting `OtherSubr' results. Fix stack access.
Ewald Hew 37ed70f6 2017-09-25T06:59:26 Add Type 1 operations to Adobe CFF interpreter. The following Type 1 specific ops have been added (copied from `t1decode'): closepath vstem3 hstem3 seac sbw callothersubr pop setcurrentpoint hsbw The following require a Type 1 mode, because of differences in specification: hstem vstem vmoveto callsubr div rmoveto hmoveto Numbers The subsequent commits will implement these changes and adapt accesses of data and objects to the new interpreter. NOTE: Will not compile in the meantime! * src/psaux/psintrp.c: Add opcodes to enum. (cf2_interpT2CharString): Copy relevant code over from `t1_decoder_parse_charstrings' (in `t1decode.c').