780 Commits
Author SHA1 Message Date
Behdad Esfahbod 2b01fa2d67 [truetype] Remove TT_CONFIG_OPTION_NO_BORING_EXPANSION.
Despite its name, this option only gated 'avar' version 2 support.
FreeType 2.15.0 includes the complete boring-expansion set of proposals,
now released as ISO Open Font Format, fifth edition
(ISO/IEC 14496-22:2026).  Gating just avar2 no longer makes sense,
especially since it has also been shipping on Apple platforms for
four years.

* include/freetype/config/ftoption.h, devel/ftoption.h
  (TT_CONFIG_OPTION_NO_BORING_EXPANSION): Remove.
* src/truetype/ttgxvar.c (ft_var_load_avar): Remove configuration guards.

* docs/CHANGES: Updated.

All five Meson regression tests pass with the removed macro still
defined.  avar1 and avar2 coordinate mapping agrees with FontTools.

Assisted-by: OpenAI Codex
2026-10-21 19:57:57 +02:00
Werner Lemberg ad12863c74 Minor doc fixes. 2026-10-13 05:52:34 +02:00
Werner Lemberg 37515cf56b * Version 2.15.0 released.
==========================

Tag sources with `VER-2-15-0'.

* docs/VERSION.TXT: Add entry for version 2.15.0.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  docs/freetype-config.1: s/2.14.3/2.15.0/, s/2143/2150/.

* include/freetype/freetype.h (FREETYPE_MINOR): Set to 15.
(FREETYPE_PATCH): Set to 0.

* builds/unix/configure.raw (version_info): Set to 26:7:20.
* CMakeLists.txt (VERSION_MINOR): Set to 15.
(VERSION_PATCH): Set to 0.
2026-10-11 22:46:16 +02:00
Alexei Podtelezhnikov d5d4bef0c6 [truetype] Make tiny exception from v40 rules.
* src/truetype/ttinterp.c (Direct_Move): Make v40 exception for
horizontal projection to fix glitches in Comic Sans MS.
2026-10-06 10:11:29 -04:00
Werner Lemberg 2034f8b580 docs/CHANGES: Updated. 2026-10-02 15:33:02 +02:00
Werner Lemberg a5a62a4df4 docs/CHANGES: Updated. 2026-09-07 20:43:19 +02:00
Behdad Esfahbod (بهداد اسفهبد) d939d15557 [cff, truetype] Add VARC (Variable Composites) table support.
The Variable Composites ('VARC' table) technology allows font glyphs to
reuse variants of other glyph shapes as their components.  This is similar
to a feature that some font design tools already provide to designers, for
example, Glyphs calls this 'Smart Components'.  The 'VARC' table allows us
carrying that design all the into the font binary file.

This enables significant file size saving in CJK fonts, for example, up
to 90% savings for simple Hangul shapes.

The 'VARC' table is part of the ISO Open Font Format version 5, and is
implemented and enabled by default in HarfBuzz since 12.0.0 (Sep 2025) and
FontTools.

For test fonts, see

  https://github.com/notofonts/noto-cjk-varco/releases

* include/freetype/config/ftoption.h, devel/ftoption.h
  (TT_CONFIG_OPTION_VARC): New macro.
* include/freetype/tttags.h (TTAG_VARC): New macro.
* include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC11): New macro.
* include/freetype/internal/fttrace.h (ttvarc): New macro.

* include/freetype/internal/tttypes.h (TT_FaceRec) [TT_CONFIG_OPTION_VARC]:
  New fields `tt_varc`, `face_varc`, `varc`, `varc_context`, and
  `varc_loading_components`.

* src/base/ftobjs.c [TT_CONFIG_OPTION_VARC]: Include `svvarc.h`.
  (FT_Load_Glyph) [TT_CONFIG_OPTION_VARC]: Don't use auto-hinting for VARC
  glyphs.

* include/freetype/internal/services/svvarc.h, src/truetype/ttvarc.c,
  src/truetype/ttvarc.h: New files.

* src/truetype/rules.mk (TT_DRV_SRC): Add `ttvarc.c`.

* src/truetype/truetype.c: Include `ttvarc.c`.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_VARC]: Include `svvarc.h` and
  `ttvarc.h`.
  (tt_service_varc, tt_services) [TT_CONFIG_OPTION_VARC]: New structures.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_VARC]: Include `ttvarc.h`.
  (TT_Load_Glyph) [TT_CONFIG_OPTION_VARC]: Handle VARC glyphs.

* src/cff/cffdrivr.c [TT_CONFIG_OPTION_VAR]: Include `svvarc.h`.
  (cff_varc_load, cff_varc_done, cff_varc_has_glyph, cff_varc_load_glyph,
  cff_service_varc) [TT_CONFIG_OPTION_VAR]: New wrapper functions and
  structure to provide the VARC service.
  (cff_services): Updated.
* src/cff/cffgload.c [TT_CONFIG_OPTION_VARC]: Include `svvarc.h`.
  (cff_slot_load) [TT_CONFIG_OPTION_VARC]: Handle VARC glyphs.

* src/sfnt/sfobjs.c [TT_CONFIG_OPTION_VARC]: Include `svvarc.h`.
  (sfnt_init_face) [TT_CONFIG_OPTION_VARC]: Load the VARC service.
  (sfnt_load_face) [TT_CONFIG_OPTION_VARC]: Try to load the 'VARC' table.
  (sfnt_done_face) [TT_CONFIG_OPTION_VARC}: Clean up VARC handling.
2026-08-19 04:04:54 +00:00
Alexei Podtelezhnikov 7c08535abd * docs/CHANGES: Draft recent changes. 2026-05-08 18:34:38 -04:00
Werner Lemberg 0a0221a134 * Version 2.14.3 released.
==========================

Tag sources with `VER-2-14-3'.

