summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [cff] minor cleanupOpenType-1.8Dave Arnold2016-11-214-9/+2
|
* [cff] minor code cleanupDave Arnold2016-11-213-4/+3
|
* [cff] delete trailing whitespaceDave Arnold2016-11-211-1/+1
|
* Experimental fix for double adjustment of advance.Dave Arnold2016-11-181-1/+6
|
* [cff] Add glyph name support for CFF2 using post tableDave Arnold2016-11-182-7/+23
| | | | | Temporarily make sfnt_get_glyph_name() extern Need to replace this with service interface.
* [cff] Make cff parser stack dynamicDave Arnold2016-11-165-34/+110
| | | | | | | | Allocate and free parser->stack. Allow maxstack to increase the default. Do validation of maxstack at parse time; make it a CALLBACK. Defer support for > 256 FDs in cff_font_load().
* [cff] Change operand stack from fixed size to dynamicDave Arnold2016-11-157-14/+52
| | | | | CFF becomes dynamic as well as CFF2 maxstack in Top DICT can increase the CFF2 default from 193
* Don't allow CFF2 charstrings to specify a widthDave Arnold2016-11-111-1/+3
|
* Disable seac for CFF2Dave Arnold2016-11-111-1/+2
|
* Add code to ignore operators removed from CFF2 specDave Arnold2016-11-111-312/+346
| | | | | | | | | | | Ignored operators clear the stack. Ignore return and endChar in CFF2. Ignore vsindex and blend in CFF. Add a nested switch for op2. First op2 switch handles 4 flex operators for CFF & CFF2 and all reserved operators common to both. Second op2 switch handles CFF operators that were removed from CFF2.
* [cff] Add support for vsindex, DICT & CharStringDave Arnold2016-11-106-20/+88
| | | | | | | | | | | Add cf2_cmdVSINDEX charstring operator. Add cff_parse_vsindex as a callback function. Add vsindex state machine to check for vsindex after blend. Fix stack bugs in cff_blend_doBlend. Report errors from cff_blend_build_vector. Minor comment and TRACE edits.
* [truetype] Fix HVAR bugs with more than one data itemDave Arnold2016-11-022-47/+51
| | | | | * src/truetype/ttgxvar.c (ft_var_load_hvar, tt_adjust_advance): rename regionCount to regionIdxCount. Clean up some comments.
* [cff] Add CFF2 blend support to cff parser.Dave Arnold2016-11-028-180/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/cff/cf2font.c (cf2_font_setup): before rendering a glyph, check blend vector and reparse private DICT if it has changed. * src/cff/cf2intrp.c (cf2_interpT2CharString): check blend vector and build blend vector if needed at cf2_doBlend. * src/cff/cffload.c (cff_vstore_load): fix bug parsing vstore with > 1 data item. (cff_load_private_dict): factor out private dict parsing so we can reparse when vector changes. Add functions for handling CFF_Blend object. (cff_blend_clear): clear blend stack (cff_blend_check_vector): test if inputs have changed and blend vector needs rebuilding. (cff_blend_build_vector): construct blend vector from design vector using algorithm in OpenType Font Variations Overview. (cff_blend_doBlend): compute blended array, same as in cf2_intrp.c but with parser blend_stack instead of charstring operand stack. * src/cff/cffparse.c Add blend_stack alongside parser stack, so we have a place to write blend results. (cff_parse_num): add internal number type, opcode 255, for use with blend_stack. Change limit check on several number parsing functions, since stack is no longer contiguous. (cff_parse_blend): check blend vector and re-build it if needed. (cff_parser_run): ignore opcode 255 if it occurs in a font. * src/cff/cfftypes.h (CFF_Blend): add object data for cff_blend_* functions. (CFF_SubFont): add CFF_Blend and blend_stack.
* Corrections to parse fonts following 1.8 spec.Dave Arnold2016-10-183-24/+45
| | | | | | | | | | INDEX count for CFF2 is 32 bits, while CFF is 16 bits This means INDEX header size is either 5 or 3 bytes. CFF2 header size is 5 bytes, while CFF is 4 bytes. In CFF2, offSize field is length of the Top DICT data and is 16 bits. Blend operator has changed from 31 to 23.
* Add separate parsing tables for CFF2Dave Arnold2016-09-296-17/+66
| | | | | | Limit Top, Font and Private dicts to operators allowed by spec Remove duplicate constants (CFFCODE vs CFF_CODE) Allow more than 256 Font Dicts (subfonts) in CFF2
* Support v10 CFF2 fontsDave Arnold2016-09-282-12/+57
| | | | | | remove string index, font index top dict follows header, but has no index font dict in FDArray, but skip FDSelect when there's only one font dict
* Test. Minor change in commentDave Arnold2016-09-151-1/+1
|
* Fix up commit d1d88cd08dd3d438abcf7e60087c72957a50fcb1Behdad Esfahbod2016-09-141-2/+0
| | | | | FT_Get_Var_Design_Coordinates() was turning blending off. Apparently CFF implementation does not respect that, but TrueType driver does.
* Preliminary OpenType 1.8 support.Dave Arnold2016-09-1429-44/+1364
|
* [truetype] Comment.Werner Lemberg2016-07-301-2/+3
|
* [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.Werner Lemberg2016-07-293-15/+17
| | | | | | | | | | Since 2016-05-16 we detect infinite recursion directly. * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust `maxComponentDepth'. * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if `maxComponentDepth' is not valid. Instead, simply adjust its value and emit a tracing message.
* * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.Werner Lemberg2016-07-262-4/+10
| | | | No functional change.
* [truetype] Record the end of IDEFs.Hin-Tak Leung2016-07-222-0/+12
| | | | | | | | | To match the logic in FDEF. The value of the end is only used for bound-checking in `Ins_JMPR', so it may not have been obvious that it was not recorded. Tested (as part of Font Validator 2.0) all the fonts on Fedora and did not see any change. * src/truetype/ttinterp.c (Ins_IDEF): Updated.
* [truetype] Sanitizer fix, second try.Werner Lemberg2016-07-192-4/+11
| | | | | * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary tests and use only one slot more.
* Thinko; fix previous commit.Werner Lemberg2016-07-191-2/+2
|
* [truetype] Sanitizer fix.Werner Lemberg2016-07-192-2/+12
| | | | | * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array to fix nested loops.
* [truetype] Make GETDATA work only for GX fonts.Werner Lemberg2016-07-182-6/+21
| | | | | | * src/truetype/ttinterp.c (opcode_name): Updated. (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. (TT_RunIns): Updated.
* [truetype] Add support for Apple'sWerner Lemberg2016-07-172-3/+35
| | | | | | | | | | | GETDATA[], opcode 0x92 bytecode instruction. It always returns 17, and we have absolutely no idea what it is good for... * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. (Ins_GETDATA): New function. (TT_RunIns): Add it.
* [truetype] Add bytecode support for GX variation fonts.Werner Lemberg2016-07-162-2/+103
| | | | | | | | | | | | | | | | | | | | | | This commit implements undocumented (but confirmed) stuff from Apple's old bytecode engine. GETVARIATION[], opcode 0x91 This opcode pushes normalized variation coordinates for all axes onto the stack (in 2.14 format). Coordinate of first axis gets pushed first. GETINFO[], selector bit 3 If GX variation support is enabled, bit 10 of the result is set to 1. * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector bit 3, checking support for variation glyph hinting. (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function to implement opcode 0x91. (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
* [truetype] Fix GETINFO bytecode instruction.Werner Lemberg2016-07-162-2/+9
| | | | | * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for stretching information.
* [truetype] Make all glyphs in `Zycon' GX font work.Behdad Esfahbod2016-07-162-7/+11
| | | | | * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary tests.
* [truetype] Fix GX delta tracing.Werner Lemberg2016-07-162-21/+28
| | | | | * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace relative point movements.
* [truetype] More fixes for GX.Werner Lemberg2016-07-162-14/+44
| | | | | | | | | | | | | | | | | This finally fixes the rendering of the cyclist and the lizard in the `Zycon' font. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point index is always cumulative. (tt_handle_deltas): Rename to... (tt_interpolate_deltas): ... This. Add new parameter for output point array. Update caller. (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds the intermediate results of `tt_interpolate_deltas' that are to be added to `outline->points'.
* * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.Werner Lemberg2016-07-162-1/+9
| | | | | | `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. Reported by Alexei.
* * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.Nikolaus Waxweiler2016-07-162-1/+6
| | | | Problem reported by Hin-Tak Leung.
* [autofit] Update and improve segment and edge tracing.Werner Lemberg2016-07-152-13/+36
| | | | | | | | | | | | | | * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace `delta' also. Don't show first point of segment as a replacement for `pos'; this is (a) misleading, since the difference to `pos' can be almost arbitrarily large in corner cases, and (b) it is better to have all segment data in font units instead of a single value given in output space coordinates. Improve layout. (af_glyph_hints_dump_edges): Show px->units and units->px conversion values for convenience. Improve layout.
* [autofit] For edges, reject segments wider than 1px (#41334).Werner Lemberg2016-07-153-6/+27
| | | | | | | | | * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute `delta'. (af_latin_hints_compute_edges): Reject segments with a delta larger than 0.5px.
* * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.Werner Lemberg2016-07-143-0/+24
|
* [sfnt] Fix `face_index' value in `FT_Face' for named instances.Werner Lemberg2016-07-143-1/+19
| | | | * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
* * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.Werner Lemberg2016-07-142-1/+5
|
* [truetype] Fix gxvar delta interpolation.Behdad Esfahbod2016-07-142-3/+14
| | | | | | | | | The coordinates of the base font should be used for interpolation purposes, NOT the current points (i.e., the result of accumulation of previous deltas). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize `points_org' before looping over all tuples.
* Minor.Werner Lemberg2016-07-142-1/+5
|
* Merge branch '2.6.5'.Werner Lemberg2016-07-1226-216/+274
|\
| * * Version 2.6.5 released.VER-2-6-52.6.5Werner Lemberg2016-07-1226-216/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================= Tag sources with `VER-2-6-5'. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out. * docs/VERSION.TXT: Add entry for version 2.6.5. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.raw (version_info): Set to 18:5:12. * CMakeLists.txt (VERSION_PATCH): Set to 5. * docs/CHANGES: Updated.
* | Conditionally compile environment support.Werner Lemberg2016-07-116-0/+49
| | | | | | | | | | | | | | * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c, src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c: Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where necessary.
* | Handle properties in `FREETYPE_PROPERTIES' environment variable.Werner Lemberg2016-07-117-37/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit covers the most important one. * src/autofit/afmodule.c (af_property_set): Handle `warping', `darkening-parameters', and `no-stem-darkening'. * src/cff/cffdrivr.c (cff_property_set): Handle `darkening-parameters', `hinting-engine', and `no-stem-darkening'. * src/truetype/ttdriver.c (tt_property_set): Handle `interpreter-version'.
* | Replace calls to `atol' with `strtol'.Werner Lemberg2016-07-116-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | We later on need strtol's `endptr' feature. * include/freetype/config/ftstdlib.h (ft_atol): Replace with... (ft_strtol): ... this. * src/base/ftdbgmem.c (ft_mem_debug_init): Updated. * src/cid/cidparse.c (cid_parser_new): Ditto. * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
* | Implement handling of `FREETYPE_PROPERTIES' environment variable.Werner Lemberg2016-07-115-1/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | Recognizing properties follows in another commit. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro. * include/freetype/config/ftstdlib.h (ft_getenv): New macro. * src/base/ftinit.c (ft_set_default_properties): New function to parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'. (FT_Init_FreeType): Updated.
* | Add function `ft_property_string_set'.Werner Lemberg2016-07-107-35/+145
|/ | | | | | | | | | | | | | | | | | | | | This is a preparation for handling an `FREETYPE_PROPERTIES' environment variable to control (some) driver properties. No change in functionality. * src/base/ftobjs.c (ft_property_do): Add `value_is_string' parameter. (ft_property_string_set): New function. (FT_Property_Set, FT_Property_Get): Updated. * include/freetype/internal/ftobjs.h: Updated. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc): Add `value_is_string' parameter. * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c (cff_property_set), src/truetype/ttdriver.c (tt_property_set): Updated, emitting an error currently if `value_is_string' is set.
* [mac] Fix ftexport.sym target in Jamfile.suzuki toshiya2016-07-092-2/+25
| | | | | | | | * Jamfile: Update the directories of the header files scanned for ftexport.sym. They were incorrect since the migration of the header files, on 2015-06-22. Either inexisting include/cache (removed on 2006-03-20) is not needed to be listed explicitly. Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.