summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add new `slight' auto-hinting mode.Werner Lemberg2017-04-2611-41/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mode uses fractional advance widths and doesn't scale glyphs horizontally, only applying vertical scaling and hinting. At the same time, the behaviour of the `light' auto-hinter gets restored for backwards compatibility: Both vertical and horizontal scaling is again based on rounded metrics values (this was changed in a commit from 2017-03-30 as a side effect). To be more precise, the behaviour is restored for TrueType fonts only; for other font formats like Type 1, this is a new feature of the `light' hinting mode. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. (FT_RENDER_MODE_SLIGHT): New render mode. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add `autohint_mode' and `autohint_metrics' fields. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): Updated. * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use `autohint_metrics'. (af_loader_load_glyph): s/internal/slot_internal/. Initialize `autohint_metrics' and `autohint_mode' depending on current auto-hint mode. Use `autohint_metrics'. Updated. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. * src/base/ftobjs.c (FT_Load_Glyph): Updated. (FT_New_Size): Allocate `internal' object. * src/pshinter/pshalgo.c (ps_hints_apply): Updated. * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
* Document that some FT_Size_Metrics values are always rounded.Werner Lemberg2017-04-261-12/+19
|
* And another CVE for an older FreeType version.Werner Lemberg2017-04-261-2/+9
|
* Document CVE-2017-8105.Werner Lemberg2017-04-261-0/+5
|
* freetype.h: Avoid non-ASCII character (#50858).Werner Lemberg2017-04-231-1/+1
|
* Introduce `FT_Size_InternalRec' structure.Werner Lemberg2017-04-228-32/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to extend this later on. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New structure with a single field `module_data'. * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of `FT_Size' structure. * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use `size->internal->module_data' instead of `size->internal'. * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. (cff_size_init, cff_size_select, cff_size_request): Use `size->internal->module_data' instead of `size->internal'. * src/cif/cidobjs.c (cid_size_done, cid_size_init, cid_size_request): Use `size->internal->module_data' instead of `size->internal'. * src/psaux/psobjs.c (t1_builder_ini): Use `size->internal->module_data' instead of `size->internal'. * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): Use `size->internal->module_data' instead of `size->internal'.
* * src/smooth/ftsmooth.h: Remove unused guards and declaration.Alexei Podtelezhnikov2017-04-212-7/+4
|
* Typos.Alexei Podtelezhnikov2017-04-213-6/+5
|
* Typos.Alexei Podtelezhnikov2017-04-198-25/+25
|
* Typos.Alexei Podtelezhnikov2017-04-165-7/+7
|
* Fix tracing messages.Hin-Tak Leung2017-04-162-5/+17
| | | | | | * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print correct function name.
* Typos.Alexei Podtelezhnikov2017-04-154-9/+9
|
* [autofit] Add support for Old Turkic script.Werner Lemberg2017-04-088-35/+104
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Old Turkic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Old Turkic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data.
* [autofit] Add support for Gothic script.Sascha Brawer2017-04-087-111/+168
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Gothic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Gothic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data.
* [autofit] Add support for Cypriot script.Sascha Brawer2017-04-087-146/+212
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Cypriot. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Cypriot standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data.
* [autofit] Add support for Deseret script.Sascha Brawer2017-04-087-135/+208
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Deseret. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Deseret standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data.
* [autofit] Fix invalid character range description (#50745).Werner Lemberg2017-04-072-1/+13
| | | | | | | | | Also reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in recent commit.
* [ftfuzzer] Fix clang warnings.Werner Lemberg2017-04-072-2/+9
| | | | | * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add casts.
* [autofit] Add support for Lisu script.Sascha Brawer2017-04-067-49/+106
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Lisu. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Lisu standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data.
* [autofit] Add support for Osage script.Sascha Brawer2017-04-067-25/+119
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Osage. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Osage standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data.
* [autofit] Add support for Glagolitic script.Sascha Brawer2017-04-067-100/+174
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Glagolitic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Glagolitic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data.
* [autofit] Add support for Tai Viet script.Sascha Brawer2017-04-067-17/+79
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Tai Viet. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tai Viet standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
* [autofit] Add support for Tifinagh script.Sascha Brawer2017-04-067-2/+54
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Tifinagh. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tifinagh standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
* [autofit] Add support for N'Ko script.Sascha Brawer2017-04-067-42/+116
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for N'Ko. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add N'Ko standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data.
* [autofit] Add support for Adlam script.Sascha Brawer2017-04-067-137/+210
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Adlam. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Adlam standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data.
* [autofit] Add support for Ol Chiki script.Sascha Brawer2017-04-067-20/+71
| | | | | | | | | * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Ol Chiki standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data.
* [truetype] Avoid reexecution of `fpgm' and `prep' in case of error.Werner Lemberg2017-04-033-10/+35
| | | | | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New error code. * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution of these two opcodes in `glyf' bytecode. (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode in case of error since function tables can no longer be modified (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can enormously speed up handling of broken fonts.
* [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'.Alexei Podtelezhnikov2017-04-023-6/+13
| | | | | * src/autofit/aflatin.c (af_latin_hints_init): Updated. * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
* * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H.Werner Lemberg2017-04-012-0/+9
| | | | | | Otherwise FT_UINT_TO_POINTER might not be defined. Problem reported by Alexei.
* [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'.Alexei Podtelezhnikov2017-03-315-7/+16
| | | | | | | * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. * src/autofit/afcjk.c (af_cjk_hints_init): Updated. * src/autofit/aflatin.c (af_latin_hints_init): Ditto. * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
* * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04.Werner Lemberg2017-03-312-2/+14
| | | | | | | | Allow CFFs containing a single font to have an empty font name. Problem reported by 張俊芝 <418092625@qq.com> in http://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html
* * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also.Werner Lemberg2017-03-302-1/+15
| | | | Requested by Dave Arnold.
* [truetype] Fix HVAR and VVAR handling (#50678).Werner Lemberg2017-03-302-8/+15
| | | | | | * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle glyph indices larger than `mapCount' as described in the specification.
* [truetype] Allow linear scaling for unhinted rendering (#50470).Werner Lemberg2017-03-303-7/+19
| | | | | | | | | | | * src/truetype/ttdriver.c (tt_size_request): Revert change from 2011-07-16; the intended metrics fix seems now to be implemented in a different way, making the patch unnecessary. Note that this change was usually patched out by all major GNU/Linux distributions due to heavy side effects. * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): Refer to the metrics of the `TT_Size' object.
* [truetype] Fix thinko related to PS name of default named instance.Werner Lemberg2017-03-302-16/+24
| | | | | * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are name ID values, not indices into the array of name entries.
* s/index/idx/ where appropriate.Werner Lemberg2017-03-271-90/+90
|
* [cid, truetype] Don't use `index' as a variable name.Werner Lemberg2017-03-272-3/+13
| | | | | | | | At least on FreeBSD there is a global declaration of `index' in file `/usr/include/strings.h'. * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where appropriate.
* [sfnt] Minor improvement for handling kern tables.Wojciech Mamrak2017-03-272-4/+13
| | | | | | | | * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for cross-stream kerning tables since we reject format 2 tables later on anyways. Modify code for limit test... (tt_face_get_kerning): ... to avoid a limit test here.
* [pcf] Fix compiler warnings.Werner Lemberg2017-03-272-0/+15
| | | | | | | Reported by Alexander Hedges <ahedges@student.ethz.ch>. * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag `property_name' with `FT_UNUSED' where necessary.
* * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.Werner Lemberg2017-03-262-0/+16
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
* [psaux] Better protect `flex' handling.Werner Lemberg2017-03-242-0/+24
| | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <callothersubr>: Since there is not a single flex operator but a series of subroutine calls, malformed fonts can call arbitrary other operators after the start of a flex, possibly adding points. For this reason we have to check the available number of points before inserting a point.
* [sfnt] Fix check for default named instance.Werner Lemberg2017-03-232-6/+13
| | | | | * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four bytes, not two...
* Make MM fonts work (again).Werner Lemberg2017-03-232-12/+18
| | | | | | | * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore return value of `ft_face_get_mvar_service'; instead, check whether a service is actually returned.
* [truetype] Some variable renamings.Werner Lemberg2017-03-214-78/+100
| | | | | | | | | | | | | | | Too much local variables holding different structures were called `metrics'. * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. * src/truetype/ttgload.c (tt_get_metrics_incr_overrids, compute_glyph_metrics): s/metrics/incr_metrics/. (load_sbit_image): s/metrics/sbit_metrics/. * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. (tt_size_init_bytecode): s/metrics/tt_metrics/. (tt_size_reset): s/metrics/size_metrics/.
* [sfnt] Don't add instances to non-variation fonts.Werner Lemberg2017-03-202-2/+9
| | | | * src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
* * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).Werner Lemberg2017-03-202-2/+9
|
* Introduce FT_UINT_TO_POINTER macro (#50560).Werner Lemberg2017-03-185-3/+41
| | | | | | | | | 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.
* * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573).Werner Lemberg2017-03-182-1/+9
| | | | | | The problematic font that exceeds the old limit is Lato-Regular, version 2.007, containing bytecode generated by a buggy version of ttfautohint.
* [truetype] Another limitation for bytecode loop count maximum.Werner Lemberg2017-03-182-9/+28
| | | | | | | | | 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.
* [ftfuzzer] Minor improvement.Werner Lemberg2017-03-182-2/+10
| | | | | * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if bitmap strikes are active.