ChangeLog


Log

Author Commit Date CI Message
Werner Lemberg 7aeee3c5 2017-03-18T17:30:42 Introduce FT_UINT_TO_POINTER macro (#50560). We have to make a separate case for Windows 64's LLP64 data model. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. * src/truetype/ttgload.c (load_truetype_glyph): Use it.
Werner Lemberg 3e79254a 2017-03-18T10:06:15 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). The problematic font that exceeds the old limit is Lato-Regular, version 2.007, containing bytecode generated by a buggy version of ttfautohint.
Werner Lemberg 13fa85a2 2017-03-18T09:42:58 [truetype] Another limitation for bytecode loop count maximum. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' by number of glyphs also.
Werner Lemberg ab840e6a 2017-03-18T08:50:42 [ftfuzzer] Minor improvement. * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if bitmap strikes are active.
Werner Lemberg 9931175d 2017-03-18T07:06:49 Improve `make multi'. * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/sfnt/pngshim.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. * src/sfnt/ttbdf.c: Avoid empty source file. * src/sfnt/ttpost.c: Guard file with TT_CONFIG_OPTION_POSTSCRIPT_NAMES. * src/sfnt/ttsbit.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS. * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty source file. * src/truetype/ttsubpix.c: Guard file with TT_USE_BYTECODE_INTERPRETER also. * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort entries.
Werner Lemberg d5bfa053 2017-03-17T21:47:54 Fixes for conditional compilation. * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' earlier. * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into TT_CONFIG_OPTION_GX_VAR_SUPPORT block. (sfnt_done_face): Protect some code with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler warning. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable into TT_USE_BYTECODE_INTERPRETER block. (tt_loader_init): Put `error' variable into TT_USE_BYTECODE_INTERPRETER block.
Werner Lemberg e5595784 2017-03-17T21:34:08 Fix preprocessor warning. * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its value.
Werner Lemberg bffb7fe9 2017-03-17T07:52:30 `make multi' fixes; compiler warnings. * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. (get_win_string, get_apple_string): Initialize `result'.
Dave Arnold fdbef538 2017-03-17T07:28:11 [cff] Fix potential bugs in default NDV for CFF2. * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend vector when `lenNDV' is zero; don't rely on zero-init. Save `lenNDV' as part of cache key even when `lenNDV' is zero.
Dave Arnold 0bf95b58 2017-03-17T07:22:55 [cff] Fix CFF2 stack allocation. * src/cff/cffparse.c (cff_parser_init) add 1 for operator.
Werner Lemberg d9ff6f20 2017-03-16T20:20:51 * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
Werner Lemberg 981c23b7 2017-03-15T11:35:26 Remove clang compiler warnings (#50548). * include/freetype/internal/tttypes.h (TT_FaceRec): Make `var_postscript_prefix_len' unsigned. * src/autofit/afwarp.c (af_warper_compute_line_best): Remove redundant assignment. * src/cff/cffload.c (cff_subfont_load): Add casts. * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' keyword. Add casts. (fixed2float): Add cast. (sfnt_get_var_ps_name): Make `p' always initialized. Add casts. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
Werner Lemberg 3f92048a 2017-03-15T09:18:22 [ftfuzzer] Limit number of tested faces and instances. This is inspired by the discussion in and analysis of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only up to 20 face indices. Use only up to 20 instance indices.
Werner Lemberg f87269c3 2017-03-15T08:03:16 * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting.
Werner Lemberg 9357ef80 2017-03-15T07:56:22 Typo: s/stroke/strike/.
Werner Lemberg 34010f7c 2017-03-14T21:50:22 [sfnt] Implement PS names for font instances [3/3]. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `var_postscript_prefix' and `var_postscript_prefix_len'. * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. (get_win_string, get_apple_string): Remove `const' from return value. (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. (hexdigits): New array. (sfnt_get_var_ps_name): New function, implementing Adobe TechNote 5902 to construct a PS name for a variation font instance. (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. * src/sfnt/sfobjs.c (sfnt_done_face): Updated. * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset `face->postscript_name' to trigger recalculation for new instance parameters.
Werner Lemberg 4fd9cc73 2017-03-14T19:40:50 [sfnt] Implement PS names for font instances [2/3]. * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function to find the shortest representation of a 16.16 fractional number.
Werner Lemberg 4a32dce9 2017-03-14T19:32:12 [sfnt] Implement PS names for font instances [1/3]. Add 128bit MurmurHash 3 function. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/sfnt/sfdriver.c (ROTL32): New macro. (fmix32, murmur_hash_3_128): New functions.
Werner Lemberg 447a0b62 2017-03-13T07:42:34 [truetype] Ignore invalid MVAR tags. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit warning for invalid tags. (tt_apply_mvar): Ignore invalid tags.
Werner Lemberg 5eb0fd5e 2017-03-12T20:46:56 [truetype] Store and use design coordinates also. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add `normalizedcoords' argument. * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store the design coordinates of the current instance. Updated. * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... (tt_set_mm_blend): ... New function. Convert data in `normalizedcoords' array to `coords' array on demand. (TT_Set_Var_Design): Store argument data in `coords' array. (TT_Get_Var_Design): Get data from `coords' array. (tt_get_var_blend): Updated. (tt_done_blend): Updated. * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/cff/cffobjs.c (cff_face_init): Updated.
Werner Lemberg 4a62922b 2017-03-12T10:19:53 src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
Werner Lemberg 7bbb91fb 2017-03-08T15:09:41 [sfnt] Another fix for buggy variation fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of instances to zero for `CFF' fonts table, ensure that there is no `CFF2' present also (which gets priority).
Alexei Podtelezhnikov 7d7aae1d 2017-03-07T22:21:26 Typos.
Werner Lemberg 77930974 2017-03-07T17:27:58 [sfnt] Improve handling for buggy variation fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of instances to zero for `CFF' fonts table, ensure that there is no `glyf' present also (which gets priority).
Werner Lemberg 27fee7f8 2017-03-06T20:45:44 [sfnt, truetype] Always provide default instance. As documented in the OpenType specification, an entry for the default instance may be omitted in the named instance table. In particular this means that even if there is no named instance table in the font we actually do have a named instance, namely the default instance. For consistency, we always want the default instance in our list of named instances. If it is missing, we try to synthesize it. * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default instance is in the table of named instances. Otherwise adjust number of instances. * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named instances. Sythesize a named instance entry if necessary. (tt_done_blend): Free `normalized_stylecoords'.
Werner Lemberg c1b000da 2017-03-05T20:23:35 [sfnt] Remove redundant code. * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for `num_instances', which will always succeed.
Werner Lemberg 0c7fb43d 2017-03-05T19:06:41 [sfnt] Add `get_name_id' service. * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New typedef. (SFNT_Interface): Add `get_name_id' field. (FT_DEFINE_SFNT_INTERFACE): Updated. * src/sfnt/sfdriver.c (search_name_id): Rename to... (sfnt_get_name_id): ... this. (sfnt_get_ps_name, sfnt_interface): Udpated.
Werner Lemberg 588e38e0 2017-03-04T11:04:24 [truetype] Make `TT_Set_MM_Blend' set named instance index. * src/truetype/ttgxvar.h (GX_Blend): New array `normalized_stylecoords'. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill `normalized_stylecoords'. (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' accordingly.
Werner Lemberg 4717696c 2017-03-02T21:42:14 [truetype] Split off designer/normalized conversion routines. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion code designer->normalized coordinates to... (ft_var_to_normalized): ... New function. (TT_Get_Var_Design): Split off conversion code normalized->designer coordinates to... (ft_var_to_design): ... New function.
Werner Lemberg b553fcb5 2017-02-28T15:11:21 [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. * src/sfnt/sfdriver.c (sfnt_ps_map): New array. (sfnt_is_postscript): New function. (char_type_func): New typedef. (get_win_string, get_apple_string): Add argument to specify character checking function. Add argument whether argument checking failures should be reported. Update callers. (search_name_id): Fix return value.
Werner Lemberg b653a230 2017-02-26T11:23:07 [sfnt] Split off another bit of `sfnt_get_ps_name'. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some functionality into... (search_name_id): ... New function.
Werner Lemberg c1abd6aa 2017-02-23T22:58:14 [sfnt] Modularize `sfnt_get_ps_name'. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some functionality into... (IS_WIN, IS_APPLE): ... New macros. (get_win_string, get_apple_string): ... New functions.
Werner Lemberg 01f315f0 2017-02-23T14:24:01 [truetype] Minor improvement. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Remove unnecessary tests.
Werner Lemberg f0cee1a2 2017-02-23T08:23:39 * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. For orthogonality with other structure field names. Update all users.
Alexei Podtelezhnikov 761d9e41 2017-02-22T22:41:36 * src/smooth/ftgrays.c (gray_hline): Improve code.
Dominik Röttsches b3105347 2017-02-20T12:29:59 Fix some `ttnameid.h' entries (#50313). * include/freetype/ttnameid.h: s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/.
Werner Lemberg e706798d 2017-02-20T09:15:13 [cff] Finish support for `random' operator. * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. * src/cff/cffobjs.c: Updated. (cff_driver_init): Initialize random seed value. * src/cff/cffload.c (cff_random): New function. (cff_subfont_load): Add `face' argument. Update all callers. Initialize random number generator with a proper seed value. (cff_font_load): Add `face' argument. Update all callers. * src/cff/cffload.h: Updated. * src/cff/cf2intrp.c (CF2_FIXME): Removed. (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't initialize random seed value. <cff_op_random>: Use new random seed framework.
Werner Lemberg 156b30b1 2017-02-20T09:06:22 [cff] Sanitize `initialRandomSeed'. * src/cff/cffload.c (cff_load_private_dict): Make `initial_random_seed' value always positive.
Werner Lemberg 753e1131 2017-02-20T09:01:14 [cff] Introduce `random-seed' property (2/2). * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. (open_face): Initialize `face->internal->random_seed'. (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' property.
Werner Lemberg ca1486c3 2017-02-20T08:55:26 [cff] Introduce `random-seed' property (1/2). We need this for support of the `random' operator. * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New field `random_seed'. * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'.
Werner Lemberg 467b026c 2017-02-18T10:42:48 Remove clang warnings. * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' keyword. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Initialize some variables.
Nikolaus Waxweiler 2b0ac189 2017-02-18T10:42:23 Add face property for stem darkening. * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New macro. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add `no_stem_darkening' field. * src/autofit/afloader.c (af_loader_load_glyph), src/autofit/afmodule.c (af_property_set): Updated. * src/base/ftobjs.c: Include FT_AUTOHINTER_H. (ft_open_face_internal): Updated. (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. * src/cff/cffdrivr.c (cff_property_set): Updated.
Nikolaus Waxweiler 2e951988 2017-02-16T20:45:45 Add face property for LCD filter weights. * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, FT_LCD_FILTER_FIVE_TAPS): New macros. (FT_LcdFiveTapFilter): New typedef. * include/freetype/ftobjs.h (FT_Face_InternalRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. (ft_lcd_filter_fir): New prototype. (FT_LibraryRec): Updated. * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... (ft_lcd_filter_dir): ... this base function. Updated. (_ft_lcd_filter_legacy): Updated. (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. * src/base/ftobjs.c (ft_open_face_internal): Updated. (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING: Handle LCD weights from `FT_Face_Internal'.
Nikolaus Waxweiler 64cdee73 2017-02-15T08:06:35 Add new function `FT_Face_Properties'. This commit provides the framework, to be filled with something useful in the next commits. * include/freetype/freetype.h (FT_Face_Properties): Declare. * src/base/ftobjs.c (FT_Face_Properties): New function.
Werner Lemberg 319125d4 2017-02-13T09:34:17 [autofit] Prevent overlapping blue zones. Problem reported as https://github.com/google/fonts/issues/632 The font in question (Nunito) has values 705 and 713 for the reference and overshoot values, respectively, of the first blue zone. Blue zone 2, however, has value 710 for both the reference and overshoot. At 12ppem, reference and overshoot of blue zone 0 becomes 8px, while blue zone 2 becomes 9px. A peculiarity of this font is that the tops of isolated vertical stems like `N' have a slight overshoot also. The auto-hinter tries to find the nearest blue zone using the *original* coordinates. For vertical stems, this is value 713. For normal horizontal tops like in character `E', this is value 710. Since value 713 is mapped to 8px but value 710 to 9px, `N' and similar characters are one pixel higher than `E', which looks very bad. This commit sanitizes blue zones to avoid such a behaviour. * src/autofit/aflatin.c (af_latin_sort_blue): New function. (af_latin_metrics_init_blues): Sort blue values and remove overlaps.
Alexei Podtelezhnikov fcd47b3d 2017-02-12T23:07:29 * src/smooth/ftgrays.c (gray_sweep): Improve code.
Werner Lemberg faa3c882 2017-02-06T13:13:02 [truetype] Implement `VVAR' table support. * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... (GX_HVVarTable): ...This. (GX_Blend): Add fields for `VVAR' table handling. Other minor updates. * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... (ft_var_load_hvvar): ...This. Handle VVAR loading also (controlled by an additional parameter). (tt_hadvance_adjust): Renamed to... (tt_hvadvance_adjust): ...This. Handle application of advance height also (controlled by an additional parameter). (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for `tt_hvadvance_adjust'. * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
Werner Lemberg 1dee4bf9 2017-02-05T08:33:10 [autofit] Use better blue zone characters for lowercase latin. The number of lowercase characters for computing the top flat blue zone value was too small (in most cases only `x' and `z'). If one of the two characters has a large serif, say, it can happen that FreeType must select between two different values, having a 50% chance to use the wrong one. As a result, rendering at larger PPEM values could yield uneven lowercase glyph heights. Problem reported by Christoph Koeberlin <christoph@koe.berlin>. * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced with... (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): ... New, extended sets. (AF_BLUE_STRINGSET_LATN): Updated. * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated.
Werner Lemberg 1c513fbb 2017-02-04T20:30:40 Make `freetype-config' a wrapper of `pkg-config' if possible. Based on ideas taken from http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to set output variables if program is available. * docs/CHANGES, docs/freetype-config.1: Updated.
Werner Lemberg 79042890 2017-02-04T16:08:08 * builds/unix/unix-def.in (freetype-config): Fix permissions.
Werner Lemberg 0a1169f7 2017-02-03T19:38:20 * src/autofit/afglobal.c (af_face_globals_free): Erase useless code.
Werner Lemberg 5a7f2ff5 2017-02-03T08:31:18 * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. Reported by Behdad.
Werner Lemberg e6699596 2017-02-02T11:38:04 [truetype] Fix MVAR post-action handling. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This is important to make `tt_size_reset_iterator' (called in `tt_apply_mvar') always work.
Werner Lemberg dadc50a4 2017-02-02T07:13:29 Make compilation with FT_CONFIG_OPTION_PIC work again. All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. * include/freetype/internal/services/svmetric.h (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. * src/autofit/aflatin.c (af_latin_hints_compute_edges, af_latin_hint_edges): Provide `globals' variable. * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing variable. * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, AF_STYLE_CLASSES_GET): Redefine. * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. * src/cff/cffpic.h (CffModulePIC): Fix typo.
Alexei Podtelezhnikov 2ca5b07d 2017-01-31T23:13:50 * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
Werner Lemberg fa437d8d 2017-01-31T23:06:38 [cff] Provide metrics variation service interface (#50196). Only now I've got an OTF with an HVAR table for testing... The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the metrics variations interface. However, this didn't work with `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for metric service functions from the `truetype' module. (cff_service_metrics_variations): New service. (cff_services): Updated. * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. [FT_CONFIG_OPTION_PIC]: Synchronize code. * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always load the service from the `truetype' module.
Werner Lemberg 4058939c 2017-01-31T19:11:56 Add framework to support services with 9 functions. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): New macro.
Werner Lemberg 1e550601 2017-01-31T18:47:10 [base] Fix error handing in MM functions. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Implement it.
Werner Lemberg e80e4d81 2017-01-31T08:32:07 [truetype] Fix sanity check for `gvar' table (#50184). * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing variation data for some glyphs.
Werner Lemberg 31f80553 2017-01-31T08:10:04 [autofit] Avoid uninitialized jumps (#50191). * src/autofit/afcjk.c (af_cjk_metrics_check_digits), src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize `advance'.
Werner Lemberg 464b16ba 2017-01-27T08:45:46 s/GB2312/PRC/. * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. (FT_ENCODING_GB2312): Deprecated. * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. (TT_MS_ID_GB2312): Deprecated. * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. * docs/CHANGES: Updated.
Werner Lemberg f4253366 2017-01-27T00:06:52 [base] Add `FT_Get_Sfnt_LangTag' function. * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. (FT_Get_Sfnt_LangTag): New declaration. * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion. * docs/CHANGES: Updated.
Werner Lemberg 939df420 2017-01-26T21:41:38 [sfnt] Support `name' table format 1. * include/freetype/internal/tttypes.h (TT_LangTagRec): New structure. (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. * src/sfnt/ttload.c (tt_face_load_name): Add support for language tags. Reduce array size of name strings in case of invalid entries. (tt_face_free_name): Updated. * docs/CHANGES: Updated.
Werner Lemberg f4e56966 2017-01-25T15:08:41 [sfnt] s/TT_NameEntry/TT_Name/. * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed to... (TT_NameRec): This. (TT_NameTableRec): Updated. * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Renamed to... (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, respectively. (TT_NameEntry_ConvertFunc): Renamed to... (TT_Name_ConvertFunc): This. (tt_face_get_name): Updated. * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_names): Updated.
Alexei Podtelezhnikov 983fb0df 2017-01-24T23:56:59 Typos.
Werner Lemberg 14397120 2017-01-24T20:48:50 [sfnt] Fix Postscript name service for symbol fonts. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 entries also.
Werner Lemberg 141f0ea5 2017-01-24T17:00:36 [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): Deprecated. * src/sfnt/sfobjs.c (sfnt_load_face): Updated. * docs/CHANGES: Updated.
Werner Lemberg 693f56ff 2017-01-23T12:53:18 [base] Add `FT_Set_Default_Properties' (#49187). * include/freetype/ftmodapi.h: Add declaration. * src/base/ftinit.c (ft_set_default_properties): Renamed to... (FT_Set_Default_Properties): ... this. (FT_Init_FreeType): Updated. * docs/CHANGES: Updated.
Werner Lemberg f502092b 2017-01-23T11:47:40 [truetype] Minor updates for OpenType 1.8.1. * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been removed frem the specification; it is now reserved. * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. (GX_FVar_Head): Remove `countSizePairs'; the corresponding data field in the `MVAR' table is now reserved. (fvar_fields): Updated.
Werner Lemberg 79d52b9a 2017-01-23T07:43:56 [truetype] Avoid segfault for invalid variation data. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure `itemCount' is not zero. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441
Alexei Podtelezhnikov 15c6e8d6 2017-01-22T23:09:05 Typos.
Werner Lemberg 43061d6a 2017-01-20T10:16:38 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits.
Alexei Podtelezhnikov 236bbdbe 2017-01-18T23:12:31 Typos.
Alexei Podtelezhnikov ca472220 2017-01-17T23:45:08 Typos.
Werner Lemberg ba6f3e18 2017-01-17T11:50:09 * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. (TT_APPLE_ID_FULL_UNICODE): New macro. (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, TT_MS_LANGID_UPPER_SORBIAN_GERMANY, TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New macros. (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, TT_MS_LANGID_UIGHUR_PRC): New aliases. Remove commented out code. (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, TT_NAME_ID_VARIATIONS_PREFIX): New macros. (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many years), use guarded long macros by default and define short versions as aliases for the long ones.
Werner Lemberg 322b3be5 2017-01-15T13:57:25 * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters also.
Werner Lemberg c529885b 2017-01-12T08:42:55 * src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
Werner Lemberg 723aafb5 2017-01-11T14:21:26 [truetype] Actually use metrics variation service. * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (ft_face_get_mvar_service): New auxiliary function to look up metrics variation service. (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call metrics variation service. * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for named instances.
Werner Lemberg d718ac4e 2017-01-11T14:12:34 [truetype] Provide metrics variation service. * include/freetype/internal/services/svmetric.h (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. * src/truetype/ttgxvar.c: Include FT_LIST_H. (tt_size_reset_iterator): New auxiliary function for... (tt_apply_var): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_metrics_variations): Add `tt_apply_mvar'. * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics variation service.
Werner Lemberg 07ee1d25 2017-01-11T12:50:51 [truetype] Parse `MVAR' table. * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. (GX_Value, GX_MVarTable): New structures. (GX_Blend): Add it. * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, GX_GASP_CASE): New macros. (ft_var_get_value_pointer): New auxiliary function to get a pointer to a value from various SFNT tables already stored in `TT_Face'. (ft_var_load_mvar): New function. (TT_Get_MM_Var): Call it. (tt_done_blend): Updated.
Werner Lemberg 8ab08cff 2017-01-11T10:05:27 [truetype] More preparations for MVAR support. * src/truetype/ttobjs.c (tt_size_reset): Add argument to make function only recompute ascender, descender, and height. * src/truetype/ttobjs.h: Updated. * src/truetype/ttdriver.c (tt_size_select, tt_size_request): Updated.
Werner Lemberg 7ccca6ae 2017-01-09T19:54:44 [pcf] Disable long family names by default. * include/freetype/config/ftoption.h (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
Werner Lemberg 08fd250e 2017-01-09T11:30:32 [pcf] Make long family names configurable. The change from 2016-09-29 was too radical (except for people using the openSuSE GNU/Linux distribution). To ameliorate the situation, PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls the feature; if set, a new PCF property option `no-long-family-names' can be used to switch this feature off. * include/freetype/config/ftoption.h, devel/ftoption.h (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. * include/freetype/ftpcfdrv.h: New header file (only containing comments currently, used for building the documentation). * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and FT_PCF_DRIVER_H. (pcf_property_set, pcf_property_get): New functions. (pcf_service_properties): New service. (pcf_servives): Updated. (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle `no_long_family_names'. * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. * docs/CHANGES: Updated.
Werner Lemberg f837a50e 2017-01-09T10:49:03 [pcf] Introduce a driver structure. To be filled later on with something useful. * src/pcf/pcf.h (PCF_Driver): New structure. * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy functions. (pcf_driver_class): Updated.
Werner Lemberg 469ced7f 2017-01-08T09:28:34 [truetype] Again some GX code shuffling. We need this later on for MVAR also. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing an item store variation delta into... (ft_var_get_item_delta): ...new function.
Werner Lemberg 6812f174 2017-01-08T07:33:05 [truetype] Adjust font variation flags for MVAR. * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): Remove all flags related to MVAR; replace it with... (TT_FACE_FLAG_VAR_MVAR): ...this new macro. (TT_Face): Remove `mvar_support' field (which was still unused).
Werner Lemberg 02919134 2017-01-07T07:45:28 [truetype] More GX code shuffling. We need this later on for MVAR also. * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item variation store into... (ft_var_done_item_variation_store): ...new function.
Werner Lemberg fb90f00c 2017-01-06T22:23:52 [truetype] More generalization of GX stuff. We need this later on for MVAR also. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add parameters for delta-set index mapping and item variation store. (ft_var_load_item_variation_store): Add parameter for item variation store. s/hvarData/varData/. Move allocation of `hvar_table' to... (ft_var_load_hvar): ...this function. Updated.
Werner Lemberg 0bd0112f 2017-01-06T21:32:49 [truetype] Some GX structure renames for generalization. We need this later on for MVAR also. * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... (GX_ItemVarData): ...this. (GX_HVarRegion): Renamed to... (GX_VarRegion): ...this. (GX_HVStore): Renamed to... (GX_ItemVarStore): ...this. (GX_WidthMap): Renamed to... (GX_DeltaSetIdxMap): ...this. (GX_HVarTable): Updated. * src/truetype/ttgxvar.c: Updated.
Werner Lemberg 9c814704 2017-01-06T21:13:36 [truetype] Code shuffling. * src/truetype/ttgxvar.c (): Split off loading of item variation store and delta set index mapping into... (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping): ... new functions.
Werner Lemberg 7e1cce58 2017-01-06T20:31:22 [truetype] Add HVAR access without advance width map. * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where `offsetToAdvanceWidthMapping' is zero. (tt_hadvance_adjust): Implement direct deltaSet access by glyph index.
Werner Lemberg 8b755445 2017-01-06T11:47:55 [pcf] Revise driver. This commit improves tracing and handling of malformed fonts. In particular, the changes to `pcf_get_properties' fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 * src/pcf/pcfread.c (tableNames): Use long names for better readability. (pcf_read_TOC): Allow at most 9 tables. (pcf_get_properties): Allow at most 256 properties. Limit strings array length to 256 * (65536 + 1) bytes. Better tracing. (pcf_get_metric): Trace metric data. (pcf_get_metrics): Allow at most 65536 metrics. Fix comparison of `metrics->ascent' and `metrics->descent' to avoid potential overflow. Better tracing. (pcf_get_bitmaps): Allow at most 65536 bitmaps. Better tracing. (pcf_get_encodings, pcf_get_accel): Better tracing. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. These are now shown by `pcf_get_bitmaps'.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg a7c2f44b 2017-01-04T13:12:03 * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format.
Werner Lemberg c9d47724 2017-01-04T10:00:49 [cff] More consistency checks for pure CFFs. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 * src/cff/cffload.c (cff_font_load): Check element number and size of Name and Top DICT indices.
Werner Lemberg 025226ae 2017-01-04T07:45:44 [cff, truetype] Minor tracing improvement. * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c (tt_face_init): Indent first tracing message from SFNT driver.
Werner Lemberg 8982405f 2017-01-03T09:46:19 [truetype] Various minor fixes. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction size only if we do native hinting. (TT_Load_Glyph): Trace returned error code. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace returned error code. (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is invalid.
Werner Lemberg 624b6802 2017-01-03T09:42:41 [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. These tables are optional. * src/sfnt/sfobjs.c (sfnt_load_face): Implement it.
Werner Lemberg 69414e7a 2017-01-03T06:53:13 * src/cff/cffparse.c (cff_parse_num): Simplify.
Werner Lemberg 248eaa4f 2017-01-03T00:27:07 Various fixes for clang's undefined behaviour sanitizer. * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. (cff_blend_doBlend): Don't left-shift negative numbers. Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cff/cffparse.c (cff_parse): Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any subrs. * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around definition of `ft_get_adobe_glyph_index'. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c: Inlude `pstables.h' twice to get both declaration and definition. * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix casting.