src/autofit


Log

Author Commit Date CI Message
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 f4df4079 2013-12-18T10:39:30 [autofit] s/gscripts/gstyles/.
Werner Lemberg 9a354550 2013-12-18T10:36:06 [autofit] s/glyph_scripts/glyph_styles/. This is the first commit of a series to create a new top-level structure (a `style') for handling scripts, writing_systems, and soon-to-be-added coverages.
Werner Lemberg 7a5fc2f3 2013-12-17T13:29:53 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
Werner Lemberg 9193259c 2013-12-10T13:24:07 [autofit] s/DFLT/NONE/, s/dflt/none/.
Werner Lemberg 45244f80 2013-12-10T13:18:11 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
Werner Lemberg 52166ab0 2013-11-27T10:10:16 [autofit] Fix use of dumping functions in `ftgrid' demo program. * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to handle output to stdout. Use AF_DUMP. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
Werner Lemberg 75efc2d0 2013-10-19T21:46:03 [autofit] s/SMALL_TOP/X_HEIGHT/. * src/autofit/afblue.dat: Updated. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c, src/autofit/aflatin.h, src/autofit/atlatin2.c: Updated.
Werner Lemberg 34efe05c 2013-10-19T21:14:40 * src/autofit/afblue.dat: s/MINOR/DESCENDER/. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
Werner Lemberg a5f22a9e 2013-10-17T11:08:25 [autofit] Add description strings to script entries. Currently, this is unused. * src/autofit/afscript.h: Do it. * src/autofit/afglobal.c, src/autofit/afpic.c, src/autofit/aftypes.h: Updated.
Werner Lemberg 955f6a86 2013-10-16T19:47:57 [autofit] Improve tracing message for extra light flag. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
Werner Lemberg b6695243 2013-10-12T10:33:04 [autofit] Improve tracing of `latin' hinter. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue zone types. (af_latin_metrics_scale_dim): Report scaling changes due to x height alignment. Report scaled stroke width and blue zone values.
Werner Lemberg 4f9760e7 2013-09-25T23:32:25 [autofit] Remove outdated comment.
Werner Lemberg b75a8b88 2013-09-25T09:46:36 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
Werner Lemberg 4de7787f 2013-09-23T22:10:08 Fix Savannah bug #40090. * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit 306f8c5d (from 2013-08-25) affecting this function.
Werner Lemberg 5a4c5a5b 2013-09-22T22:37:26 [autofit] Disunify Cyrillic and Greek handling from Latin. * src/autofit/afscript.h: Add Cyrillic and Greek. * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK, AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic. (AF_BLUE_STRINGSET_LATN): Fix typo. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New arrays. (af_grek_script_class, af_cyrl_script_class): New scripts. * src/autofit/aflatin.h: Updated.
Werner Lemberg 3f542498 2013-09-11T23:08:31 [autofit] Improve Hebrew rendering. This change introduces a new blue zone property `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short top segments. * src/autofit/afblue.dat: Fix Hebrew blue strings. Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro. * src/autofit/afblue.c, src/autofit/afblue.h: Updated. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle `AF_LATIN_IS_LONG_BLUE'. * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
Werner Lemberg 5195ecd6 2013-08-28T17:41:21 [autofit] Fix `make multi' compilation. * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include `afblue.h' but `aftypes.h'. * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
Werner Lemberg e0f39aef 2013-08-28T17:34:01 [autofit] Fix C++ compilation. * src/autofit/afglobal.c (af_face_globals_get_metrics), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class): Use proper casts.
Werner Lemberg 5e53db25 2013-08-27T18:37:39 [autofit] While tracing, report script names instead of ID values. * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]: New array. * src/autofit/afglobal.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_hint_edges): Use `af_script_names'. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_hint_edges): Ditto.
Werner Lemberg 278f64b3 2013-08-26T20:20:03 [autofit] Report used script while hinting a glyph. * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c (af_latin_hint_edges): Implement it.
Werner Lemberg 371f5c3b 2013-08-26T20:11:24 [autofit] Add support for Hebrew script. * src/autofit/afblue.dat: Add blue strings for Hebrew. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_hebr_uniranges): New array. (af_hebr_script_class): New script. * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
Werner Lemberg 098121db 2013-08-26T18:54:05 [autofit] Improve tracing messages. * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script ID in tracing message. (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner loop. Improve tracing messages. (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable `num_actions' to count hinting actions. Improve tracing messages. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention script ID in tracing message. (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing messages.
Werner Lemberg 33655a96 2013-08-26T09:58:50 [autofit] Fix script selection. * src/autofit/afglobal.c (af_face_globals_get_metrics): Use `AF_SCRIPT_DFLT', not value 0. Simplify code. * src/autofit/afscript.h: Sort by script name.
Werner Lemberg 92f5a047 2013-08-26T09:22:27 [autofit] Make `dummy' hinter work as expected. * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling information. (af_dummy_hints_apply): Scale the glyphs.
Werner Lemberg c1eb4459 2013-08-25T19:47:26 [autofit] Make `cjk' module use blue stringsets. * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed. (af_cjk_hani_blue_chars): Removed. (AF_CJK_BLUE_TYPE_*): Removed. (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with AF_BLUE_STRING_MAX_LEN. Change loops to use offsets (in file `afblue.h') into the new arrays `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). Instead of three dimensions (as used in the old blue string array) we now use properties to do the same, saving one loop nesting level. * src/autofit/afcjk.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE, AF_CJK_IS_RIGHT_BLUE): New macros, to be used in `af_cjk_metrics_init_blues'. (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value. (AF_CJK_BLUE_IS_TOP): Renamed to... (AF_CJK_BLUE_TOP): This. (AF_CJK_MAX_BLUES): Remove. (AF_CJKAxisRec): Updated.
Werner Lemberg 5c4a23a4 2013-08-25T19:29:07 [autofit] Typo. * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use cast.
Werner Lemberg 306f8c5d 2013-08-25T13:07:08 [autofit] Synchronize `cjk' with `latin' module (and vice versa). * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing messages. (af_cjk_metrics_init_blues): Don't pass blue string array as argument but use the global array directly. Use `outline' directly. Update and add tracing messages. (af_cjk_metrics_init): Simplify code. (af_cjk_metrics_scale_dim): Improve tracing message. (af_cjk_metrics_scale): Synchronize. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues): Improve and add tracing messages.
Werner Lemberg 0975d685 2013-08-25T08:37:47 [autofit] Make `latin' module use blue stringsets. * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed. (af_latin_blue_chars): Removed. (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS with AF_BLUE_STRING_MAX_LEN. Change loops to use offsets (in file `afblue.h') into the new arrays `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro. * src/autofit/aflatin.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_LATIN_IS_TOP_BLUE): Updated definition. (AF_LATIN_IS_SMALL_TOP_BLUE): New macro. (AF_LATIN_MAX_BLUES): Remove. (AF_LatinAxisRec): Updated.
Werner Lemberg db3e5b93 2013-08-25T08:23:22 [autofit] Add blue stringsets. * src/autofit/aftypes.h: Include `afblue.h'. (AF_ScriptClassRec): Add `blue_stringset' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/autofit.c: Include `afblue.c'. * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class), src/autofit/aflatin.c (af_latn_script_class), src/autofit/aflatin2.c (af_ltn2_script_class): Updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
Werner Lemberg 8b8be783 2013-08-25T08:01:41 [autofit] Introduce data file for blue strings. The idea is to have a central file which gets processed by a Perl script to create proper `.c' and `.h' files using templates. There are two other reasons to do that: . The data file should be easily readable. We use UTF-8 encoding which then gets converted to single bytes. . Since the number of supported scripts will increase soon, the current usage of blue string arrays is a waste of space. Using the Perl script it is possible to imitate jagged arrays, defining enumeration constants as offsets into the arrays. This commit only adds files without changing any functionality. * src/autofit/afblue.dat: New data file. * src/tools/afblue.pl: New Perl script for processing `afblue.dat'. * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files for... * src/autofit/afblue.c, src/autofit/afblue.c: New source files. To avoid a dependency on Perl, we add them too.
Werner Lemberg df41fe57 2013-08-05T16:34:32 Whitespace.
Werner Lemberg cc25e3ae 2013-08-05T08:46:15 [autofit] Improve handling of `near' points. Points which are very near to each other are now marked as such. The `weak' flag is then computed by using the `in' vector of the first and the `out' vector of the last point of a group of near points. For example, this fixes the rendering of glyph `Oslash' in `Roboto-Thin.ttf'. * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'. * src/autofit/afhints.c (af_glyph_hints_reload): Introduce the heuristic value `near_limit' to decide whether the current point is near to the previous one, then set `AF_FLAG_NEAR' accordingly. Store good `in' vector (of last non-near point) in `last_good_in_{x,y}' and use it as an argument to `ft_corner_is_flat' if necessary.
Werner Lemberg b8bf8b54 2013-08-04T09:25:24 [autofit] Update comments.
Werner Lemberg 6d3c10e0 2013-08-02T20:47:15 Typo.
Werner Lemberg 456cc440 2013-08-02T20:25:21 [autofit] Move declaration of scripts into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afscript.h: New file. * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afscript.h' to get the script specific header files. (af_script_classes): Include `afscript.h' to fill this array. * src/autofit/afpic.c: Include `afscript.h' to get the script specific header files. (autofit_module_class_pic_init): Include `afscript.h' for initialization. * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT, AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead. * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
Werner Lemberg 773601da 2013-08-02T19:51:17 [autofit] Move declaration of writing systems into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afwrtsys.h: New file. * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing system specific header files. Include `afpic.h'. (af_writing_system_classes): Include `afwrtsys.h' to fill this array. * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing system specific header files. (autofit_module_class_pic_init): Include `afwrtsys.h' for initialization. * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT, AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use `AF_WRITING_SYSTEM_MAX' instead.
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 05c1421f 2013-07-19T23:11:23 [autofit] Fix segment classification for blue zones. The old code (essentially unchanged since the very beginning) incorrectly handled this configuration x -o- x / \ / \ / \ o o as flat and this o o / / x| x| | | o---------------o as round. (`o' and `x' are on and off points, respectively). This is a major change which should improve the rendering results enormously for many TrueType fonts, especially in the range approx. 20-40ppem, fixing the appearance of many overshoots. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the first and last points of the segment, not the points right before and after.
Werner Lemberg aa0ac323 2013-07-02T10:36:26 [sfnt] Fix documentation of `tt_face_get_metrics'. Problem reported in Savannah bug #39383.
Werner Lemberg dc624ca4 2013-06-04T10:30:48 Apply fixes for cppcheck nitpicks. http://cppcheck.sourceforge.net/ Note that the current version heavily chokes on FreeType, delivering even wrong results. I will report those issues to the cppcheck team so that a newer version gives improved results hopefully. */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Remove functionless code. * src/tools/ftrandom.c (main): Fix memory leak.
Werner Lemberg ccbdc3c4 2013-05-08T09:17:56 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo.
Werner Lemberg eed83061 2013-03-23T14:25:43 Whitespace.
Werner Lemberg fbb0773c 2013-03-23T14:06:54 [autofit] Minor. * src/autofit/afmodule.c (af_property_set): Typo. (af_autofitter_init, af_autofitter_done): Use cast.
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 3a553400 2012-11-15T16:37:05 [autofit] Trace stem widths. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some FT_TRACE calls.
Werner Lemberg 1a37e417 2012-11-12T11:01:07 [autofit] Minor improvement. * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix loop.
Werner Lemberg f966da82 2012-11-10T12:42:18 [autofit] Improve tracing. * src/autofit/aflatin.c (af_latin_hint_edges) [FT_DEBUG_LEVEL_TRACE]: Count number of actions and emit something if there weren't any.
Werner Lemberg 553bb3c3 2012-10-24T14:22:14 [autofit] Add standard character to `AF_ScriptClassRec' structure. * src/autofit/aftypes.h (AF_ScriptClassRec): Add `standard_char' member. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use it. (af_latin_metrics_init, af_latin_script_class): Updated. * src/autofit/aflatin.c (af_latin2_metrics_init_widths): Use it. (af_latin2_metrics_init, af_latin2_script_class): Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it. (af_cjk_metrics_init, af_cjk_script_class): Updated. * src/autofit/afindic.c(af_indic_metrics_init, af_indic_script_class): Updated. * src/autofit/afcjk.h, src/autofit/aflatin.h: Updated. * src/autofit/afdummy.c: Updated.
Werner Lemberg 118c6025 2012-10-24T12:26:20 [autofit] Only use Unicode CMap. * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be in sync with `af_face_globals_compute_script_coverage)'.
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 bf745003 2012-09-29T22:40:40 [autofit] Minor optimization. * src/autofit/afglobals.c (af_face_globals_compute_script_coverage): Add loop condition.
Werner Lemberg 156ba42e 2012-09-29T10:08:01 [autofit] Fix thinko. * src/autofit/aftypes.h (AF_SCRIPT): s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE' as a bit mask. * src/autofit/afdummy.c: Updated.
Werner Lemberg 7da6bbc3 2012-09-25T06:37:15 Typos.
Werner Lemberg 3683fb55 2012-09-18T23:31:05 [autofit] Implement `increase-x-height' property. * include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New structure. * include/autofit/afmodule.c (af_property_get_face_globals): New function, re-using code from `af_property_get'. (af_property_set, af_property_get): Handle `increase-x-height'. Updated.
Werner Lemberg d180ac70 2012-09-18T23:26:37 [autofit] Implement Infinality's `increase glyph heights'. This is an improved version of a similar fix contained in the so-called `Infinality patch', taken from http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2 which addresses various enhancements of the auto-hinter. Without properties to control a module's metadata it wasn't possible to adapt the patches because everything was originally controlled by environment variables which I consider not suitable in general. A patch to control `increase_x_height' follows. * src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN, AF_PROP_INCREASE_X_HEIGHT_MAX): New macros. (AF_FaceGlobalsRec): Add `increase_x_height' member. * src/autofit/afglobal.c (af_face_globals_new): Initialize it. * src/autofit/aflatin.c (af_latin_metrics_scale_dim), * src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement handling of `increase_x_height'.
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 302fd625 2012-09-16T07:51:20 [autofit] Cosmetics.
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 44e1f0d3 2012-09-15T11:11:18 [autofit] Correct previous Unicode 6.1.0 change. The auto-hinter's latin module only handles latin ligatures in the `Alphabetical Presentation Forms' block. * src/autofit/aflatin.c (af_latin_uniranges): Fix it.
Werner Lemberg ce92c5fa 2012-09-15T10:56:15 * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/.
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 073a4cef 2012-09-15T09:10:06 Use `FT_Module' instead of `FT_Library' argument in property funcs. This internal change simplifies access to global module data. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly. * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c (af_property_set, af_property_get): Updated.
Werner Lemberg 8ae2a65e 2012-09-14T14:10:01 [autofit] Update to Unicode 6.1.0. * src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c (af_latin_uniranges): Add and fix ranges.
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 6d29c5cb 2012-09-14T11:57:36 [autofit] Fix `make multi'. * include/freetype/internal/fttrace.h: Add `afmodule'. * src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define.
Werner Lemberg 688da8ee 2012-09-14T07:55:15 * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/.
Werner Lemberg 7bbbcbfb 2012-09-12T17:45:39 [autofit] Minor reorganization. * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT, AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to... * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE, AF_DIGIT): This and update code.
Werner Lemberg 44481daf 2012-09-11T19:45:36 [autofitter] Add some comments.
Werner Lemberg 2be60cfe 2012-09-01T22:31:43 [autofit] Implement `glyph-to-script-map' property. * include/freetype/ftautoh.h: New public header file. * include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro. * src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to... * src/autofit/afglobal.h: This header file. * src/autofit/afmodule.c: Include FT_AUTOHINTER_H. (af_property_get): Handle `glyph-to-script-map'.
Werner Lemberg 7f316f22 2012-08-31T00:20:29 [autofit] Implement properties service framework. No properties are added yet. * src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H. (af_property_set, af_property_get): New dummy functions. (af_service_properties, af_services, af_get_interface): Provide service setup. (autofit_moduleclass): Add service interface. * src/autofit/afpic.c: Add necessary forward declarations. (autofit_module_class_pic_init): Add code for service addition. (autofit_module_pic_free): Add code for service removal. * src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET): New macros which provide necessary syntactical sugar for PIC support.
Werner Lemberg 328aa3b2 2012-08-27T11:23:41 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER), include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE), include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2, FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4, FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6), src/autofit/afpic.c (autofit_module_class_pic_init), src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c (ft_create_default_module_classes), src/cff/cffparse.c (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c (cff_driver_class_pic_init), src/pshinter/pshpic.c (pshinter_module_class_pic_init), src/psnames/pspic.c (psnames_module_class_pic_init), src/raster/rastpic.c (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c (sfnt_module_class_pic_init), src/sfnt/ttcmap.c (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c (tt_driver_class_pic_init): Initialize allocation variable.
Werner Lemberg d9bf44a4 2012-08-27T08:41:43 [autofit, cff, pshinter, psnames] More renamings for orthogonality. * src/autofit/afmodule.c, src/autofit/afpic.h: s/AF_AUTOFITTER_/AF_/. * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c, src/cff/cffpic.h: s/FT_CFF_/CFF_/. * src/pshinter/pshmod.c, src/pshinter/pshpic.h: s/FT_PSHINTER_/PSHINTER_/. * src/psnames/psmodule.c, src/psnames/pspic.h: s/FT_PSCMAPS/PSCMAPS_/.
Werner Lemberg d0841ea7 2012-08-27T06:57:05 [autofit] Some macro and variable renamings for orthogonality. * include/freetype/internal/autohint.h, src/base/ftobjs.c, src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h: s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
Werner Lemberg f76f491f 2012-08-23T13:34:26 Fix typos, add comments.
Werner Lemberg 5b995a8d 2012-08-05T11:11:44 [autofit] Improve recognition of flat segments. Problem reported by Brad Dunzer <BDunzer@extensis.com>. * src/autofit/aflatin.c (af_latin_metrics_init_blues): We have a flat segment if the horizontal distance of best on-points is larger than a given threshold.
Werner Lemberg e194d7cd 2012-08-05T10:58:02 [autofit] Variable renamings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace `glyph' with `outline'. s/best_first/best_contour_first/. s/best_last/best_contour_last/.
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 b6978dd0 2012-07-06T19:38:44 [autofit] Do some code cleanup. * src/autofit/afglobal.c (af_face_globals_new): Simplify. * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf' everywhere. (FT_COMPONENT): New macro. (af_glyph_hints_done): Simplify. * include/freetype/internal/fttrace.h: Updated.
Werner Lemberg fd5ae959 2012-07-05T10:30:41 [autofit] Improve output of debugging information. * src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more data; report no data. (af_glyph_hints_dump_edges): Report no data.
Werner Lemberg 52103061 2012-07-04T17:20:33 Fix Savannah bug #36091. * src/autofit/aflatin.c (af_latin_metrics_init_blues), src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the constraint for testing round vs. flat segment: Accept either a small distance or a small angle.
Werner Lemberg e8da532d 2012-07-04T13:51:32 [autofit] Improve comment.
Werner Lemberg 09e9b596 2012-07-04T13:00:06 [autofit] Beautify blue zone tracing. * src/autofit/aflatin.c (af_latin_metrics_init_blues), src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it.
Werner Lemberg 2a9c4552 2012-07-03T11:54:12 [autofit] Quantize stem widths. * src/autofit/afangles.c (af_sort_widths): Rename to... (af_sort_and_quantize_widths): This. Add code to avoid stem widths which are almost identical. * src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c: Updated.
Werner Lemberg d4cbbf35 2012-07-03T11:01:53 [autofit] Minor speed-up. * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap elements if they are equal.
Werner Lemberg 83c0ebab 2012-06-27T08:16:06 Fix conditional compilation. * include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Don't enclose with `TT_USE_BYTECODE_INTERPRETER'; we now need the function elsewhere also. * src/autofit/afcjk.h: Use AF_CONFIG_OPTION_CJK. * src/truetype/ttgload.c (tt_loader_init): Fix compiler warning. * src/truetype/ttinterp.c (Ins_MSIRP): Fix compiler warning. * src/truetype/ttinterp.h: Use TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
Werner Lemberg 8be32d2f 2012-03-28T12:21:50 [autofit] Properly copy scaler flags to script metrics object. Without this patch, only the dummy and cjk autohinter modules get them (since they copy the whole scaler object). * src/autofit/aflatin.c (af_latin_metrics_scale), src/autofit/aflatin2.c (af_latin2_metrics_scale): Implement it.
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.
Vinnie Falco 26dfeb6d 2012-03-08T06:04:03 Prepare source code for amalgamation. * src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c, src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h, src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c, src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h, src\psaux\psauxerr.h, src\pshinter\pshnterr.h, src\psnames\psnamerr.h, src\raster\rasterrs.h, src\sfnt\sferrors.h, src\smooth\ftsmerrs.h, src\truetype\tterrors.h, src\type1\t1errors.h, src\type42\t42error.h, src\winfonts\fnterrs.h: Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
Alexei Podtelezhnikov b25265c5 2012-02-29T13:45:24 Avoid modulo operators against a power-of-two denominator. * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>, src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE), src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with `&' operator.
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 22fff253 2012-02-26T08:47:20 Whitespace.
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'.
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
suzuki toshiya c24f77ac 2012-01-16T21:13:05 Formatting PIC related sources. * src/autofit/afpic.c: Harmonize to FT2 coding conventions. * src/base/basepic.c: Ditto. * src/base/ftpic.c: Ditto. * src/cff/cffpic.c: Ditto. * src/pshinter/pshpic.c: Ditto. * src/psnames/pspic.c: Ditto. * src/raster/rastpic.c: Ditto. * src/sfnt/sfntpic.c: Ditto. * src/smooth/ftspic.c: Ditto. * src/truetype/ttpic.c: Ditto.