src/cff


Log

Author Commit Date CI Message
Werner Lemberg c4a1ef3c 2016-12-28T21:22:45 [cff] Catch `blend' op in non-variant fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't allow `blend' op for non-variant fonts.
Werner Lemberg c4cd34a9 2016-12-28T08:33:35 [cff] Better check of number of blends. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>, src/cff/cffparse.c (cff_parse_blend): Compare number of blends with stack size.
Werner Lemberg f80c4473 2016-12-26T23:57:45 Replace `++foo' and `--foo' with `foo++' and `foo--', resp.
Werner Lemberg 4441f7b2 2016-12-26T17:08:17 Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp. Other minor formatting.
Werner Lemberg 37c72f66 2016-12-25T22:55:25 Minor formatting.
Werner Lemberg b44e6c20 2016-12-22T08:30:15 [cff] Protect against invalid `vsindex' and `blend' values. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX, cf2_cmdBLEND>: Implement it.
Werner Lemberg e6a429e2 2016-12-21T20:27:48 [cff, truetype] Another try for #49829. * src/cff/cffdrivr.c: Don't include `FT_SERVICE_METRICS_VARIATIONS_H'. (cff_get_advances): Use `ttface->variation_support'. * src/truetype/ttdriver.c (tt_get_advances): Use `ttface->variation_support'. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Use `ttface->variation_support'.
Werner Lemberg 70704b34 2016-12-20T12:27:22 [truetype] Improve logic for getting fast advance widths. * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c (tt_get_advances): Use `is_default_instance' for test; this gets recomputed after changing blend coordinates.
Werner Lemberg a1e85f11 2016-12-20T10:52:26 [cff, truetype] Fast advance width retrieval for fonts with HVAR. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (cff_get_advances): Test for HVAR and VVAR. * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
Werner Lemberg ca3d4019 2016-12-18T18:23:19 * src/cff/cffobjs.c (cff_face_init): Make named instances work.
Werner Lemberg a8652c59 2016-12-18T18:12:03 [truetype, cff] Extend `get_var_blend' function of MM service. In particular, we need access to named instance data. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add argument for `FT_MM_Var'. * src/cff/cffload.c (cff_get_var_blend): Updated. * src/cff/cffload.h: Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. Accept value `NULL' for arguments. * src/truetype/ttgxvar.h: Updated.
Werner Lemberg 8f633a08 2016-12-18T06:42:31 [cff] Better handling of non-CFF font formats. * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a signature, so return `FT_Err_Unknown_File_Format' more often.
Werner Lemberg 4cd68179 2016-12-17T22:52:50 * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
Werner Lemberg 6949797d 2016-12-17T21:05:54 More code formatting.
Werner Lemberg 5d664b6d 2016-12-17T20:47:42 Use FT_SET_ERROR where useful. Other minor code formatting.
Werner Lemberg 50ff6c1e 2016-12-17T07:44:46 * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
Werner Lemberg 68620248 2016-12-16T11:15:17 [cff, truetype] Remove compiler warnings; fix `make multi'. * src/cff/cf2font.h: Include `cffload.h'. * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. (cff_vstore_load): Eliminate `vsSize'. (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. * src/cff/cffload.h: Include `cffobjs.h'. Provide declaration for `cff_load_private_dict'. * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate `minorVersion' and `map_offset'.
Werner Lemberg beecf80a 2016-12-16T08:52:03 [cff] Fix heap buffer overflow (#49858). * src/cff/cffparse.c (cff_parser_run): Add one more stack size check.
Werner Lemberg 01658be6 2016-12-15T23:10:59 Fix clang warnings. * src/cff/cffload.c (cff_blend_doBlend): Add cast. (cff_subfont_load): Set `error' correctly. * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
Dave Arnold edf40148 2016-12-15T21:56:44 [cff] Implement CFF2 support (2/2). The font variation code. All parts dependent on the GX code in the `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. In other words, you can still compile the `cff' module without defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 support without font variation). * src/cff/cf2font.c (cf2_font_setup): Add support for font variation. * src/cff/cf2font.h (CF2_Font): Add fields for variation data. * src/cff/cf2ft.c (cf2_free_instance): Free blend data. (cf2_getVStore, cf2_getNormalizedVector): New functions. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c: Include `cffload.h'. (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. (cf2_doBlend): New function. (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. * src/cff/cffload.c (FT_fdot14ToFixed): New macro. (cff_vstore_done, cff_vstore_load): New functions. (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, cff_blend_check_vector): New functions. (cff_load_private_dict): Add arguments for blend vector. Handle blend data. (cff_subfont_load, cff_subfont_done): Updated. (cff_font_load): Handle CFF2 variation store data. (cff_font_done): Updated. * src/cff/cffload.h: Include `cffparse.h'. Updated. * src/cff/cffobjs.c (cff_face_done): Updated. * src/cff/cffparse.c: Include `cffload.h'. (cff_parse_num): Handle internal value 255. (cff_parse_vsindex, cff_parse_blend): New functions. (CFF_FIELD_BLEND): New macro. (cff_parser_run): Updated. * src/cff/cffparse.h (cff_kind_blend): New enum value. * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' dictionary values. * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion, CFF_VStore, CFF_Blend): New structures. (CFF_FontRecDict): Add `vstore_offset' field. (CFF_Private): Add `vsindex' field. (CFF_SubFont): Add fields for blend data. (CFF_Font): Add `vstore' field. * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar', since glyph variation data is directly embedded. (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
Dave Arnold 9f62d2ca 2016-12-15T20:27:47 [cff] Implement CFF2 support (1/2). This commit does not contain the blend code for font variation support, which follows in another commit. You should ignore whitespace while inspecting this commit. * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' member. * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' flag. (cf2_getMaxstack): New function. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. (cf2_interpT2CharString): Handle CFF2 differences. Add tracing message for errors. * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): Update for CFF2. * src/cff/cffload.c (FT_FIXED_ONE): New macro. (cff_index_init, cff_index_load_offsets, cff_index_access_element, cff_index_get_name, cff_ft_select_get, cff_load_private_dict, cff_subfont_load, cff_font_load): Handle CFF2. * src/cff/cffload.h: Updated. * src/cff/cffobjs.c (cff_face_init): Handle CFF2. * src/cff/cffparse.c (cff_parse_maxstack): New function. (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New macros. (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New macros. * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend stuff). * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. (CFF_FontRecDict): Add `maxstack' field. (CFF_Private): Add `subfont' field. (CFF_Font): Add `top_dict_length' and `cff2' fields. * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
Dave Arnold abd58581 2016-12-15T12:17:22 [cff] Extend number parsing. The forthcoming CFF2 support needs a dynamic parsing limit. * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed, cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for parser. (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated. * src/cff/cffparse.h (cff_parse_num): Export locally.
Dave Arnold 010e0614 2016-12-15T11:22:15 [cff] Implement dynamic stack size for Adobe engine. This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for the forthcoming CFF2 support. * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size. (cf2_stack_free): Deallocate stack. (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed, cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal, cf2_stack_clear): Updated. (cf2_stack_setReal, cf2_stack_pop): New functions. * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. Update function declarations. * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. * src/cff/cffparse.c (cff_parser_init): Add parameter for stack size; return error code. (cff_parser_done): New function. (cff_parser_run): Updated. * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make `stack' a pointer. Update function declarations. * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): Updated.
Dave Arnold 41533b95 2016-12-15T00:00:45 [cff] Code shuffling. * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' fields. * src/cff/cffload.c (cff_subfont_load): Change last argument to `CFF_Font' Split off parsing of private dictionary into... (cff_load_private_dict): ...this new function. (cff_font_load): Updated.
Werner Lemberg c628a7df 2016-12-14T19:31:42 [cff] Add Multiple Masters service. The code simply uses the MM functions from the `truetype' module. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, cff_set_var_design, cff_get_var_design): New functions. (cff_service_multi_masters): New service. (cff_services): Updated. * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New functions. * src/cff/cffload.h: Updated. * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. (sfnt_init_face): Initialize `face->mm'.
Werner Lemberg a7dc0c35 2016-12-14T18:54:21 Extend functionality of `ft_module_get_service'. It can now differentiate between local and global searches. * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. (FT_Get_TrueType_Engine_Type): Updated. * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. * include/freetype/internal/ftobjs.h: Updated. * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): Updated.
Werner Lemberg 4e07516e 2016-12-14T18:25:44 [sfnt, cff] Minor preparations. * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, TTAG_VVAR): New SFNT table tags. * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
Werner Lemberg ffd8f622 2016-12-06T07:25:16 [cff] Code shuffling. This is a preparation for better integrating Dave Arnold's changes.
Alexei Podtelezhnikov c5f1bc4b 2016-10-25T22:31:42 [cff] Correct cmap format reporting (#24819). * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic charmap instead of guessing its format and language.
Werner Lemberg 2ecf89b4 2016-09-28T19:06:21 */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
Werner Lemberg c95b7652 2016-09-17T17:12:50 s/0/NULL/ for function pointers; comments, formatting.
Jonathan Kew a15133e6 2016-09-06T06:33:36 [cff] Fix uninitialized memory. Problem reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage' array to handle a `get' opcode without a previous `put'.
Werner Lemberg 3ebfe3c5 2016-09-05T10:55:07 [cff] Fix memory initialization. * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' variants of FreeType's memory allocation macros don't do zeroing.
Werner Lemberg f0fa7a67 2016-09-03T06:33:36 [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
Werner Lemberg bffe5fd6 2016-08-28T13:16:37 [cff] Minor comment.
Werner Lemberg 605946af 2016-07-11T16:14:36 Conditionally compile environment support. * 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.
Werner Lemberg 8f8ae8c5 2016-07-11T15:11:38 Handle properties in `FREETYPE_PROPERTIES' environment variable. 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'.
Werner Lemberg c3beb30a 2016-07-10T07:11:45 Add function `ft_property_string_set'. 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.
Werner Lemberg 119e8e41 2016-05-17T19:54:09 [cff] Fix matrix scaling (#47848). * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro. * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling value of all matrix coefficients to scale matrix. * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for matrix normalization if `matrix->yy' is zero.
Werner Lemberg 0b3cb8a8 2016-05-05T12:28:48 [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.
Alexei Podtelezhnikov e8542260 2016-04-08T23:21:34 Typos.
Werner Lemberg 015c6e08 2016-03-01T06:45:52 Fix clang warnings. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use FT_UShort for `min_flags' and `max_flags'. Initialize `prev_*' variables. * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix types of local variables. * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]: Update `printf' format string. * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast. (LLVMFuzzerTestOneInput): Fix loop type.
Werner Lemberg 3a5e5078 2016-02-15T22:21:01 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
Werner Lemberg 2873010d 2016-02-15T20:53:22 [cff] Handle T2 operator only with old CFF engine (#47157). * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
Werner Lemberg 8ed9eaf1 2016-02-15T20:41:58 [cff] Partially handle `load' and `store' ops in old CFF engine. Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be displayed. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store, cff_op_load>: Partially implement it. * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the number of Multiple Master axes. Update all callers. (cff_parse_multiple_master): Get number of axes. (cff_parser_run) <opcode 31>: Updated. * src/cff/cffparse.h: Updated. (CFF_ParserRec): Add `num_axes' field. * src/cff/cffload.c: Updated. * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
Werner Lemberg 658f530e 2016-02-15T14:28:28 [cff] Correctly trace SIDs that contain NULL bytes. We need this to properly trace Multiple Master CFFs, which contain two SIDs that are charstrings. This commit makes FreeType also show the last SID, omitted previously due to a bug. * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field. * src/cff/cffload.c (cff_index_get_pointers): Add argument to return the pool size. Update all callers. * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly access `cff->strings' to display the non-default strings.
Werner Lemberg 32950391 2016-02-15T12:54:40 Whitespace.
Werner Lemberg 3101f898 2016-02-15T08:48:50 [cff] Fix comment.
Werner Lemberg dc5b2e82 2016-02-14T20:47:28 * src/cff/cffparse.c: Include `cffgload.h'. Problem reported by Colin Walters <walters@verbum.org>.
Werner Lemberg 813aca51 2016-02-14T16:03:15 [cff] Make old CFF engine show MM CFFs (without variations). The new code only displays the first master in the font. * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new parameter to allow function calls from dictionaries also. <cff_op_blend>: Partially implement it. Update all callers. * src/cff/cffgload.h: Updated. * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the number of Multiple Master designs. Update all callers. (cff_parse_multiple_master): New function to rudimentarily parse operator. (cff_parser_run): Handle `T2' operator. * src/cff/cffparse.h: Updated. (CFF_ParserRec): Add `num_designs' field. * src/cff/cffload.c: Updated. * src/cff/cfftoken.h: Handle `MultipleMaster' operator. * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field. * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for MM CFFs.
Werner Lemberg 4c00dfb4 2016-02-07T11:43:03 Whitespace.
Werner Lemberg a1460704 2016-02-07T11:42:37 [cff] Minor. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>: Remove dead code.
Werner Lemberg 950f1696 2016-02-07T11:39:54 [cff] Implement missing operators in new engine (except `random'). * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro. * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the following operators: abs, add, and, div, drop, dup, eq, exch, get, ifelse, index, mul, neg, not, or, put, roll, sqrt, sub. * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New auxiliary function for `roll' operator.
Werner Lemberg 1a95d002 2016-02-07T00:39:03 Whitespace.
Werner Lemberg 5c8a8cb5 2016-02-06T08:03:03 [cff] Fix some Type 2 operators in old CFF engine. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq' operator, add `not' and (unsupported) `blend' operators.
Werner Lemberg cd346da5 2016-02-03T19:32:03 [cff] Fix handling of face_index == -1 for pure CFF. * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg 37412ff9 2016-01-12T21:37:13 Don't use macro names that contain `__' [1/2]. Such macro names are reserved for both C and C++. */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Jered Gray f53bab93 2016-01-10T12:03:36 [cff] Fix usage of `|' operator. * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR, default]: `|' is not guaranteed to be processed from left to right by the compiler. However, the code repeatedly calls `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
Werner Lemberg 75722f89 2015-11-11T09:55:16 [cff, autofit] Switch off stem darkening by default. * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c (cff_driver_init): Do it.
Jan Alexander Steffens (heftig) ccd3188a 2015-11-10T22:33:45 Allow native CFF hinter in FT_RENDER_MODE_LIGHT. Both the native CFF hinter and the auto-hinter now have a very similar rendering style. * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no longer implies FT_LOAD_FORCE_AUTOHINT. * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New macro. * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New macro. * src/cff/cffdrivr.c (cff_driver_class): Use it. * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection logic.
Werner Lemberg 4188deac 2015-10-30T08:07:56 Comments.
Werner Lemberg f1c93439 2015-10-22T10:11:23 [cff] Avoid overflow/module arithmetic. This modifies the addition of subroutine number to subroutine bias from unsigned to signed, but does not change any results. * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer, cf2_initLocalRegionBuffer): Change variable names from (unsigned) `idx' to (signed) `subrNum', since it is not an index until after the bias is added. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>: Updated similarly.
Dave Arnold 3cfd5123 2015-10-21T14:07:25 [cff] Fix limit in assert for max hints. * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the limit (96 bits).
Dave Arnold 748e3681 2015-10-21T13:58:43 [cff] Remove an assert (#46107). * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges in wrong order.
Werner Lemberg 5179c89f 2015-10-19T08:49:25 Comments.
Werner Lemberg 066a4913 2015-10-06T07:55:32 [cff] Return correct PS names from pure CFF (#46130). * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for SFNT.
Werner Lemberg 14d6b5d7 2015-08-13T15:22:17 [truetype] Introduce named instance access to GX fonts. For functions querying a face, bits 16-30 of the face index can hold the named instance index if we have a GX font. The indices start with value 1; value 0 indicates font access without GX variation data. * include/freetype/freetype.h (FT_FaceRec): Update documentation. * include/freetype/internal/sfnt.h: Ditto. * src/sfnt/sfobjs.c (sfnt_init_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and do argument checks. (sfnt_load_face): Updated. * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting the style name. * src/base/ftobjs.c (open_face_from_buffer, open_face_PS_from_sfnt_stream): Updated. * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. * src/cff/cffload.c (cff_font_load): Updated. * src/cff/cffobjs.c (cff_face_init): Make function exit early for pure CFF fonts if `font_index < 0'. Updated. * src/cid/cidobjs.c (cid_face_init): Updated. * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. * src/pfr/pfrobjs.c (pfr_face_init): Updated. * src/type1/t1objs.c (T1_Face_Init): Updated. * src/type42/t42objs.c (T42_Face_Init): Updated. * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): Updated. * docs/CHANGES: Updated.
Alexei Podtelezhnikov 4a466865 2015-08-12T23:45:40 [type1,cff,cid] Streamline font matrix application. * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only if font matrix is not trivial. * src/cff/cffgload.c (cff_slot_load): Ditto. * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the entire outline.
Werner Lemberg 4f009174 2015-08-02T10:05:00 Comment typo.
Werner Lemberg 5d1b8ab4 2015-07-31T21:49:07 Define FT_LONG_MAX. * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro. * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
Matthias Clasen b650dfbb 2015-07-26T21:08:34 [cff] Don't use `hmtx' table for LSB (#45520). * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance width only. Bug introduced 2015-04-10.
Werner Lemberg f9be567f 2015-07-09T15:10:31 Better support of user-supplied C++ namespaces. See http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose header files that contain FT_{BEGIN,END}_HEADER macros by themselves. * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include FT_CONFIG_STANDARD_LIBRARY_H earlier. * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
Werner Lemberg eb1bba9b 2015-06-30T09:46:39 Fix some clang compiler warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c (cf2_interpT2CharString), src/truetype/ttgload.c (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
Werner Lemberg 31d97df9 2015-06-21T19:12:12 Make Jam support work again. This is just very basic stuff and just a little bit tested on GNU/Linux only. I won't delve into this since I'm not a Jam user. * Jamfile: Call `HDRMACRO' for `ftserv.h' also. (DEFINES): Replace with... (CCFLAGS): ... this. * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is already handled in the top-level Jamfile. * src/autofit/Jamfile (DEFINES): Replace with... (CCFLAGS): ... this. (_sources): Add missing files. * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no longer contains macro header definitions. * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, src/truetype/Jamfile (_sources): Add missing files.
Chris Liddell a87fb8cc 2015-05-12T07:27:35 [cff] Make the `*curveto' operators more tolerant. * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate, pulling values off the stack until the stack is exhausted. Implicitly the stack must be a multiple (or for subtly different behaviour) a multiple plus a specific number of extra values deep. If that's not the case, enforce it (as the old code did).
Chris Liddell d65bf72c 2015-05-12T07:16:46 [cff] fix incremental interface with new cff code. * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental interface to retrieve glyph data for a SEAC, it be left to the incremental interface callback to apply the encoding to raw character index (as it was in the previous code).
Werner Lemberg 3cc076da 2015-04-28T09:16:27 [cff] Use `name' table for PS name if we have a SFNT-CFF. This follows the OpenType 1.7 specification. See http://tug.org/pipermail/tex-live/2015-April/036634.html for a discussion. * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we have an SFNT.
Alexei Podtelezhnikov 792db0b9 2015-04-15T23:20:23 [cff,cid,pfr,sfnt,winfonts] NULL.
Werner Lemberg 5cd21551 2015-04-10T07:01:01 [cff] Update advance width handling to OpenType 1.7. Problem reported by Behdad. * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case separately. * src/cff/cffgload.c (cff_slot_load): Use advance width and side bearing values from `hmtx' table if present.
Werner Lemberg f353a38e 2015-03-29T14:47:49 [cff] Fix Savannah bug #44629. * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h (CFF_MAX_SUBRS_CALLS): Set to 16.
Werner Lemberg 8ce30263 2015-03-27T08:33:47 [cff] Trace charstring nesting levels. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR, cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
Werner Lemberg a451638e 2015-03-11T08:09:13 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols. * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed to... (FT_SERVICE_FONT_FORMAT_H): This. * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed to ... (FT_FONT_FORMAT_*): This. src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
Werner Lemberg 851e8151 2015-03-01T19:27:09 Various compiler warning fixes for `make multi'. * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
Werner Lemberg 633a729d 2015-02-21T07:02:01 [cff] Minor signedness fixes related to last commit. * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
Werner Lemberg c00b05f2 2015-02-20T20:42:55 [cff] Thinkos in bias handling. Only the final result is always positive. Bug introduced three commits earlier. * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
Werner Lemberg eb05bfbe 2015-02-20T08:37:35 [cff] Signedness fixes for new engine. * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c, src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
Werner Lemberg 3a8d0537 2015-02-20T08:35:32 [cff] Signedness fixes for basic infrastructure and old engine. * include/internal/pshints.h, src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c, src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
Werner Lemberg 93a884c6 2015-02-19T14:11:16 [cff] Emit better error code for invalid private dict size. * src/cff/cffparse.c (cff_parse_private_dict): Reject negative values for size and offset.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Werner Lemberg 36d03c9f 2015-01-12T11:26:30 Fix Savannah bug #43976. Assure that FreeType's internal include directories are found before `CPPFLAGS' (which might be set by the user in the environment), and `CPPFLAGS' before `CFLAGS'. * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. (FT_COMPILE): Make this a special variable for compiling only the files handled in `freetype.mk'. (.c.$O): Removed, unused. * src/*/rules.mk (*_COMPILE): Fix order of include directories.
Werner Lemberg 0098d550 2014-12-07T11:03:57 Uppercase all hex digits for orthogonality.
Werner Lemberg 5018477f 2014-12-07T08:17:12 Minor.
Dave Arnold f89396cb 2014-12-04T06:17:26 [cff] Modify an FT_ASSERT. * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah bug #43661, the test font `...aspartam.otf' still triggers an FT_ASSERT. Since hintmap still works with count==0, ... (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to suppress the assert.
Dave Arnold 2cdc4562 2014-12-04T06:10:16 [cff] Fix Savannah bug #43661. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after hintmask is constructed. * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to avoid reading past end of hintmask.
Werner Lemberg de43ace7 2014-12-02T23:06:04 * include/*: Improve structure of documentation. . Add and update many `<Order>' tags. . Apply various documentation fixes. . Remove details to deprecated (or never implemented) data.
suzuki toshiya 1b12f5d1 2014-11-28T01:22:26 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(), cf2font.c could not find it under `make multi' build.
Werner Lemberg 6689a009 2014-11-25T08:53:09 [Savannah bug #43682] Properly handle missing return errors. The functions in this patch *do* return non-trivial errors that must be taken care of. * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>, src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c (load_truetype_glyph <subglyph loop>, tt_loader_init, TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend), src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
Werner Lemberg b24e8ba2 2014-11-25T08:30:49 [Savannah bug #43682] Add/remove `void' casts to some functions. We use a cast to indicate that we intentionally ignore a function's return value. However, this doesn't apply to API functions where errors can only happen for trivially invalid input. * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder), src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning), src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it.
Werner Lemberg 6889f7b7 2014-11-24T17:16:08 Remove all code related to FT_MAX_CHARMAP_CACHEABLE. This is no longer used. * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c, src/sfnt/ttcmap.c: Do it.