* docs/VERSION.TXT: Add entry for version 2.14.3.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  docs/freetype-config.1: s/2.14.2/2.14.3/, s/2142/2143/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.

* builds/unix/configure.raw (version_info): Set to 26:6:20.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
2026-03-22 16:07:10 +01:00
Werner Lemberg 264b5fbf5b Update all copyright notices. 2026-03-11 17:27:07 +01:00
Werner Lemberg 5d249d8402 * src/sfnt/ttgpos.c (tt_face_get_pair_pos1_kerning): Typo.
This could lead to make FreeType miss some kerning pairs.

Fixes issue #1393.
2026-03-06 06:55:07 +01:00
Werner Lemberg bf1f34d75e * subprojects/*: Fix meson wrap files. 2026-03-02 08:30:20 +01:00
Werner Lemberg f4205da148 * Version 2.14.2 released.
==========================

Tag sources with `VER-2-14-2'.

* docs/VERSION.TXT: Add entry for version 2.14.2.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  docs/freetype-config.1: s/2.14.1/2.14.2/, s/2141/2142/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.

* builds/unix/configure.raw (version_info): Set to 26:5:20.
* CMakeLists.txt (VERSION_PATCH): Set to 2.
2026-03-01 14:55:17 +01:00
Werner Lemberg 109d617da2 Very minor doc fixes. 2026-03-01 12:22:58 +01:00
Alexei Podtelezhnikov 7cc8f37b9a [base, smooth] Implement direct LCD filtering.
Applying an LCD filter to spans rather than the entire image improves
the performance of ClearType-like rendering by about 40% at 32 ppem
and much more at larger sizes.  Small rounding differences are expected.

* src/smooth/ftsmooth.c (ft_smooth_raster_lcd, ft_smooth_lcd_spans,
ft_smooth_raster_lcdv, ft_smooth_lcdv_spans, TOrigin): Implement it.
* include/freetype/internal/ftobjs.h (FT_LibraryRec): lcd_filter_func gone.
* src/base/ftlcdfil.c (ft_lcd_filter_fir): Removed.
(ft_lcd_padding): Use padding sufficient for any 5-tap filter.
(FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
* docs/CHANGES: Updated.
2026-01-26 12:43:28 -05:00
Alexei Podtelezhnikov e8f0969dcf [base, smooth] Remove LCD filter from face properties.
This removes the internal face property that sets the filtering weights.
The global filtering algorithms and weights are now optimized to work
well under all conditions.

* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Do it.
* include/freetype/freetype.h (FT_Face_Properties): Revised docs.
* include/freetype/ftparams.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS): Ditto.
* src/base/ftlcdfil.c (ft_lcd_padding): Updated.
* src/base/ftobjs.c (ft_open_face_internal, FT_Face_Properties): Ditto.
* src/smooth/ftsmooth.c (ft_smooth_render): Ditto.
* docs/CHANGES: Updated.
2026-01-25 15:00:08 -05:00
Alexei Podtelezhnikov 084bf2898b [base] Remove legacy LCD filter.
* src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Removed.
(FT_Library_SetLcdFilter): Updated.
* include/freetype/ftlcdfil.h (FT_LcdFilter): Updated.
* doc/CHANGES: Updated.
2026-01-25 14:51:59 -05:00
Werner Lemberg 5751c184cc Improve documentation of the 'BDF ' table as used in X11 .otb files.
Also do some minor code formatting.
2025-12-04 07:46:36 +01:00
Alexei Podtelezhnikov 3532877461 [cff,cid,type1,type42] Fix up PS_FontInfo.
The italic angle is commonly specified in fractional degrees in
Type 1 fonts and its derivatives.  This change clarifies and fixes
these values.  Note that CFF fonts has always reported them as such,
but truncated the underline position and thickness.  Fixes #1367.

* include/freetype/t1tables.h (PS_FontInfoRec):
Use FT_Fixed for italic_angle.
* src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
Modify the italic_angle token.
* src/cff/cffdrivr.c (cff_ps_get_font_info): Fix the underline
position and thickness.

* docs/CHANGES: Note this change.
2025-11-04 19:21:49 -05:00
Werner Lemberg 66e1ec84d5 Typo. 2025-09-14 11:05:41 +02:00
Werner Lemberg 526ec5c47b * Version 2.14.1 released.
==========================

Tag sources with `VER-2-14-1'.

* docs/VERSION.TXT: Add entry for version 2.14.1.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.14.0/2.14.1/, s/2140/2141/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.

* builds/unix/configure.raw (version_info): Set to 26:4:20.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
2025-09-11 13:16:53 +02:00
Werner Lemberg 9db5233ceb * docs/release: Use sshpass for SourceForge.net password. 2025-09-08 05:52:11 +02:00
Werner Lemberg bdd560fc4b * docs/release: Fix scp usage with OpenSSH version >= 9.0.
Starting with this version, OpenSSH uses `scp` with the SFTP protocol as the
default.  However, SFTP is disabled on savannah.gnu.org since January 2025.
2025-09-08 05:42:23 +02:00
Werner Lemberg 007c46ebbf * Version 2.14.0 released.
==========================

Tag sources with `VER-2-14-0'.

* docs/VERSION.TXT: Add entry for version 2.14.0.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.13.3/2.14.0/, s/2133/2140/.

* include/freetype/freetype.h (FREETYPE_MINOR): Set to 14.
(FREETYPE_PATCH): Set to 0.

* builds/unix/configure.raw (version_info): Set to 26:3:20.
* CMakeLists.txt (VERSION_MINOR): Set to 14.
(VERSION_PATCH): Set to 0.
2025-09-06 16:47:31 +02:00
Werner Lemberg 32cb53904c Update all copyright notices. 2025-09-06 06:14:03 +02:00
Werner Lemberg 23fa1e3550 Updating CHANGES file; minor fixes elsewhere (mostly formatting). 2025-08-23 19:21:19 +02:00
Jouk Jansen aa2ee67b3d Improvements to OpenVMS support.
* include/freetype/internal/ftcalc.h [__VMS]: Undefine `FT_MulFix`.

* src/base/ftcalc.c [vms_auto64_source]: Define `FT_MulFix`.

* vms_make.com: Also create 32bit version of the FreeType library.
2025-08-05 17:40:45 +02:00
Alexei Podtelezhnikov 27c1cb10a5 * docs/CHANGES: Mention 'ftmulti' improvements. 2025-08-04 11:47:10 -04:00
Werner Lemberg b04db3872c [sfnt] Rewrite GPOS kerning support. (2/2)
The previous code had a fundamental flaw: it didn't validate the necessary
parts of the 'GPOS' table before accessing it, causing crashes with
malformed data (since `TT_CONFIG_OPTION_GPOS_KERNING` is off by default,
standard fuzzers don't catch these problems).  Additionally, it did a lot of
parsing while accessing kerning data, making it rather slow.

The new implementation fixes this.  After validation, offsets to the 'GPOS'
lookup subtables used in the 'kern' feature that correspond to 'simple'
kerning (i.e., similar to 'kern' table kerning) are stored in `TT_Face`;
this greatly simplifies and accelerates access to the kerning data.

Testing with font `SF-Pro.ttf` version '1.00', the validation time for the
'GPOS' table increases the start-up time of `FT_New_Face` by less than 1%,
while calls to `FT_Get_Kerning` become about 3.5 times faster.

* include/freetype/internal (gpos_kerning_available): Replace with...
  (gpos_lookups_kerning, num_gpos_lookups_kerning): ... these new fields.
  Update callers.

* src/ttgpos.c [TT_CONFIG_OPTION_GPOS_KERNING]: A new implementation.
2025-07-05 14:51:40 +02:00
Werner Lemberg 61bacf3dae Set minimum HarfBuzz version back to 2.0.0.
Due to the new GSUB parsing we no longer need
`hb_ot_layout_lookup_get_glyph_alternates`.

This partially reverts commit 5d2fd7608a.

* CMakeLists.txt (HARFBUZZ_MIN_VERSION), meson.build (harfbuzz_dep),
  builds/unix/configure.raw (harfbuzz_pkg): Set version to 2.0.0.

* src/autofit/ft-hb-decls.h: Remove entry for
  `hb_ot_layout_lookup_get_glyph_alternates`.
2025-06-26 05:46:58 +02:00
Werner Lemberg 7f559fbe9a Update links.
Found with `linkchecker --check-extern index.html` running locally in the
'freetype-web' repository.
2025-06-10 04:56:50 +02:00
Ozkan Sezer 81f839a7d9 * CMakeLists.txt: Add support for FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC.
This commit introduces a new CMake option `FT_DYNAMIC_HARFBUZZ`.
2025-06-04 09:12:41 +02:00
Werner Lemberg 2adb53616a Replace 'www.freetype.org' with 'freetype.org'. 2025-06-03 10:35:16 +02:00
Werner Lemberg 5a07f41d0e [sfnt] FT_Load_Sfnt_Table can now also load a font's table directory.
Closes issue #1263.

* src/sfnt/ttload.c (tt_face_load_any): Implement it.
2025-05-28 09:52:44 +02:00
Werner Lemberg d629c8bffa Update CHANGES file. 2025-05-27 08:41:13 +02:00
Behdad Esfahbod fa412cf5c5 [mm/gxvar] Always detect default instance and use optimized codepath.
Even if it was explicitly set by either design or normalized APIs.

Also update documentation.

* src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): Use value -2
  of `error` to indicate that we have a non-default instance.
  (TT_Set_Named_Instance): Updated.

* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
  FT_Set_Var_Blend_Coordinates): Updated.
2025-05-27 07:00:08 +02:00
Werner Lemberg 46edeb321c * src/afadjust.c (adjustment_database): Make it complete up to U+FFFF.
Also fix two entries.

This is for Unicode 17.0.
2025-05-19 05:14:25 +00:00
Alexei Podtelezhnikov 408957dca0 [truetype] Finalize bytecode changes.
* src/truetype/ttinterp.c: Formatting, minor.
(TT_Goto_CodeRange): Initialize 'iniRange' here...
(TT_RunIns): ... instead of here.
* docs/CHANGES: Updated.
2025-05-13 17:07:31 -04:00
Werner Lemberg d32c637d6e [autofit] Better handling of characters with attached diacritics. (3/3)
Fixes issue #136.

* src/autofit/afadjust.c (adjustment_database): Updated.
2025-05-10 05:03:48 +00:00
Werner Lemberg c2789e7558 [doc] Mention that there is no rendering support for 'COLR' v1 tables.
Handles issue #1319.
2025-05-08 07:03:31 +02:00
Werner Lemberg 79912716e7 * docs/CHANGES: Updated. 2025-04-29 19:18:12 +00:00
Werner Lemberg 2d1abd3bbb [autofit] Extend adjustment database with characters up to U+1FFF.
This adds many pre-combined Latin glyphs, Cyrillic, Greek, and some
characters from other scripts (or rather, Unicode blocks).

Fixes issues #112 and #471.
2025-04-28 17:52:35 +00:00
Werner Lemberg a64b49ccfc [autofit] Request at least HarfBuzz 7.2.0 for diacritic support. (3/3)
This version (from April 2023) added 'SingleSubst' support to
`hb_ot_layout_lookup_get_glyph_alternates`.
2025-04-20 10:07:13 +02:00
Werner Lemberg ae3879c0a1 * docs/CHANGES: Mention Craig's GSoC 2023 project. 2025-04-14 06:51:01 +02:00
Alexei Podtelezhnikov f0acd2038a * docs/CHANGES: Updated. 2025-04-12 08:41:27 -04:00
Alexei Podtelezhnikov 01c22b3668 [bdf] Tokenize input instead of listing.
Instead of cumbersome field list mamangement, we will tokenize input
using custom `bdf_strtok_`.

* src/bdf/bdflib.c (bdf_list_t_, bdf_list_init_, bdf_list_ensure_,
bdf_list_shift_, bdf_list_join_, bdf_list_split_,
bdf_set_default_spacing_): Removed.
(bdf_strtok_): New function which NUL-terminates the first token at
the delimiter position and returns the next token that follows
consequtive delimiters.
(bdf_parse_*_, bdf_load_font): Updated.

* docs/CHANGES: Claim overall 75% performance improvement.
2025-01-19 11:19:10 -05:00
Alexei Podtelezhnikov bbc445e165 [bdf] Speed up bitmap parsing.
A dedicated parser of bitmap data with minimal error checking and
no string comparisons helps to improve performance.

* src/bdf/bdflib.c (bdf_parse_bitmap_): New dedicated bitmap parser.
(bdf_parse_glyphs_): Pass to `bdf_parse_bitmap_` on BITMAP.
2025-01-11 23:11:07 -05:00
Alexei Podtelezhnikov 4ef8eed11b [truetype] Ingnore FT_LOAD_NO_BITMAP in bitmap-only fonts.
For consistency with other bitmap-only fonts, we should ignore this
flag of the font is not scalable.

* src/truetype/ttgload.c (TT_Load_Glyph): Check if face is scalable
when checking for FT_LOAD_NO_BITMAP.

* docs/CHANGES: Start new chapter wtith this change.
2024-12-31 16:25:50 -05:00
luz paz f92c96550a Fix various typos. 2024-08-13 23:29:13 -04:00
Werner Lemberg 42608f77f2 * Version 2.13.3 released.
==========================

Tag sources with `VER-2-13-3'.

* docs/VERSION.TXT: Add entry for version 2.13.3.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.13.2/2.13.3/, s/2132/2133/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.

* builds/unix/configure.raw (version_info): Set to 26:2:20.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
2024-08-12 12:50:14 +02:00