src/autofit/afshaper.c


Log

Author Commit Date CI Message
Nikolaus Waxweiler f1f9705f 2021-01-15T23:52:04 [afshaper] Fix hb_ot_tags_from_script deprecation warning. * autofit/afshaper.c (af_shaper_get_coverage): Copy the source code of the function as suggested in https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle at most three tags.
Werner Lemberg b6e8a712 2021-01-17T07:18:48 Update all copyright notices.
Werner Lemberg a6adb256 2020-12-02T14:15:07 * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`. This ensures good logging output, with all lines having a proper prefix (if requested).
Werner Lemberg 16586859 2020-06-13T21:15:45 Remove redundant inclusion of `ft2build.h'. * */*: Remove `#include <ft2build.h>' where possible. * include/freetype/freetype.h: Remove cpp error about missing inclusion of `ft2build.h'.
David Turner e1339133 2020-06-08T13:31:55 Make macros for header file names optional. We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation.
Werner Lemberg e5038be7 2020-01-19T17:05:19 Update all copyright notices.
Werner Lemberg 75859970 2019-02-23T10:07:09 Update all copyright notices.
Werner Lemberg f686ad46 2019-01-22T20:31:44 Update copyright years.
Werner Lemberg a0dd16fb 2018-08-15T18:13:17 Don't use `trace_' prefix for FT_COMPONENT arguments. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated.
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.
Werner Lemberg e0015f76 2018-05-08T11:51:16 [autofit] Avoid potential SEGV if running out of memory. Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>. * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't allocate and free a four-byte buffer. Instead, make those functions no-ops; the calling functions will provide a pointer to a buffer instead. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits), src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for `shaper_buf'.
Werner Lemberg 0a0c2256 2018-01-02T09:33:57 Update copyright year.
Behdad Esfahbod 90461c01 2017-10-14T08:42:07 [afshaper] Delay creating `hb_set' objects until needed. In runs on Noto Naskh Arabic, this results in 89 sets created instead of 340 before. Makes auto-hinter setup with HarfBuzz enabled 20% to 30% faster. * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
suzuki toshiya 21658c31 2017-09-12T15:59:18 [autofit, sfnt] Fix for `make multi'. * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use FT_Get_Advance() in it. * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H to use PS_Unicodes in it, also include `ttpost.h' to use tt_face_get_ps_name() in it.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg fb672897 2016-01-20T21:13:16 [autofix] Complete last autofit commit. Problem reported by Kostya Serebryany <kcc@google.com>. * src/autofit/afshaper.c (af_shaper_get_coverage) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
Werner Lemberg ec776596 2016-01-19T19:33:57 [autofit] Fix handling of default script. Patch taken from ttfautohint, commit 071ae2c00e0d67f9d19418f4fade1c23d27dc185. There were two bugs. - We now use non-standard script tags like `khms' for special purposes. However, HarfBuzz maps such tags to `DFLT', and without this commit the associated lookups were incorrectly assigned to the non-standard tags. - Let's assume we have a Bengali font, and the font's `DFLT' script tag handles the necessary lookups for Bengali, too. Without this commit, the `DFLT' lookups were assigned to ttfautohint's default script (usually `latn') before the standard lookups for Bengali were handled. We now have the following order while searching for covered glyph indices. special features of scripts (e.g. `sups' for Cyrillic) Unicode mappings of scripts remaining features of scripts (especially important for Indic scripts) default features of default script * src/autofit/afshaper.c, src/autofit/afshaper.h (af_shaper_get_coverage): Add boolean parameter to indicate default script. Update all callers. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Fix search order for coverages.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg b0de5a82 2015-12-23T23:25:03 [autofit] Start implementing hinting direction (up/down, down/up). Right now, it does nothing. * src/autofit/afscript.h: Add another parameter to `SCRIPT', specifying hinting direction. * src/autofit/afglobal.c, scr/autofit/afglobal.h, src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c, src/autofit/aftypes.h: Extend `SCRIPT' definitions.
Werner Lemberg 4fe3b55d 2015-12-11T08:08:48 [autofit] Restore OpenType feature check. This was removed while rewriting the HarfBuzz interface. * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to hold internal HarfBuzz buffer, needed for feature comparison. * src/autofit/afglobal.c (af_face_globals_new, af_face_globals_free): Initialize and destroy `hb_buf'. * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character (cluster) with and without applied feature. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing message.
Werner Lemberg 3c3d7c21 2015-12-10T11:54:41 Another typo.
Werner Lemberg 93fdf4eb 2015-12-10T11:52:08 Formatting.
Werner Lemberg b38ca3cb 2015-12-06T19:48:31 [autofit] Typos. * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
Werner Lemberg 24aa9c66 2015-12-06T18:52:41 [autofit] Rewrite HarfBuzz interface to support character clusters. Scripts like Khmer have blue zones that can't be directly represented by Unicode characters. Instead, it is necessary to let HarfBuzz convert character clusters into proper glyph representation forms, then deriving the blue zone information from the resulting glyphs. * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by... * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new files, providing a new API to access HarfBuzz. The new API manages a HarfBuzz buffer with `af_shaper_buf_create' and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded string with function `af_shaper_get_cluster', and the resulting glyph data (indices, advance widths, vertical offsets) can be iteratively accessed with function `af_shaper_get_elem'. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Updated. * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/. * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/. (af_face_globals_compute_style_coverage): Updated. * src/autofit/afglocal.h: s/hbshim.h/afshaper.h/. * src/autofit/autofit.c: s/hbshim.c/afshaper.c/. * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.