Commit Graph

8420 Commits

Author SHA1 Message Date
Suzuki, Toshiya (鈴木俊哉)
184910dbef * src/autofit/afgsub.c: Evaluate FT_CONFIG_OPTION_USE_HARFBUZZ
after <freetype/freetype.h> and others.

Fixes issue #1360.
2025-11-05 10:32:03 +00:00
Alexei Podtelezhnikov
3d871c5a0c Minor. 2025-11-04 20:08:04 -05: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
Alexei Podtelezhnikov
ae63cc0d13 * src/base/ftadvanc.c (ft_face_scale_advances_): Adjust scaling.
This is safe because advances are short originally.
2025-10-26 13:55:40 -04:00
Alexei Podtelezhnikov
0d410eb9aa [base] Refactor obtaining advances.
* src/base/ftadvanc.c (ft_load_advances): New separate function to
handle slow advances.
(FT_Get_Advance, FT_Get_Advances): Updated.
2025-10-26 13:28:32 -04:00
Alexei Podtelezhnikov
f238830d77 * src/truetype/ttgload.c (tt_loader_init): Reset compatibility.
This may fix #1262, credits to Honnesh Ramachandra.
    https://lists.nongnu.org/archive/html/freetype-devel/2025-10/msg00004.html
2025-10-16 22:35:53 -04:00
Werner Lemberg
4334f009e7 [autofit] Prevent signed integer overflow.
* src/autofit/aflatin.c (af_latin_stretch_top_tilde,
  af_latin_stretch_bottom_tilde, af_latin_align_top_tilde,
  af_latin_align_bottom_tilde,
  af_glyph_hints_apply_vertical_separation_adjustments): Use `ADD_LONG` and
  `SUB_LONG` for values that involve `FT_LONG_MAX` and `FT_LONG_MIN`.

Fixes issue #1363.
2025-09-28 08:13:38 +02:00
Werner Lemberg
7955c9b86a * src/bdf/bdfdriver.c (BDF_Glyph_Load): Use bdf->bdffont->bpp directly.
Fixes issue #1362.
2025-09-24 05:56:34 +02:00
Alan Coopersmith
41eab7e66d * tests/README.md: Fix a script name. 2025-09-17 19:30:55 -04:00
Werner Lemberg
03acd8923b [build] Don't use non-POSIX escapes in sed regexp.
* builds/unix/configure.raw (ftoption_set, ftoption_unset): Avoid `\>`.

Fixes issue #1358.
2025-09-14 11:38:18 +02:00
Werner Lemberg
66e1ec84d5 Typo. 2025-09-14 11:05:41 +02:00
Alexei Podtelezhnikov
7e14994b02 * include/freetype/internal/ftobjs.h (ft_default_raster): Relic removed. 2025-09-12 12:57:50 -04: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.
VER-2-14-1
2025-09-11 13:16:53 +02:00
Behdad Esfahbod
566f8805f3 [base] Fix return values of two Font Variation functions.
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
  FT_Set_Var_Blend_Coordinates): Do it.

Fixes issue #1355.
2025-09-10 14:22:49 +02:00
Werner Lemberg
53b9319bff * src/autofit/afgsub.c (af_map_lookup): Fix handling of lookup type 7.
Fixes issue #1356.
2025-09-10 14:14:43 +02:00
Alexei Podtelezhnikov
36f917cc6a * src/truetype/ttinterp.c (TT_Run_Context): Fix IUP tracking bits.
Correctly fixes #1353 and #1349.
2025-09-08 11:03:24 -04:00
Alexei Podtelezhnikov
3ac4907545 Typo! 2025-09-08 10:45:16 -04:00
Alexei Podtelezhnikov
89eba38e62 * src/truetype/ttinterp.c (TT_Run_Context): Reset IUP tracking bits.
Fixes #1353.
2025-09-08 10:43:35 -04:00
Behdad Esfahbod
e969f52986 [autofit] Fix HarfBuzz calling.
* src/autofit/afadjust.c (af_reverse_character_map_new)
  [FT_CONFIG_OPTION_USE_HARFBUZZ]: Use `ft_hb_enabled`.

Fixes issue #1354.
2025-09-08 05:57:19 +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.
VER-2-14-0
2025-09-06 16:47:31 +02:00
Werner Lemberg
28223c5f99 * builds/toplevel.mk (do-dist): Download shallow clone of config.git.
No need for any other commit than the current one.
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
d3668e00da src/sfnt/ttload.c (tt_face_load_any): Correctly handle font containers.
Reported as

  https://issues.oss-fuzz.com/issues/424613326
2025-09-05 20:23:22 +02:00
Jouk Jansen
ba7eb5bed7 Clean up OpenVMS support.
This avoids cluttering the source code with VMS-specific changes.

* include/freetype/internal/ftcalc.h [__VMS], src/base/ftcalc.c
  [vms_auto64_source]: Remove.

* builds/vms/patch_ftcalc.sed: New file.

* vms_make.com: Change macro definitions while this script is running; we
  use `GNU sed` to inject the necessary preprocessor code on the fly.
2025-09-05 17:58:54 +00:00
Alexei Podtelezhnikov
c6cf32de3b * src/psaux/psauxmod.h (psaux_driver_class): Removed declaration. 2025-08-31 22:39:11 -04:00
Alexei Podtelezhnikov
61a4234260 [base] Use const FT_Module_Class.
This is intended to warn against modifying any fields in the class,
at compile-time and avoid crashes at run-time.

