src/autofit


Log

Author Commit Date CI Message
Werner Lemberg 19188a9a 2015-09-26T16:57:17 [autofit] Minor tracing improvement. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit blue zones header line if there are no blue zones.
Alexei Podtelezhnikov a9f6f04e 2015-09-04T22:28:13 [autofit] Missing piece.
Werner Lemberg d3cba0ed 2015-09-04T10:28:53 [autofit] Redesign code ranges (2/2). This commit adds two fallback scripts (`latb', `latp') and implements support for the no-base character ranges introduced in the previous commit. * src/autofit/aftypes.h (AF_ScriptClassRec): Add `script_uni_nobase_ranges' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and `latp' fallback scripts. * src/autofit/afblue.dat: Add blue zones for Latin subscript and superscript fallback scripts. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base characters. (AF_STYLE_MASK): Updated. * src/autofit/afglobal.c (SCRIPT): Updated. (af_face_globals_compute_style_coverage): Handle new style flag. * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style flag. * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
Werner Lemberg 696b7126 2015-09-04T10:10:59 [autofit] Redesign code ranges (1/2). This patch introduces auxiliary code ranges that identify no-base characters; they refer to glyphs of a script that should be hinted without alignments to blue zones (mostly diacritics). It also splits off ranges for fallback scripts that handle subscript and superscript characters not covered by OpenType features. For example, this greatly helps improve the hinting of various phonetic alphabets, which contain a large amount characters that look like superscript glyphs. Finally, code ranges are updated to Unicode 8.0, and enclosed characters are removed in general since they normally look better if they stay unhinted. * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode 8.0. Split off superscript-like and subscript-like glyphs into... (af_latb_uniranges, af_latp_uniranges): ... these two new arrays. (af_xxxx_nobase_uniranges): New arrays that hold no-base characters of the corresponding character ranges.
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 40103a3a 2015-08-31T08:51:52 [autofit] Code clean-up. * src/autofit/afglobal.h (AF_STYLE_MASK): New macro. (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Updated.
Werner Lemberg 87c81f04 2015-08-30T10:35:21 [autofit] Make glyph style array use 16bit values. * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use `FT_UShort' for `map' field. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage, af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h (af_get_coverage): Use FT_UShort for `glyph_styles' array. * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to 16 bits. (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
Werner Lemberg ff406e2e 2015-08-06T07:34:50 [autofit] Improve Arabic hinting. Problem reported by Titus Nemeth <tn@tntypography.eu> (by using ttfautohint). * src/autofit/afblue.dat: Add neutral blue zone for the tatweel character. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
Werner Lemberg 15e2a4f7 2015-08-05T21:53:50 [autofit] Improve recognition of flat vs. rounded segments. Lower the flatness threshold from upem/8 to upem/14, making the auto-hinter accept shorter elements. Synchronize flat/round stem selection algorithm with blue zone code. * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro. (af_latin_metrics_init_blues): Use it. (af_latin_hints_compute_segments): Collect information on maximum and minimum coordinates of `on' points; use this to add a constraint for the flat/round decision similar to `af_latin_metrics_init_blues'.
Werner Lemberg f9be567f 2015-07-09T15:10:31 Better support of user-supplied C++ namespaces. See http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose header files that contain FT_{BEGIN,END}_HEADER macros by themselves. * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include FT_CONFIG_STANDARD_LIBRARY_H earlier. * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
Werner Lemberg 5931268e 2015-06-23T09:24:48 s/TYPEOF/FT_TYPEOF/ (#45376). * builds/unix/ftconfig.in, builds/vms/ftconfig.in, include/freetype2/config/ftconfig.h, include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
Werner Lemberg 31d97df9 2015-06-21T19:12:12 Make Jam support work again. This is just very basic stuff and just a little bit tested on GNU/Linux only. I won't delve into this since I'm not a Jam user. * Jamfile: Call `HDRMACRO' for `ftserv.h' also. (DEFINES): Replace with... (CCFLAGS): ... this. * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is already handled in the top-level Jamfile. * src/autofit/Jamfile (DEFINES): Replace with... (CCFLAGS): ... this. (_sources): Add missing files. * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no longer contains macro header definitions. * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, src/truetype/Jamfile (_sources): Add missing files.
Werner Lemberg e1862306 2015-06-07T16:11:18 * Version 2.6 released. ======================= Tag sources with `VER-2-6'. * docs/VERSION.DLL: Update documentation and bump version number to 2.6. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 18:0:12. * CMakeLists.txt (VERSION_MINOR): Set to 0. (VERSION_PATCH): Set to 6. * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add declarations for dumping functions. * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler. * builds/toplevel.mk: Use `freetype.mk's code to compute the version string. Don't include a zero patch level in version string. * builds/freetype.mk: Remove code for computing the version string.
Werner Lemberg a678560d 2015-05-28T17:31:15 Minor.
Alexei Podtelezhnikov 40914952 2015-04-29T21:57:30 [autofit] Speed up IUP. * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to the same position from true interpolation, use `scale' to reduce divisions.
Werner Lemberg 14df6b1a 2015-04-22T11:14:35 [autofit] By default, enable warping code but switch off warping. Suggested by Behdad. * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER. * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping' with `false'.
Werner Lemberg 12661a5a 2015-04-21T07:13:59 [autofit] Introduce `warping' property. This code replaces the debugging hook from the previous commit with a better, more generic solution. * include/ftautoh.h: Document it. * src/autofit/afmodule.h (AF_ModuleRec) [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field. * src/autofit/afmodule.c (_af_debug_disable_warper): Remove. (af_property_set, af_property_get, af_autofitter_init) [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option. * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no longer existing `_af_debug_disable_warper'. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init) [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the scaler flags if warping is off. * src/autofit/aftypes.h: Updated.
Werner Lemberg 58f48f0d 2015-04-16T20:11:49 [autofit] Add debugging hook to disable warper. * src/autofit/afmodule.c (_af_debug_disable_warper) [FT_DEBUG_AUTOFIT]: New global variable. * src/autofit/aftypes.h: Updated. (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet). * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro. * src/autofi/aflatin.c (af_latin_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use of warper. * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. * src/autofit/aflatin2.c (af_latin2_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
Alexei Podtelezhnikov eae1b3e3 2015-04-13T22:40:17 [autofit,pshinter] NULL.
Alexei Podtelezhnikov 67b912d2 2015-04-03T22:38:11 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
Alexei Podtelezhnikov 770b5d06 2015-04-02T23:15:36 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
Alexei Podtelezhnikov 886f4d04 2015-04-01T22:57:43 [autofit] Finish the thought. * src/autofit/afhints.c (af_direction_compute): make sure the long arm is never negative so that its `FT_ABS' is not necessary.
Werner Lemberg a2fa657a 2015-04-01T15:55:41 [autofit] Call dumper functions for tracing. * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code. * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor improvement. * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
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 16217e5f 2015-04-01T13:13:56 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
Alexei Podtelezhnikov dac5644c 2015-03-21T23:30:16 [base] Optimize `FT_Angle_Diff'. Under normal circumstances we are usually close to the desired range of angle values, so that the remainder is not really necessary. * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder. * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
Werner Lemberg d3284462 2015-03-11T16:45:58 [autofit] Add support for Arabic script. Thanks to Titus Nemeth <tn@tntypography.eu> for guidance! * src/autofit/afblue.dat: Add blue zone data for Arabic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Arabic standard characters. * src/autofit/afranges.c: Add Arabic data. * src/autofit/afstyles.h: Add Arabic data. * docs/CHANGES: Document it.
Werner Lemberg a374c9cf 2015-03-03T11:23:45 [autofit] Fix Savannah bug #44241. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs with less than 3 points.
Werner Lemberg a07029ef 2015-03-02T06:54:08 Simplify `TYPEOF' macro. No need for two arguments. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h (TYPEOF): Updated. * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
Werner Lemberg 851e8151 2015-03-01T19:27:09 Various compiler warning fixes for `make multi'. * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
Werner Lemberg bd133c35 2015-03-01T07:45:36 Minor typo.
Werner Lemberg b57bb11a 2015-02-19T10:44:18 [autofit] Fix signedness issues. * src/autofit/afangles.c, src/autofit/afcjk.c, src/autofit/afglobal.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c, src/autofit/hbshim.c: Apply.
Werner Lemberg 81e5ff53 2015-02-19T09:46:48 [autofit] Use macros for (unsigned) flags, not enumerations. This harmonizes with other code in FreeType (and reduces the number of necessary casts to avoid compiler warnings). * src/autofit/afblue.hin: Make flag macros unsigned. * src/autofit/afblue.h: Regenerated. * src/autofit/afcjk.h: Replace flag enumeration with macros. * src/autofit/afcjk.c: Updated. * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with macros. * src/autofit/afhints.c: Updated. * src/autofit/aflatin.h: Replace flag enumerations with macros. * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated. * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
Werner Lemberg 6f325c26 2015-02-16T11:31:32 New `TYPEOF' macro. This helps suppress signedness warnings, avoiding issues with implicit conversion changes. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h (TYPEOF): Define. * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
Werner Lemberg b6cb4997 2015-02-06T08:46:06 [autofit] Fix potential memory leak. While this doesn't show up with FreeType, exactly the same code leaks with ttfautohint's modified auto-hinter code (which gets used in a slightly different way). It certainly doesn't harm since it is similar to already existing checks in the code for embedded arrays. * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours' and `max_points' for all cases.
Werner Lemberg 19146a53 2015-01-31T11:01:33 [autofit] Add support for Thai script. Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue zone characters! * src/autofit/afblue.dat: Add blue zone data for Thai. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Thai standard characters. * src/autofit/afranges.c: Add Thai data. * src/autofit/afstyles.h: Add Thai data.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Behdad Esfahbod 48c86628 2015-01-14T19:38:36 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
Behdad Esfahbod 56ddafa0 2015-01-14T19:36:02 [autofit] Add embedded array of segments and edges. Avoids multiple mallocs per typical glyphs. With this and recent changes to avoid mallocs, the thread-safe stack-based loader is now as fast as the previous model that had one cached singleton. * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): New macros. (AF_AxisHintsRec): Add two arrays for segments and edges. * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate data if number of segments exceeds given threshold value. (af_axis_hints_new_edge): Only allocate data if number of edges exceeds given threshold value. (af_glyph_hints_done): Updated.
Behdad Esfahbod 6f16b100 2015-01-14T19:26:49 [autofit] Add embedded arrays for points and contours. This avoids at least two malloc calls for typical glyphs. * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): New macros. (AF_GlyphHintsRec): Add two arrays for contours and points. * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): Updated. (af_glyph_hints_reload): Only allocate data if number of contours or points exceeds given threshold values.
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 36d03c9f 2015-01-12T11:26:30 Fix Savannah bug #43976. Assure that FreeType's internal include directories are found before `CPPFLAGS' (which might be set by the user in the environment), and `CPPFLAGS' before `CFLAGS'. * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. (FT_COMPILE): Make this a special variable for compiling only the files handled in `freetype.mk'. (.c.$O): Removed, unused. * src/*/rules.mk (*_COMPILE): Fix order of include directories.
Werner Lemberg 5018477f 2014-12-07T08:17:12 Minor.
Werner Lemberg a632b5f4 2014-12-03T19:30:44 [autofit] Better fix for conversion specifiers in debug messages. Using `%ld' for pointer differences causes warnings on 32bit platforms. The correct type would be (the relatively new) `%td', however, this is missing on some important platforms. This patch improves the change from 2014-11-28. * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our pointer differences are always sufficiently small. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
suzuki toshiya 9ee6a0a0 2014-11-28T11:14:18 Fix compiler warning to conversion specifiers in debug messages. * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length modifier to dump long integers. (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
Werner Lemberg 02b8e7e8 2014-11-25T11:31:51 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
Werner Lemberg 04edbbda 2014-11-25T10:21:13 */*: s/Invalid_Argument/Invalid_Face_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.
Alexei Podtelezhnikov 237c0abf 2014-11-19T22:10:29 Trailing space.
Werner Lemberg d8632a84 2014-10-25T06:28:18 Improve comments, remove dead code.
Werner Lemberg c9c33f20 2014-10-18T11:01:14 [autofit] Add blue-zone support for Telugu. This essentially moves the Telugu script from the `Indic' hinter to the `Latin' hinter. Note that this is a first shot and quite certainly needs refinements. * src/autofit/afblue.dat: Add blue zone data for Telugu. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Telugu standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Telugu data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Telugu data; in particular, use AF_WRITING_SYSTEM_LATIN.
Werner Lemberg 8f17809b 2014-10-14T08:28:09 [autofit] Adjust Devenagari character range. * src/autofit/afranges.c (af_deva_uniranges): Omit characters that are common to all other Indic scripts.
Werner Lemberg 5b68e4fb 2014-09-24T19:06:13 [autofit] Minor clean-ups. * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values. * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_align_strong_points): Updated. * src/autofit/aflatin.c (af_latin_hints_link_segments, af_latin_hints_compute_segments), src/autofit/afcjk.c (af_cjk_hints_link_segments), src/autofit/aflatin2.c (af_latin2_hints_link_segments, af_latin2_hints_compute_segments): There are no longer fake segments since more than 10 years...
Werner Lemberg 7a615283 2014-09-22T08:38:00 [autofit] Minor.
Werner Lemberg 387a9fe7 2014-09-22T06:42:24 [autofit] Minor code streamlining. * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant initialization.
Werner Lemberg 378266dc 2014-09-22T06:33:38 Formatting.
Werner Lemberg 231171fc 2014-06-17T09:14:32 Partially revert commit from 2014-06-13. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move declaration of `p_first' and `p_last' out of the loop.
Werner Lemberg e5c0fff5 2014-06-13T14:01:20 Fix more compiler warnings. Reported by Wojciech Mamrak <wmamrak@gmail.com>. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Make integer constant unsigned. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Fix types. (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper casts.
Werner Lemberg 6497b9c5 2014-06-13T09:28:00 Fix compiler warnings. Reported by Wojciech Mamrak <wmamrak@gmail.com>. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage), src/autofit/afmodule.c (af_property_set): Fix `signed' vs. `unsigned' issues. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler happy. * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements for `fir'. Fix `signed' vs. `unsigned' issues. * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused. (WRITE_USHORT, WRITE_ULONG): Add proper casts. * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts. * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1' and `B2'.
Werner Lemberg d7f45943 2014-05-13T15:33:11 [autofit] Fix comment.
Werner Lemberg faa21472 2014-05-11T12:44:00 [autofit] Fix variable initializations. * src/autofit/afhints.c (af_glyph_hints_reload): Assign default values to `in_dir' and `out_dir' for all points.
Werner Lemberg 07e7b8af 2014-05-11T08:00:25 [autofit] Fix crash with font `CabinSketch-Bold.ttf'. Problem reported by Ralf S. Engelschall <rse@engelschall.com>. * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for finding first non-near point. Properly initialize non-near point deltas.
Werner Lemberg 5f18a0c3 2014-05-01T17:26:52 Formatting.
Werner Lemberg c576bb0d 2014-05-01T17:24:19 [autofit] Add blue-zone support for Devanagari. This essentially moves the Devanagari script from the `Indic' hinter to the `Latin' hinter. Thanks to Girish Dalvi <girish.dalvi@gmail.com> for guidance with blue zone characters! * src/autofit/afblue.dat: Add blue zone data for Devanagari. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Devanagari standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Devanagari data out of AF_CONFIG_OPTION_INDIC block. Move U+20B9, (new) Rupee sign, from Latin to Devanagari. * src/autofit/afstyles.h: Update Devanagari data; in particular, use AF_WRITING_SYSTEM_LATIN.
Werner Lemberg 63bef9a5 2014-05-01T07:16:05 [autofit] Fix handling of neutral blue zones in stems. * src/autofit/afhints.h (AF_Edge_Flags): New value `AF_EDGE_NEUTRAL'. * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace neutral blue zones with AF_EDGE_NEUTRAL. (af_latin_hint_edges): Skip neutral blue zones if necessary.
Werner Lemberg ccfc4b4c 2014-04-28T21:13:14 [autofit] Introduce neutral blue zones to the latin module. Such blue zones match either the top or the bottom of a contour. We need them for scripts where accent-like elements directly touch the base character (for example, some vowel signs in Devanagari, cf. U+0913 or U+0914). * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New property. * src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro. (AF_LATIN_BLUE_NEUTRAL): New enumeration value. * src/autofit/aflatin.c (af_latin_metrics_init_blues, af_latin_hints_compute_blue_edges): Handle neutral blue zones.
Werner Lemberg abb3fcac 2014-04-25T22:13:32 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. Using input glyph coverage data is simply wrong. Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and Mantas Mikulėnas <grawity@gmail.com>.
Werner Lemberg 98e510ee 2014-04-20T22:11:27 [autofit] Fix Savannah bug #42148. The adaptation of the cjk auto-hinter module to blue stringsets in 2013-08-25 had three severe bugs. Mea culpa. 1. Contrary to the latin auto-hinter, characters for reference and overshoot values of a blue zone are specified separately. Due to the screwed-up change it didn't work at all. 2. A boolean comparison was erroneously replaced with a cast, causing invalid results with the `^' operator later on. The visual artifact caused by this problem is the topic of the bug report. 3. Two flag values were inverted, causing incorrect assignment of reference and overshoot values. * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new syntax to have both reference and overshoot characters in a single string. This is error #1. Add extensive comments. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no longer used. (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. This is error #3. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. Use character `|' to separate characters for reference and overshoot values. Improve tracing messages, synchronizing them with the latin auto-hinter. (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. This is error #2. (af_cjk_align_linked_edge): Add tracing message. * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer used.
Werner Lemberg 8c7fb78b 2014-04-17T15:53:25 [autofit] More coverage fixes for complex scripts. * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage of GSUB lookups into output coverage. Otherwise, ligatures are not handled properly. Don't check blue zone characters for default coverage.
Werner Lemberg 8b1f2a6c 2014-04-14T07:58:19 [autofit] Improve coverage handling. * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs appearing in the GPOS table if we are processing the default coverage.
Werner Lemberg 8a94b1ef 2014-04-12T20:44:33 [autofit] Redesign the recognition algorithm of strong points. In particular, local extrema without horizontal or vertical segments are better recognized: + A + D \ / \ / \ / \ / \ + C \ / B +/ If the distances AB and CD are large, point B wasn't previously detected as an extremum since the `ft_corner_is_flat' function `swallowed' BC regardless of its direction, tagging point B as weak. The next iteration started at B and made `ft_corner_is_flat' swallow point C, tagging it as weak also, et voilà. To improve that, another pass gets now performed before calling `ft_corner_is_flat' to improve the `topology' of an outline: A sequence of non-horizontal or non-vertical vectors that point into the same quadrant are handled as a single, large vector. Additionally, distances of near points are now accumulated, which makes the auto-hinter handle them as if they were prepended to the next non-near vector. This generally improves the auto-hinter's rendering results. * src/autofit/afhints.c (af_glyph_hints_reload): Implement it. * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag `AF_FLAG_NEAR'.
Werner Lemberg 71f53e12 2014-04-05T16:27:19 [autofit] Improve scoring algorithm for identifying stems. Problem reported by Karsten Lücke <karsten.luecke@kltf.de>. The new algorithm takes care of the width of stems: If the distance between two segments is larger than the largest stem width, the demerits quickly increase for larger distances. This improves hinting of slanted fonts (especially if the inner parts of serifs have non-horizontal `shoulders'), avoiding false stem links. * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest stem width (if available) to compute better demerits for distances between stems. (af_latin_hints_detect_features): Pass stem width array and array size. (af_latin_metrics_init_widths): Updated to use original algorithm. (af_latin_hints_apply): Updated to use new algorithm. * src/autofit/aflatin.h: Updated. * src/autofit/afcjk.c: Updated.
Werner Lemberg 87360a78 2014-04-05T00:08:52 [aflatin] Improve comment.
Werner Lemberg cc7cf2c3 2014-03-19T07:35:35 Partially revert last commit. Found by Alexei. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing those variables is plain wrong, since we are in a loop.
Sean McBride 87628724 2014-03-18T08:39:35 Fix clang warnings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize some variables. * src/base/ftcalc.c (FT_MulFix): Only use code if `FT_MULFIX_INLINED' is not defined. * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make function static. * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant code.
Werner Lemberg 23367ff9 2014-03-17T07:33:14 Fix Savannah bug #41869. This works around a problem with HarfBuzz (<= 0.9.26), which doesn't validate glyph indices returned by `hb_ot_layout_lookup_collect_glyphs'. * src/autofit/hbshim.c (af_get_coverage): Guard `idx'. * docs/CHANGES: Updated.
Alan Coopersmith ed372b71 2014-03-09T06:14:12 Fix cppcheck 1.64 warning. * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer dereference in case of error.
Werner Lemberg 05565366 2014-03-06T18:56:58 Fixes for compilation with C++. * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'. (af_get_coverage): Updated. (COVERAGE): Add cast.
Werner Lemberg 7ac76b50 2014-03-04T04:29:17 Fix several clang static analyzer dead store warnings. * src/autofit/afhints.c (af_glyph_hints_reload, af_glyph_hints_align_weak_points): Remove unnecessary assignments. * src/bdf/bdflib.c (bdf_font_load): Ditto. * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, psh_glyph_interpolate_other_points): Ditto. * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
suzuki toshiya 91c7a97b 2014-02-17T16:38:31 [autofit] Fix `make multi' compilation. * src/hbshim.c: Include `afglobal.h' and `aftypes.h'.
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 a8772918 2014-02-04T11:36:08 [autofit] Minor fix. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling of alternative standard characters. This also fixes a compilation warning in non-debug mode.
Werner Lemberg a3364001 2014-01-26T09:45:23 [autofit] Introduce two more slots for standard characters. This is useful for OpenType features like `c2sc' (caps to small caps) that don't have lowercase letters by definition, or other features that mainly operate on numerals. * src/autofit/afscript.h: Add more standard characters. * src/autofit/aftypes.h: Update use of `SCRIPT' macro. (AF_ScriptClassRec): Add members to hold two more standard characters. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c, src/autofit/afglobal.h, * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c: Update use of `SCRIPT' macro. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more standard characters.
Werner Lemberg eb7691cc 2014-01-24T19:04:22 Fix Savannah bug #41320. * src/autofit/aflatin.c (af_latin_metrics_init_blues) <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
Werner Lemberg ff8dc315 2014-01-22T09:19:57 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
Werner Lemberg 6a700786 2014-01-16T08:55:40 [autofit] Improve tracing of style coverages. * include/internal/fttrace.h: Add `afglobal' for tracing style coverages. * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. (af_face_globals_compute_style_coverage): Trace `gstyles' array data.
Werner Lemberg 2b623fe4 2014-01-15T09:46:23 Minor doc issues.
Werner Lemberg c46fa86b 2014-01-08T08:45:40 [autofit] Fix Savannah bug #41138, part 1. * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary enumeration names for generated `#else'. * src/autofit/afblue.h: Regenerated.
Werner Lemberg 991cbcce 2014-01-05T13:24:56 [autofit] Minor fixes for `afblue.pl'. * src/tools/afblue.pl (aux_name): Don't use `reverse'. <Handling #endif>: Use proper indentation for generated `#else'. * src/autofit/afblue.h: Regenerated.
Werner Lemberg 0d97744d 2014-01-04T11:46:34 [autofit] Fix Indic scripts. Split the single, incorrect Indic entry into separate scripts so that the covered ranges are the same: Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese, Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove entries for Meetai Mayak and Sharada – the Unicode ranges were incorrect (and nobody has complained about that), fonts are scarce for those scripts, and the Indic auto-hinter support is rudimentary anyways. * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK. * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro. Use it, together with AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK, to update. * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated. [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed. Sort entries by tags.
Werner Lemberg ecdb0e35 2014-01-03T20:49:31 [autofit] Thinko. * src/autofit/hbshim.c (af_get_char_index): Similar to `af_get_coverage', reject glyphs which are not substituted.
Werner Lemberg 1b5bc897 2014-01-03T18:33:24 [autofit] Fix handling of default coverages. With this commit, the implementation of coverage handling is completed. * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to do. Reject coverages which don't contain appropriate glyphs for blue zones.
Werner Lemberg a42f9184 2014-01-03T18:29:41 [autofit] Fix handling of default coverages. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): First handle non-default coverages, then the default coverage of the default script, and finally the other default coverages.
Werner Lemberg f45749b0 2014-01-03T18:09:36 [autofit] Fix scaling of HarfBuzz shaping. * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
Werner Lemberg ea0367fb 2014-01-03T18:06:45 [autofit] Minor.
Werner Lemberg 5c7f5500 2014-01-03T10:48:26 [autofit] Better ftgrid support. * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add parameters `is_blue' and `blue_offset'.
Werner Lemberg 55cd7e0a 2014-01-02T13:07:48 [autofit] Remove some styles. * src/autofit/afcover.h: Remove coverages for alternative fractions, denominators, numerators, and fractions. * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.