|
32cb5390
|
2025-09-06T06:14:03
|
|
Update all copyright notices.
|
|
3dd7fc42
|
2025-05-19T05:37:23
|
|
[autofit] Speed up construction of reverse character map. (2/4)
This commit, together with the previous one, makes the startup of the
auto-hinter much faster.
Note, though, that the startup time for handling the diacritic database is
still rather large. For example, loading `arial.ttf` version 7.00 followed
by auto-hinting a first Latin glyph is still approx. three times slower
than before the introduction of the database (this is because function
`hb_ot_layout_lookup_get_glyph_alternates` is called very often).
* src/autofit/afshaper.c (scripts): Rename this array to...
(af_hb_scripts): ...this and export it.
(af_shaper_get_coverage_hb): Updated.
* src/autofit/afshaper.h: Updated.
* src/autofit/afadjust.c (af_reverse_character_map_new): Pass the current
script to `hb_ot_layout_collect_lookups` to make HarfBuzz check less
lookups while searching for glyph alternates.
|
|
7651fe00
|
2025-04-27T18:44:49
|
|
[autofit] Enable dynamic loading of HarfBuzz. (1/2)
This commit activates the mini-HarfBuzz header files and provides the
necessary infrastructure for dynamically loading HarfBuzz if
`FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC` is defined (this macro gets set up
in a follow-up commit).
* src/autofit/ft-hb.c: New file, providing `ft_hb_funcs_init` and
`ft_hb_funcs_done` for loading HarfBuzz dynamically. The name of the
library is hold in the macro `FT_LIBHARFBUZZ`, which can be overridden.
* src/autofit/ft-hb.h: Don't include `hb.h` but `ft-hb-types.h`.
(hb): Modified to handle both standard linking and dynamically
loading of HarfBuzz.
(HB_EXTERN): New macro to load `ft-hb-decls.h`.
* src/autofit/afadjust.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: For the sake of
dynamically loading the HarfBuzz library, replace the compile-time macro
`HB_VERSION_ATLEAST` with a call to the run-time function
`hb_version_atleast` where necessary – a follow-up commit will set the
minimum version of HarfBuzz to 2.6.8, which provides all necessary
functions needed by FreeType.
* src/autofit/afmodule.h: Include `ft-hb.h`.
(AF_ModuleRec) [FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC]: Add `hb_funcs`
structure to hold pointers to the dynamically loaded HarfBuzz functions.
* src/autofit/afmodule.c (af_autofitter_init, af_autofitter_done)
[FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC]: Call `ft_hb_funcs_init` and
`ft_hb_funcs_done`.
* src/autofit/afshaper.h: Updated.
* src/autofit/autofit.c: Include `ft-hb.c`.
* src/autofit/rules.mk (AUTOF_DRV_SRC, AUTOF_DRV_H): Updated.
|
|
e9d03072
|
2025-04-26T19:05:31
|
|
[autofit] Some preparations for loading HarfBuzz dynamically. (2/4)
Pass `AF_FaceGlobals` to many functions, or provide it, tagged with
`FT_UNUSED`. We need this later on to access a dynamically linked HarfBuzz
library.
* src/autofit/ft-hb-ft.h (ft_hb_ft_font_create): Use `globals` argument.
Drop unused `destroy` argument.
* src/autofit/ft-hb-ft.c (ft_hb_ft_face_create, ft_hb_ft_font_create): Use
`globals` argument.
Drop unused `destroy` argument.
(ft_hb_ft_face_create, ft_hb_ft_reference_table): Cast `user_data` to
`AF_FaceGlobals`.
* src/autofit/afadjust.c (af_get_glyph_alternates_helper,
af_get_glyph_alternates): Add `globals` argument.
Update callers.
* src/autofit/afshaper.c, src/autofit/afshaper.h (af_shaper_buf_create,
af_shaper_buf_destroy): Use `globals` argument.
* src/autofit/afglobal.c (af_face_globals_new): Updated.
* 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.
|
|
3eb4eade
|
2025-04-12T00:44:46
|
|
[autofit] Rename 'ft-hb' to 'ft-hb-ft'.
Since it's a (shrinked) copy of 'hb-ft'.
* src/autofit/afglobal.c (af_face_globals_new), src/autofit/afshaper.h,
src/autofit/autofit.c: Updated.
* src/autofit/ft-hb.c, src/autofit/ft-hb.h: Renamed to...
* src/autofit/ft-hb-ft.c, src/autofit/ft-hb-ft.h: ...this; updated.
* src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
|
|
47574f7e
|
2024-01-27T11:11:22
|
|
Update all copyright notices.
|
|
65f85237
|
2023-01-17T09:18:25
|
|
Update all copyright notices.
|
|
ebe7e912
|
2023-01-02T20:13:22
|
|
[autofit] Don't depend on 'hb-ft'.
The circular dependency is still there, but at least we no longer depend on
the HarfBuzz API that is only present if HarfBuzz has been built with
FreeType support, making the bootstrapping a bit easier.
* src/autofit/ft-hb.c, src/autofit/ft-hb.h: New files, providing
`_hb_ft_font_create`, which is more or less a verbatim copy of the
corresponding HarfBuzz code from file `hb-ft.cc`.
* src/autofit/afglobal.c (af_face_globals_new): Use it.
* src/autofit/afshaper.h: Don't include `hb-ft.h` but `ft-hb.h`.
* src/autofit/autofit.c: Include `ft-hb.c`.
* LICENSE.TXT: Updated.
|
|
d0cfb4e1
|
2022-01-11T10:54:10
|
|
Update all copyright notices.
|
|
b6e8a712
|
2021-01-17T07:18:48
|
|
Update all copyright notices.
|
|
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'.
|
|
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.
|
|
e5038be7
|
2020-01-19T17:05:19
|
|
Update all copyright notices.
|
|
75859970
|
2019-02-23T10:07:09
|
|
Update all copyright notices.
|
|
f686ad46
|
2019-01-22T20:31:44
|
|
Update copyright years.
|
|
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.
|
|
0a0c2256
|
2018-01-02T09:33:57
|
|
Update copyright year.
|
|
563ae780
|
2017-01-04T20:16:34
|
|
Update copyright year.
|
|
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.
|
|
9adeab64
|
2016-01-13T11:54:10
|
|
Update copyright year.
|
|
37412ff9
|
2016-01-12T21:37:13
|
|
Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.
*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
|
|
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.
|