src/autofit/afloader.c


Log

Author Commit Date CI Message
Werner Lemberg 9ac9060d 2018-06-03T09:01:17 [GSoC] src/*.*: Convert block comments to `light' style. This monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
Armin Hasitzka d45d4b97 2018-05-30T17:35:39 Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b. * src/autofit/afloader.c (af_loader_load_glyph): Move the initialisation and declaration of variables into the if-block.
Armin Hasitzka a3cfed5e 2018-05-30T12:37:46 Fix pointer underflow. The declaration of `edge2' can be reached with `edge1 == NULL' and `axis->edges == 0' which results in undefined behaviour. * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2' after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed.
Werner Lemberg 95149592 2018-05-02T20:27:48 Remove FT_CONFIG_OPTION_PIC and related code. */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this preprocessor symbol. */*: Replace `XXX_GET' macros (which could be either a function in PIC mode or an array in non-PIC mode) with `xxx' arrays. * include/freetype/internal/ftpic.h, src/autofit/afpic.c, src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: Removed.
Werner Lemberg 0a0c2256 2018-01-02T09:33:57 Update copyright year.
Alexei Podtelezhnikov a7f276a2 2017-05-15T00:25:37 [autofit] Make autohint warping NORMAL option. This moves warping option from LIGHT to NORMAL mode. This makes LIGHT truly void of hinting in x-direction, with left side bearing never changed and right side bearing only altered by advance rounding. Therefore, LIGHT is now ready to return fractional advance. As a NORMAL option, warping substitutes normal hinting. * src/autofit/afcjk.c (af_cjk_hints_apply): Updated. * src/autofit/aflatin.c (af_latin_hints_apply): Updated. * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated. * src/autofit/afloader.c (af_loader_load_glyph): Handle warping phantom points as normal.
Sascha Brawer 0483fb38 2017-05-03T20:16:24 [autofit] Add blue-zone support for Sundanese script. This essentially moves the Sundanese script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Sundanese. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Sundanese standard character and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Sundanese data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Sundanese data; in particular, use AF_WRITING_SYSTEM_LATIN.
Werner Lemberg ba40054c 2017-05-02T12:32:19 [autofit] Remove `slight' auto-hint mode again. A poll on freetype-devel favoured changes directly applied to `light'. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, FT_RENDER_MODE_SLIGHT): Removed. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init): Revert change from 2017-04-22. * src/autofit/afloader.c (af_loader_load_glyph) Remove references to FT_RENDER_MODE_SLIGHT. [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics unconditionally. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from 2017-04-22. * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from 2017-04-22. * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from 2017-04-22. * docs/CHANGES: Updated.
Werner Lemberg 0a5315d1 2017-04-27T13:02:24 Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by default. * src/autofit/afloader.c (af_loader_load_glyph): Use AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
Werner Lemberg 5aa6716a 2017-04-22T13:27:21 Add new `slight' auto-hinting mode. 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.
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.
Werner Lemberg 68a738db 2017-02-03T21:32:21 Comments.
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.
Werner Lemberg d66c3645 2017-01-25T12:53:06 Minor: Use `FT_ERR' macro.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg 4441f7b2 2016-12-26T17:08:17 Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp. Other minor formatting.
Nikolaus Waxweiler b37b799c 2016-11-27T16:30:53 [autofit] Code shuffling. Also improve some comments and remove unused code. No functional change. * src/autofit/afloader.c (af_loader_load_g): Merged with... (af_loader_load_glyph): ...this function. Split off emboldening code into... (af_loader_embolden_glyph_in_slot): ... this function.
Werner Lemberg 48c77da3 2016-11-17T07:37:50 Add minor comment to avoid confusion (#19044).
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg 4679bf83 2015-11-28T19:05:36 Fix C++ compilation. * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H. * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
Nikolaus Waxweiler b6fd5bc0 2015-11-03T10:40:58 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
Nikolaus Waxweiler bf2ba9e3 2015-11-02T13:12:34 [autofit] Implement darkening computation function. This is a crude adaption of the original `cf2_computeDarkening' function. * src/autofit/afloader.c (af_intToFixed, af_fixedToInt, af_floatToFixed): New macros, taken from `cf2fixed.h'. (af_loader_compute_darkening): New function. * src/autofit/afloader.h: Updated.
Werner Lemberg 8cbbcf6b 2015-09-03T06:47:30 [autofit] Pass glyph index to hinting function. No functionality change yet. * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass glyph index. * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply), src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c (af_indic_hints_apply), src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/aflatin2.c (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g): Updated.
Werner Lemberg db8df797 2015-04-01T13:30:55 [autofit] Make debugging stuff work again. The interface to ftgrid was broken in the series of commits starting with [autofit] Allocate AF_Loader on the stack instead of AF_Module. from 2015-01-14. * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]: Use a global AF_GlyphHintsRec object for debugging. (af_autofitter_done, af_autofitter_load_glyph): Updated. * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Behdad Esfahbod c2733656 2015-01-14T19:16:12 [autofit] Allocate hints object on the stack. This avoids one malloc per load. * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to `AF_GlyphHints'. Update prototype. * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' parameter instead of `FT_Memory'. (af_loader_done): Directly reset `load_hints'. (af_loader_load_g): Updated. * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local `hints' object.
Behdad Esfahbod a4117fbd 2015-01-14T19:07:54 [autofit] Reuse slot glyph loader. No need to create a new glyph loader; we can reuse the one from `slot->internal->loader'. It's hard to tell why it was written that way originally, but new code looks sound and correct to me, and avoids lots of allocations. * src/autofit/afloader.c (af_loader_init): Change return type to `void'. Don't call `FT_GlyphLoader_New'. (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. (af_loader_load_g): Update code to use `internal->loader', which doesn't need copying of data. * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. Update prototype. * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
Behdad Esfahbod ae6699f8 2015-01-14T18:55:39 [autofit] Remove (unused) support for composite glyphs. We never have to deal with composite glyphs in the autohinter, as those will be loaded into FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function. In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies FT_LOAD_NO_HINTING: /* resolve load flags dependencies */ if ( load_flags & FT_LOAD_NO_RECURSE ) load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM; if ( load_flags & FT_LOAD_NO_SCALE ) { load_flags |= FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; load_flags &= ~FT_LOAD_RENDER; } and as such the auto-hinter is never called. Thus, the recursion in `af_loader_load_g' never actually happens. So remove the depth counter as well. * src/autofit/afloader.c (af_loader_load_g): Remove `depth' parameter. <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code. (af_loader_load_glyph): Updated.
Behdad Esfahbod 89bc8d4d 2015-01-14T16:01:19 [autofit] Allocate AF_Loader on the stack instead of AF_Module. Stop sharing a global `AF_Loader'. Allocate one on the stack during glyph load. Right now this results in about 25% slowdown, to be fixed in a following commit. With this patch loading glyphs from different faces from different threads doesn't immediately crash in the autohinting loader code. Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1164941 * src/autofit/afloader.c (af_loader_init): Pass `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. (af_loader_reset, af_loader_load_glyph): Also pass `loader' as argument. (af_loader_done): Use `AF_Loader' instead of `AF_Module' as argument. * src/autofit/afmodule.c (af_autofitter_init): Don't call `af_loader_init'. (af_autofitter_done): Don't call `af_loader_done'. (af_autofitter_load_glyph): Use a local `AF_Loader' object. * src/autofit/afloader.h: Include `afmodule.h'. Update prototypes. Move typedef for `AF_Module' to... * src/autofit/afmodule.h: ... this place. No longer include `afloader.h'.
Werner Lemberg 02b8e7e8 2014-11-25T11:31:51 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
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.
Sean McBride 7be2a94a 2014-02-08T13:55:38 Fix clang static analyzer and compiler warnings. * src/autofit/afhints.c (af_glyph_hints_align_weak_points), src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>, src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style), src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load), src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next, tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead code. * src/autofit/afmodule.c (af_property_get_face_globals, af_property_set, af_property_get), src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Make functions static. * src/base/ftobjs.c (ft_remove_renderer): Protect against library == NULL. (ft_property_do): Make function static. * src/base/ftrfork.c: Include `ftbase.h'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image) [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c (T1_Compute_Max_Advance): Avoid compiler warning. * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of variable.
Werner Lemberg 785f3857 2013-12-31T09:45:10 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
Werner Lemberg 974b193b 2013-12-20T17:26:26 [autofit] Introduce `styles'. This is the new top-level structure for handling glyph input data; scripts are now defined separately. * src/autofit/aftypes.h (SCRIPT): Updated. (AF_ScriptClassRec): Move `blue_stringset' and `writing_system' members to ... (AF_Style_ClassRec): ... this new structure. (AF_Style): New enumeration. (AF_StyleMetricsRec): Replace `script' enumeration with `style_class' pointer. (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated. (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros. * src/autofit/afstyles.h: New file, using data from `afscript.h'. * src/autofit/afscript.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/afglobal.c (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with... (af_style_names): ... this array. (af_face_globals_compute_script_coverage): Renamed to... (af_face_globals_compute_style_coverage): ... this. Updated. (af_face_globals_new, af_face_globals_free, af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (AF_SCRIPT_FALLBACK): Update definition. This will get more refinements with later on. (AF_SCRIPT_UNASSIGNED): Replace with... (AF_STYLE_UNASSIGNED): ... this macro. (AF_FaceGlobalsRec): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated. (af_ltn2_uniranges): Removed. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro. (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec' members. * src/autofit/afranges.h: Updated. * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
Werner Lemberg 73f31981 2013-12-19T15:24:17 [autofit] More code orthogonality. * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class' pointer to an `AF_ScriptClass' structure with `script' index of type `AF_Script'. Move some code around. * src/autofit/afcjk.c: Include `afpic.h'. (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/aflatin.c: Include `afpic.h'. (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated.
Werner Lemberg 3f91cb33 2013-12-18T12:59:35 [autofit] s/ScriptMetrics/StyleMetrics/.
Werner Lemberg 4fccc214 2013-12-18T12:53:01 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
Werner Lemberg 9193259c 2013-12-10T13:24:07 [autofit] s/DFLT/NONE/, s/dflt/none/.
Werner Lemberg 89a529f3 2013-08-02T14:50:23 [autofit] Fix `make multi'. * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF): New macros. * src/autofit/afglobal.c (af_writing_system_classes, af_script_classes): Use FT_LOCAL_ARRAY_DEF. * src/autofit/afglobal.h: Declare `af_writing_system_classes' and `af_script_classes'. * src/autofit/afloader.c: Include `afpic.h'.
Werner Lemberg 72f5ff5b 2013-07-31T22:49:29 [autofit] Introduce `writing systems'. This patch adds a new top level to the auto-hinter's script class hierarchy. It defines `writing systems' which can contain multiple scripts. For example, the `latin' writing system (in file `aflatin.c') is able to support scripts like Latin, Cyrillic, Armenian, etc., which can be handled similarly. Scripts are now named using four-letter OpenType tags. * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members to... (AF_WritingSystemClassRec): This new structure. It holds pointers to functions which can be shared among related scripts. (AF_WritingSystem): New enumeration. (AF_Script): Revised values using four-letter tags. (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c (af_writing_system_classes): New global, constant array. (af_script_classes): Updated. (af_face_globals_free): Updated. Remove assertion. (af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK) [!AF_CONFIG_OPTION_CJK]: Handle this case. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated; initialize structures for both writing systems and scripts. * src/autofit/afpic.h: Updated. (AF_WRITING_SYSTEM_CLASSES_GET): New macro. * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing system. (af_cjk_uniranges): Renamed to... (af_hani_uniranges): This. (af_cjk_script_class): Reduced and renamed to... (af_hani_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing system. (af_dummy_script_class): Reduced and renamed to... (af_dflt_script_class): This. * src/autofit/afdummy.h: Updated. * src/autofit/afindic.c (af_indic_writing_system_class): New writing system. (af_indic_uniranges): Renamed to... (af_deva_uniranges): This. (af_indic_script_class): Reduced and renamed to... (af_deva_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/aflatin.c (af_latin_writing_system_class): New writing system. (af_latin_uniranges): Renamed to... (af_latn_uniranges): This. (af_latin_script_class): Reduced and renamed to... (af_latn_script_class): This. * src/autofit/aflatin.h: Updated. * src/autofit/aflatin2.c (af_latin2_writing_system_class): New writing system. (af_latin2_uniranges): Renamed to... (af_ltn2_uniranges): This. Synchronize ranges with `latin'. (af_latin2_script_class): Reduced and renamed to... (af_ltn2_script_class): This. * src/autofit/aflatin2.h: Updated.
Werner Lemberg 5d6a3605 2013-07-30T23:17:04 [autofit] Variable renaming. * src/autofit/aftypes.h (AF_ScriptMetricsRec): s/clazz/script_class/. Update all users.
Werner Lemberg e3c93015 2013-03-14T11:21:17 */*: Use FT_Err_Ok only. This is a purely mechanical conversion.
Werner Lemberg 059bc335 2013-03-14T10:27:35 */*: Use `FT_THROW'. This is essentially a mechanical conversion, adding inclusion of `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for stand-alone compiling modes of the rasterizer modules. To convert the remaining occurrences of FT_Err_XXX and friends it is necessary to rewrite the code. Note, however, that it doesn't harm if some cases are not handled since FT_THROW is a no-op.
Werner Lemberg dda1e93d 2012-10-20T08:34:57 [autofit] Fix `make multi CC=c++'. * src/autofit/aflatin.c, src/autofit/aflatin2.c: Include `afglobal.h'. * src/autofit/afloader.c: Fix order of header files. * src/autofit/afmodule.c: Include `afglobal.h' and `aferrors.h'.
Werner Lemberg 842c4ea2 2012-09-18T15:23:41 [autofit] Add hierarchical property access to some structures. * src/autofit/afglobal.h: Include `afmodule.h'. (AF_FaceGlobalsRec): Add `module' member. (AF_FaceGlobals): Typedef moved to... * src/autofit/aftypes.h: Here. (AF_ScriptMetricsRec): Add `globals' member. * src/autofit/afglobal.c (af_face_globals_new, af_face_globals_compute_script_coverage, af_face_globals_get_metrics): Updated. * src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c (af_property_get): Updated.
Werner Lemberg d4ec0075 2012-09-15T18:26:28 [autofit] Implement `fallback-script' property. * src/autofit/afglobal.c: s/default_script/fallback_script/. * src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/. * src/autofit/afmodule.c: s/default_script/fallback_script/. (af_property_set, af_property_get): Implement `fallback-script'. * src/autofit/afmodule.h: s/default_script/fallback_script/. * include/freetype/ftautoh.h: Document it.
Werner Lemberg d0014f2c 2012-09-15T10:33:43 [autofit] Make default script a global property. * src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field. * src/autofit/afglobal.c (af_face_globals_compute_script_coverage, af_face_globals_new), src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>, af_autofitter_init: Handle default script. * src/autofit/afglobal.h: Updated.
Werner Lemberg 95dae1c4 2012-09-14T12:26:57 [autofit] Pass `AF_Module' instead of `AF_Loader'. We want to access the (not yet existing) module's global data later on. * src/autofit/afloader.c: Include `afmodule.h'. (af_loader_init, af_loader_reset, af_loader_done, af_loader_load_glyph): Change accordingly. * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'. Updated. * src/autofit/afmodule.h: Include `afloader.h'. (AF_ModuleRec): Define here. * src/autofit/afloader.h (AF_Module): Define here. Updated.
Werner Lemberg 5a0af493 2012-07-09T08:19:25 [autofit] Improve debugging messages; do some code cleanup. * src/autofit/aflatin.c (af_latin_align_linked_edge, af_latin_hint_edges): Synchronize with formatting used in the ttfautohint project.
Werner Lemberg 10364096 2012-03-11T15:20:32 [autofit] Return correct linear advance width values. This was quite a subtle bug which accidentally showed up with glyph `afii10023' of arial.ttf (version 2.76). This glyph is a composite; the first component, `E', has an advance width of 1366 font units, while the advance width of the composite itself (which looks like uppercase `E' with dieresis) is 1367 font units. I think this is actually a bug in the font itself, because there is no reason that this glyph has not the same width as uppercase `E' without the dieresis. Anyway, it helped identify this problem. Using the TrueType hinter, the correct value (1367) of `afii10023' was returned, but the autohinter mysteriously returned 1366. Digging in the code showed that the autohinter recursively calls FT_Load_Glyph to load the glyph, adding the FT_LOAD_NO_SCALE load flag. However, the `linearHoriAdvance' field is still returned as a scaled value. To avoid scaling twice, the old code in autofit reset `linearHoriAdvance', using the `horiAdvance' field. This seemed to work since FT_LOAD_NO_SCALE was in use, but it failed actually, because `horiAdvance' is defined as the distance of the first subglyph's phantom points, which in turn are initialized using the advance width of the first subglyph. And as the given example shows, these widths can differ. * src/autofit/afloader.c (af_loader_load_g): Temporarily set FT_LOAD_LINEAR_DESIGN while calling FT_Load_Glyph to get unscaled values for the linear advance widths.
Werner Lemberg 5621fdd4 2012-02-29T13:33:33 [autofit] Don't synchronize digit widths for light rendering mode. We don't hint horizontally in this mode. * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>: Implement it.
Werner Lemberg 63486789 2012-02-17T14:55:27 [autofit] Fix outline flags. * src/autofit/afloader.c (af_loader_load_g): Don't reassign `outline.flags' so that this information is preserved. See discussion starting at http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
Werner Lemberg e343e87d 2012-02-07T09:40:11 [autofit] Harmonize function arguments. * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for `load_flags'.
Werner Lemberg d503b1bc 2011-04-18T19:05:28 Integrate autofitter debugging stuff. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_DEBUG_AUTOFIT): New macro. * include/freetype/internal/fttrace.h: Add trace components for autofitter. * src/autofit/aftypes.h (AF_LOG): Removed. (_af_debug): Removed. * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/. s/AF_LOG/FT_TRACE5/. Define FT_COMPONENT where necessary.
Werner Lemberg de2de6b1 2011-04-18T16:11:18 Remove dead debugging code.
Werner Lemberg 6cfbb23c 2011-02-26T17:32:38 [autofit] Some comments. Whitespace.
Werner Lemberg 8b84c9d1 2009-04-27T19:40:35 autohinter: Don't change digit widths if all widths are the same. This fixes FreeDesktop bug #21197. * src/autofit/afglobal.c (AF_DIGIT): New macro. (af_face_globals_compute_script_coverage): Mark ASCII digits in `glyph_scripts' array. (af_face_globals_get_metrics): Updated. (af_face_globals_is_digit): New function. * src/autofit/afglobal.h: Updated. (AF_ScriptMetricsRec): Add `digits_have_same_width' flag. * src/autofit/aflatin.c: Include FT_ADVANCES_H. (af_latin_metrics_check_digits): New function. (af_latin_metrics_init): Use it. * src/autofit/aflatin.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init): Updated. * src/autofit/aflatin2.c: Similar changes as with aflatin.c. * src/autofit/afloader.c (af_loader_load_g): Test digit width. * docs/CHANGES: Document it.
Werner Lemberg 86e041b5 2009-03-21T08:51:44 Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it.
Werner Lemberg 44c655b0 2008-02-17T08:22:08 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Check for valid callback pointers.
Werner Lemberg 49e18b8d 2007-06-11T21:15:09 formatting
David Turner b792017f 2007-06-11T05:37:35 experimental changes for the Latin auto-hinter. note that the new code is disabled by default.
Werner Lemberg 607dec79 2007-05-15T06:49:37 * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused variable. * src/autofit/afloader.c (af_loader_load_g): Ditto. * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'. (open_face_from_buffer): Initialize `stream'. (FT_Request_Metrics): Remove unused variable. Remove redundant `break' statements. (FT_Get_Track_Kerning): Remove unused variable. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs, afm_parse_kern_data): Remove redundant `break' statements. (afm_parser_parse): Ditto. Don't use uninitialized variables. * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long. Use `|' operator instead of `^' to set it. Update all users. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'. * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant comparison. (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'. (TT_Load_Glyph): Remove unused variable.
Werner Lemberg 644b1ad4 2007-03-28T21:17:11 * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproc, README: s/2.3.2/2.3.3/, s/232/233/. * docs/CHANGES: Mention ftdiff.
David Turner 23553d6d 2007-03-26T13:37:17 * docs/CHANGES, docs/VERSION, include/freetype/freetype.h, builds/unix/configure.raw, README, Jamfile: update documentation and bump version number to 2.3.3
David Turner 2ef3e0f1 2007-02-12T21:28:21 fix inter-letter spacing of auto-hinted glyphs (non-light modes)w
Werner Lemberg 582067dc 2007-02-11T15:03:05 * src/autofit/afloader.c (af_loader_load_g): Don't change width for non-spacing glyphs.
David Turner a7ee608c 2007-01-30T10:33:53 disable light auto-hinting optimization for the next release
Werner Lemberg 6e87ed9f 2007-01-26T22:18:56 Spelling fixes from Alexei.
Werner Lemberg bf24176b 2007-01-26T16:08:49 formatting
David Turner d91eebda 2007-01-26T15:05:41 improvement to glyph spacing, especially when light auto-hinting
David Turner dbf3b43a 2006-12-07T21:18:09 * src/autofit/afloader.c (af_loader_load_g): small adjustment to the spacing of auto-fitter glyphs. This only impacts rare cases (e.g. Arial Bold at rather small character sizes)
David Turner 40604748 2006-11-02T16:37:35 - fixed a bug in af_compute_direction which generated ugly glyphs - added more debug/log messages to help improve the auto-fitter
David Turner 65c7c773 2006-04-13T07:51:58 * src/autofit/afloader.c: removing superfluous code in the auto-fitter's loader
David Turner 2ce92037 2006-03-23T20:58:20 - added FT_Get_SubGlyph_Info API to freetype.h - small fix to lsb/rsb delta computations - cleaning up Jamfile
David Turner dad2a2de 2006-03-20T11:48:13 * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h, src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h, src/cache/ftcmru.h: copying the cache's internal header files which were located in 'include/freetype/cache' to the 'src/cache' directory instead. Note that these files are not used by FreeType clients, all cache public APIs have been already moved to include/freetype/ftcache.h, and the FT_CACHE_INTERNAL_XXXX_H macros all resolve to it. the move is to allow us to modify the internals without intereference from rogue clients. Note that there are no known client that accesses the cache internals at the moment.
Wu, Chia-I (吳佳一) 2e48a1a1 2006-02-27T09:18:07 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics, FT_Load_Glyph): Re-enable glyph metrics grid-fitting. It is now done in the base layer. (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Make sure the width and height are not too small or too large, just like we were doing in 2.1.10. * src/autofit/afloader.c (af_loader_load_g): The vertical metrics are not scaled.
Wu, Chia-I (吳佳一) 4cdb45c0 2006-02-09T14:17:04 Introduce experimental autofit CJK module based on akito's autohint patch. You need to #define AF_MOD_CJK in afcjk.c to enable it. * src/autofit/afglobal.c, src/autofit/afcjk.h, src/autofit/afcjk.c, src/autofit/rules.mk, src/autofit/autofit.c, src/autofit/aftypes.h: Add CJK module based on akito's autohint patch. * src/autofit/afhints.h (AF_SegmentRec): New field `len' for the overlap length of the segments. (AF_SEGMENT_LEN, AF_SEGMENT_DIST): New macros. * src/autofit/aflatin.h (af_latin_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Made `FT_LOCAL'. Use the character given by the caller. (af_latin_metrics_init_widths, af_latin_hints_link_segments): Scale the thresholds. * src/autofit/afloader.c (af_loader_load_g): Respect AF_SCALER_FLAG_NO_ADVANCE.
Werner Lemberg b36bf527 2006-01-22T07:09:54 * src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up to avoid compiler warnings. * src/autofit/afwarp.c (af_warper_compute_line_best): Remove shadowing variable declarations. Fix warning parameters and replace printf with AF_LOG. (af_warper_compute): Remove unused variable.
Werner Lemberg 1be9ebf5 2006-01-22T06:58:16 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add afwarp.c. Formatting, copyright notices, copyright years.
David Turner bb4edc92 2006-01-21T14:31:45 * src/autofit/aflatin.c, src/autofit/afwarp.h, src/autofit/afwarp.c, src/autofit/aftypes.h, src/autofit/afloader.c, src/autofit/autofit.c: adding experimental implementation of "warp hinting" (new hinting algorithm for gray-level and LCD rendering). It is disabled by default, you need to #define AF_USE_WARPER in aftypes.h to enable it.
David Turner 9fbd2ab8 2005-10-28T16:14:14 - various performance enhancements - fixing apinames.c, adding support for Watcom and Borland compilers - adding generation of exported symbols list to the build system, including the Unix one !! sorry Werner, I have no time to document this in ChangeLog at the moment
Werner Lemberg a37745ba 2005-03-23T16:45:24 * docs/CHANGES, docs/INSTALL.ANY: Updated. * include/freetype/ftmoderr.h: Replace `Autohint' with `Autofit'. Add `OTvalid'. * src/autofit/aferrors.h: New file. * src/autofit/afglobal.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/autofit/afloader.c: s/FT_Err_/AF_Err_/. Include aferrors.h. * src/autofit/rules.mk (AUTOF_DRV_H): Include aferrors.h. * src/otvalid/otverror.h: s/FT_Mod_Err_OTV/FT_Mod_Err_OTvalid/.
Werner Lemberg f13516c8 2005-03-03T17:09:08 Various fixes for C and C++ compiling. * src/autofit/*: Add copyright messages. Formatting. * src/autofit/afhints.c (af_glyph_hints_done): Don't use `AF_Dimension' but `int' for loop counter. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use `AF_Dimension' but `int' for loop counter. Use proper enumeration value for `render_mode'. (af_latin_metrics_scale_dim): Don't shadow variables. (af_latin_hints_compute_segments): Use proper cast for `major_dir' and `segment_dir'. (af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to `af_latin_compute_stem_width'. (af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop counter. * src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use proper cast for memory allocation. * src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for initialization of `sfnt'. * src/sfnt/sfdriver.c: Include `ttkern.h'. * src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables. * src/truetype/ttgload.c: Include `ttpload.h'. * src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]: Remove redundant variable.
Werner Lemberg b19b0810 2005-03-02T11:24:23 * src/autofit/afdummy.c, src/autofit/afdummy.h (af_dummy_script_class): Fix type. * src/autofit/aflatin.c, src/autofit/aflatin.h (af_latin_script_class): Fix type. * src/autofit/rules.mk (AUTOF_DRV_SRC): Fix typo. Formatting.
David Turner 5bc063da 2005-03-01T22:49:32 * src/autofit/{rules.mk,module.mk,afangles.h}: adding missing files * src/autofit/afloader.c: fixing small bug that could crash the engine with certain fonts.
David Turner b9c22aff 2005-03-01T15:48:29 * src/autofit/{afhints.h,afhints.c,aflatin.h,aflatin.c,afloader.c}: various bug-fixes and drastic heap usage reduction improvements. * include/freetype/config/ftmodule.h: the auto-fitter is now the only supported auto-hinting module * include/freetype/config/ftstdlib.h: adding FT_INT_MAX definition
David Turner 6a487b59 2005-02-28T22:09:07 * src/base/ftdbgmem.c (FT_DumpMemory): added sorting of memory sources according to decreasing maximum cumulative allocations. * include/freetype/internal/tttypes.h, src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/truetype/ttobjs.c, src/cff/cffobjs.c, src/sfnt/sfobjs.c: implementing new heap-optimized embedded bitmap loader. This one also fixes bug #12107 * src/sfnt/sfobjs.c: fixed bug that prevented loading SFNT fonts without a 'kern' table.
David Turner 8530a228 2004-06-09T20:18:35 * include/freetype/freetype.h (FT_Glyph_Metrics, FT_GlyphSlotRec), src/autofit/afloader.c, src/autohint/ahhint.c: moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY of the library !! * src/sfnt/sfobjs.c: removing compiler warning
Werner Lemberg 89d4e4bd 2004-06-05T06:27:08 * src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and `rsb_delta' in slot->metrics and tune side bearings slightly.
David Turner e664efad 2004-06-04T17:41:59 * src/autofit/*: important fixes to the auto-fitter. The output now seems to be 100% equivalent to the auto-hinter, while being about 2% faster (which proves that script-specific algorithm selection isn't a performance problem). to test it, change "autohint" to "autofit" in <freetype/config/ftmodule.h> and recompile. a few more testing is needed before making this the official auto-hinting module
David Turner 10bf05a3 2004-04-21T14:30:37 * src/cff/cffobjs.c (cff_face_init): fixed a small memory leak * src/autofit/afloader.c, src/autofit/afmodule.c, src/base/ftdebug.c: removed compiler warnings * src/autofit/aftypes.h, src/lzw/zopen.c, src/pcf/pcfdrivr.c, src/pcf/pcfread.c, src/psaux/psobjs.c, src/type42/t42drivr.c: changed data arrays to "const" to avoid populating the ".data" segment
Werner Lemberg 8bb07e63 2004-03-27T08:43:17 Add vertical phantom points. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add `top_bearing', `vadvance', `pp3, and `pp4'. * src/autofit/afloader.c (af_loader_load_g): Handle two more points. * src/autohint/ahhint.c (ah_hinter_load): Handle two more points. * src/truetype/ttgload.c (Get_VMetrics): New function. (TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more points. (load_truetype_glyph): Use Get_VMetrics. Handle two more points. (compute_glyph_metrics): Thanks to vertical phantom points we now can always compute `advance_height' and `top_bearing'. * src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom points. * src/autohint/ahglyph.c (ah_outline_load): Fix allocation of `news'. Converting some files to Unix end-of-line convention.
David Turner 9bfbf79c 2004-02-23T21:08:37 adding support for dummy script, i.e. no-hinting for non latin glyphs
David Turner 1029ed26 2004-02-23T20:40:30 * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c, src/autofit/afloader.c, src/types.h: grave bugs were fixed. The auto-fitter works, doesn't crashes, but still produces unexpected results !!
Werner Lemberg 6b3d00e1 2004-02-03T21:34:29 * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands outside of /Subrs or /CharStrings. This can happen if there is additional code manipulating those two arrays so that FreeType doesn't recognize them properly. (T1_Open_Face): Improve an error message. Remove CR/LF on many files.
David Turner f546bacd 2004-02-01T16:59:06 * src/sfnt/Jamfile: removing "ttcmap" from the list of sources * src/cache/*, include/freetype/cache/*: fixing a bug after heavy testing. The current sources are now "release candidates" for the final version of the cache sub-system * Jamfile: updating "refdoc" target, and adding "autohint" to the list of modules to build. Both the autohinter and autofitter will be built by default. But which one will be used is determined by the content of "ftmodule.h" * src/autofit/*: much updates, but the code is still buggy as hell. Aargh..
David Turner 8ccb4552 2004-01-16T09:51:00 updates