* include/freetype/internal/ftobjs.h (FT_ModuleRec): Do it.
* src/base/ftobjs.c (Destroy_Module, FT_Add_Module): Updated.
2025-08-29 16:59:50 -04:00
Alexei Podtelezhnikov
48f91b5331 * src/base/ftobjs.c (FT_Load_Glyph): Reduces scope of 'ttface'. 2025-08-27 11:16:07 -04:00
Alexei Podtelezhnikov
c0851258d0 * src/truetype/ttinterp.c: Fix some builds. 2025-08-25 12:35:50 -04:00
Werner Lemberg
8cbabc47da * subprojects/*.wrap: Updated. 2025-08-23 19:21:19 +02:00
Werner Lemberg
23fa1e3550 Updating CHANGES file; minor fixes elsewhere (mostly formatting). 2025-08-23 19:21:19 +02:00
Alexei Podtelezhnikov
ca0247af92 [truetype] Fix compilation without bytecode.
Fixes #1351 and various warnings about unused variables.

* src/truetype/ttinterp.c: Put the entire body under #ifdef.
* src/truetype/ttgload.c (TT_Process_Composite_Glyph): Relocate
some declarations.
* src/truetype/ttinterp.h: Remove some #ifdef conditions.
* src/truetype/ttobjs.c (tt_size_done): Modified.
2025-08-19 23:39:02 -04:00
Alexei Podtelezhnikov
cff6674899 [truetype] Small fix in the incremental interface (again).
Fixes #1299, last [-Wdangling-pointer=] warning.

* src/truetype/ttgload.c (load_truetype_glyph): Restore original stream
on exit unconditionally.
2025-08-14 12:39:57 -04:00
Alexei Podtelezhnikov
6bd5a8cc78 [truetype] Small fix in the incremental interface.
Fixes #1299, last [-Wdangling-pointer=] warning.

* src/truetype/ttgload.c (load_truetype_glyph): Restore original stream
on exit.
2025-08-14 12:23:03 -04:00
Alexei Podtelezhnikov
508c30e086 * src/autofit/afgsub.c: Fix a warning.
Fixes [-Wunused-function] warning without HarfBuzz.
2025-08-14 10:33:30 -04:00
Alexei Podtelezhnikov
adc7b85508 * */ftoption.h: Update C99 wording. 2025-08-11 15:34:27 -04:00
Alexei Podtelezhnikov
4c77a6967d * */ftoption.h: Note C99 compliance. 2025-08-11 13:20:50 -04:00
Behdad Esfahbod
670d0b2121 [ttgxvar] Fix caching of scalars when there are intermediate tuples.
For example, with `GoogleSansFlex-Regular.ttf` at ROND=100, the 'Q' glyph
was misrendering.

* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Reset `tupleScalars`
  earlier.
2025-08-08 13:21:34 +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
Alexei Podtelezhnikov
42047ae84d [type1/MM] Correctly reset the default instance.
Call T1_Set_MM_WeightVector, which actually sets default weights,
instead of TT_Set_MM_Blend, which just centers the axes.

* src/type1/t1load.c (T1_Reset_MM_Blend): Do it.
2025-08-02 11:54:16 -04:00
Alexei Podtelezhnikov
08805be530 [truetype/v40] Fix ROUND_XY_TO_GRID handling.
Fixes #1346.

* src/truetype/ttgload.c (TT_Process_Composite_Component): Round
the x-position unless in backward_compatibility mode.
2025-08-01 11:01:16 -04:00
Alexei Podtelezhnikov
6c18a397cb * src/truetype/ttinterp.c (Ins_MDRP,MIRP): Small tweak. 2025-07-30 09:45:53 -04:00
Alexei Podtelezhnikov
64a0c64a04 [truetype] Tweak size management.
* include/freetype/internal/services/svmetric.h (FT_Size_Reset_Func):
Update typedef, do not return error.
* src/truetype/ttobjs.c (tt_size_reset_height): Move the PPem error
handling from here...
(tt_size_reset): ... to here to improve readability.
src/truetype/ttobjs.h (tt_size_reset_height): Update prototype.
2025-07-29 22:21:42 -04:00
Alexei Podtelezhnikov
8ceba9bbc5 [truetype] Relocate color compensation (cont'd).
* src/truetype/ttinterp.c (Inc_MDAR,MIAP,MDRP,MIRP): Fix forgotten
rounding.
2025-07-29 19:06:27 -04:00
Alexei Podtelezhnikov
47d80cf27b [truetype] Fix EVEN and ODD instructions.
It is possible to have a fractional part after rounding when rounding
to half-grid or super-rounding. The specs call to ignore the fractional
part in that case.

^ src/truetype/ttinterp.c (Ins_EVEN, Ins_ODD): Fix mask.
2025-07-29 07:12:24 -04:00
Alexei Podtelezhnikov
ac662dcdcf * src/truetype/ttinterp.c: Fix comments. 2025-07-27 19:24:36 -04:00
Alexei Podtelezhnikov
63e2c05875 * src/truetype/ttinterp.h (TT_Round_Func): Fix argument.
Fixes #1347: function type mismatch.
2025-07-27 18:33:14 -04:00
Alexei Podtelezhnikov
62ca1fd27e [truetype] Clean up size validation.
Rely on non-zero ppem to validate the size object.

* src/truetype/ttobjs.h (TT_Size_Merics): Remove the `valid` flag.
* src/truetype/ttobjs.c (tt_size_init,done,reset,reset_height): Updated.
* src/truetype/ttgload.c (TT_Load_Glyph): Check for non-zero ppem.
2025-07-27 09:40:39 -04:00