Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| b04db387 | 2025-07-04 19:52:53 | [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. | ||
| fb6a7426 | 2025-07-04 06:03:37 | * src/sfnt/ttkern.h (TT_FACE_HAS_KERNING): Remove macro. Given that we also support (limited) 'GPOS' table kerning if `TT_CONFIG_OPTION_GPOS_KERNING` is defined, the name of this macro is misleading since it only is true for 'kern' table kerning. * src/sfnt/sfobjs.c (sfn_load_face): Replace `TT_FACE_HAS_KERNING` with plain code. | ||
| f1cd6dbf | 2025-07-01 21:32:47 | * src/truetype/ttobjs.c (tt_size_init_bytecode): Correct previous fix. `FT_NEW_ARRAY` expects a signed value, not an unsigned one. | ||
| 01695ea7 | 2025-07-01 18:06:17 | Various minor fixes. As reported by clang 19. * src/autofit/afadjust.c (adjustment_database): Make it static. * src/base/ftdbgmem.c (FT_MEM_SIZE_MIN): Remove unused macro. * src/psaux/psobjs.c (skip_procedure), src/truetype/ttinterp.c (Ins_IF, Ins_ELSE, Ins_FDEF, Ins_IDEF): Add `default` clause. | ||
| f1be7392 | 2025-07-01 18:00:12 | More signedness fixes. As reported by clang 19. * src/autofit/afadjust.c (add_substitute): Make first argument unsigned. Update all callers. Other minor signedness fixes. (af_reverse_character_map_new): Minor signedness fixes. * src/autofit/afgsub.c (af_hash_insert): Minor signedness fixes. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Make third argument unsigned. Update all callers. Other minor signedness fixes. (af_latin_hints_apply): Minor signedness fixes. * src/bdf/bdflib.c (bdf_parse_bitmap_): Minor signedness fix. * src/truetype/ttobjs.c (tt_size_init_bytecode): Minor signedness fix. | ||
| 8d82c9fa | 2025-07-01 17:08:37 | */*: Fix trivial signedness issues with format strings in trace messages. As reported with clang 19's `-Wformat` option. | ||
| d7e640b9 | 2025-06-29 07:45:09 | [doc] Revise font variation API. | ||
| 58be4879 | 2025-06-24 13:31:10 | [truetype] Add comment to explain heuristic limit for twilight points. | ||
| 43940e4c | 2025-06-23 11:04:43 | [truetype] Restore non-persistent CVT and storage. According to specifications, CVT and storage area may or may not be persistent after modifications by a glyf program. FreeType had always reset them, which was broken by the last commit. * src/truetype/ttinterp.c (TT_Load_Context): Set CVT and storage here. * src/truetype.ttobjs.c (tt_size_run_prep): Prioritize TT_Load_Context. (tt_size_init_bytecode): Allocate but not set CVT and storage area. | ||
| 36ddd0cb | 2025-06-22 12:13:48 | [truetype] Deduplicate 'codeRangeTable'. * src/truetype/ttinterp.c (TT_Load_Context, TT_Save_Context): Do not copy 'codeRangeTable'. * src/truetype/ttobjs.h (TT_Size): Remove 'codeRangeTable'. (TT_CodeRange_Tag, TT_CodeRange, TT_DefArray): Moved to... * src/truetype/ttinterp.h: ... this header.1 | ||
| c9cbfacb | 2025-06-21 23:30:24 | [truetype] Simplify bytecode allocations. To avoid repeated synchronization, some TT_Size allocations are moved TT_ExecContext for good. The memory blocks are also consolidated. * src/truetype/ttinterp.c (TT_{Load,Save,Done}_Context): Remove synchronization and stack management. * src/truetype/ttobjs.c (tt_size_{init,done}_bytecode): Manage allocations and assign them to the execution context. (tt_size_run_prep): Updated. | ||
| 4c2437ef | 2025-06-21 22:59:29 | [truetype] Rework handling of rendering mode in bytecode. This replaces a large number of confusing boolean constructs that describe the target rendering mode in the execution context with the straight mode variable. It might fix some hidden bugs when FT_LOAD_TARGET_XXX were used as flags, which they are not. The condition that triggers the CV program re-execution is simplified. These events due the rendering mode change are rather rare and unexpected and, therefore, should not be over-analyzed. In v40, all mode changes now trigger the CV program. In v35, only switches to/from mono do. * src/truetype/ttinterp.h (TT_ExecContext): Replace 'grayscale', 'grayscale_cleartype', 'subpixel_hinting_lean', and 'vertical_lcd_lean' with the rendering 'mode'. * src/truetype/ttinterp.c (Ins_GETINFO): Updated. * src/truetype/ttgload.c (tt_loader_init): Replace 'prep' re-execution trigger and update 'backward_compatibility' condition. (tt_loader_set_pp): Updated. | ||
| 0e38fa75 | 2025-06-20 22:22:05 | * src/truetype/{ttinterp.c,ttobjs.c}: Minor. | ||
| 19770604 | 2025-06-20 21:48:14 | [truetype] Clean up bytecode execution triggers. This avoids executing the CV program twice and cleans up the use of 'fpgm' and 'prep' triggers * src/truetype/ttgload.c (tt_loader_init): Call 'tt_size_init_bytecode' and 'tt_size_run_prep' explicitly and avoid the call repetition. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Removed as unused. (tt_size_init, tt_size_init_bytecode, tt_size_done_bytecode): Remove some 'fpgm' and 'prep' triggers and update. (tt_size_run_fpgm, tt_size_run_prep): Do not set the pedantic flag here. * src/truetype/ttobjs.h: Update signatures. | ||
| b647de09 | 2025-06-20 20:34:10 | * src/truetype/ttgload.c (tt_loader_init, load_sbit_image): Clean up. | ||
| 2041c65c | 2025-06-20 20:20:54 | [truetype] Simplify twilight zone management. * include/freetype/internal/tttypes.h (TT_GlyphZone): Remove 'memory'. * src/truetype/ttobjs.c (tt_glyphzone_done): Use 'memory' as argument. (tt_glyphzone_new, tt_glyphzone_done): Allocate/free as a single block. (tt_size_init_bytecode, tt_size_done_bytecode): Updated. * src/truetype/ttobjs.h (tt_glyphzone_done): Updated signature. | ||
| 738905b3 | 2025-06-14 20:18:48 | [truetype] Revise twilight zone initiation. This assures that twilight zone is reset before each CV program execution, including after the rendering mode switch. Fixes #1344. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Relocate the GS the twilight zone initiation from here... (tt_size_run_prep): ... to this function, sho that it is always done prior to the CV program execution. * src/truetype/ttobjs.c (TT_Run_Context): Set twilight zone here... (TT_Load_Context): ... rather than here, as it used to be. | ||
| 3c14c525 | 2025-06-11 15:32:11 | [truetype] Clean up TT_GlyphZone. * include/freetype/internal/tttypes.h (TT_GlyphZone): Delete fields. * src/truetype/ttobjs.c (tt_glyphzone_new, tt_glyphzone_done, tt_size_init_bytecode): Updated. | ||
| 1529bc6e | 2025-06-11 07:41:01 | [truetype] Use FT_ARRAY_ZERO. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Updated. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids, tt_size_ready_bytecode): Updated. | ||
| 5ab9e5c5 | 2025-06-08 07:51:08 | [truetype] Rearrange bytecode run. This is a minor change with large code rearrangements. * src/truetype/ttinterp.c (TT_RunIns): Just loop through instructions and move all setup to... (TT_Run_Context): ... here; relocated. (Compute_Round): Replaced by simple assignment, removed. | ||
| 68c62e19 | 2025-06-07 22:15:18 | [truetype] Relocate the interpreter pointer. This reduces dereferencing when calling the interpreter. * include/freetype/internal/tttypes.h (TT_Face): Move it from here... * src/truetype/ttinterp.h (TT_ExecContext): ... to here. * src/truetype/ttobjs.c (tt_size_init_bytecode): Move its initialization * src/truetype/ttinterp.c (TT_New_Context): ... to here. (TT_Run_Context): Updated. | ||
| ecfefd8c | 2025-06-07 22:12:45 | [truetype] Clean up the loader initiation. * include/freetype/internal/tttypes.h (TT_LoaderRec): Remove unused field. * src/truetype/ttgload.c (tt_loader_init): Refactor. | ||
| 5631650b | 2025-06-07 22:09:28 | [truetype] Modify bytecode initiation. This reduces the number of function calls and data copying events. * src/truetype/ttinterp.c (TT_Goto_CodeRange): Merge into... (TT_Set_CodeRange): ... this function. (TT_Load_Context): Do not set up any zones, copy GS, or prepare the execution... (TT_Run_Context): ... do this here instead.. * src/truetype/ttinterp.c (TT_Set_CodeRange): Update signature. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Call TT_Run_Context. * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. | ||
| 70281e0f | 2025-06-07 21:59:50 | [truetype] Modify the graphics state management. Instead of restoring persistent GS variables, we only save modifications permitted by the CVT program. This reduces the context manipulations. * src/truetype/ttobjs.h (TT_GraphicsState): Reorder fields. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do not alter the context. * src/truetype/ttgload.c (TT_Hint_Glyph): Do not reset GS. (tt_loader_init): Fix potential issue in 'instruct_control' handling. * src/truetype/ttinterp.c (TT_Run_Context): Fully reset GS. (TT_Load_Conext): Rearrange and remove the 'size' check, already performed in FT_Load_Glyph. (TT_Save_Context): Save only modifiable GS parts. (tt_default_graphics_state): Updated. * src/truetype/ttinterp.h (TT_Run_Context): Update signature. | ||
| a67b2bab | 2025-06-10 12:11:41 | [gxvar] Really fix setting of named-instance to Regular. This fixes an ommission in commit cf06661c51. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize `error`. | ||
| cf06661c | 2025-05-31 15:57:41 | Fix setting of named-instance to Regular Fixes https://gitlab.freedesktop.org/freetype/freetype/-/issues/1341 And more elaborate avoidance of loading face->blend if all coords are zero. | ||
| f7fba637 | 2025-05-24 02:47:23 | [gxvar] Optimize out more bounds checking. Big win, ~20% in measured mega-var font, HarfBuzz's `benchmark-font` 'glyph_h_advances' benchmark. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Implement it in loops. | ||
| c0625140 | 2025-05-22 22:21:18 | * src/truetype/ttgload.c (load_truetype_glyph): Use `IS_DEFAULT_INSTANCE`. | ||
| f64c7db2 | 2025-05-27 06:59:16 | [gxvar] Set `doblend` to `FALSE` if at default location. * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Get_Var_Design): Do it. | ||
| fa412cf5 | 2025-05-23 15:41:26 | [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. | ||
| deef6d2a | 2025-05-26 23:16:30 | Typo. | ||
| 31d05d08 | 2025-05-26 23:13:52 | * src/truetype/ttinterp.c (TT_Load_Context): Clean up. | ||
| 86ab14e0 | 2025-05-26 08:20:21 | [gxvar] Speed up handling of deltas in `ItemVariationStore`. (2/3) Do all math in fixed integer and do a single divide at the end. Also don't use an array to read deltas; just read them as we go, and skip (branch-free) when scalar is 0. 30% speedup in measured mega-var font, HarfBuzz's `benchmark-font` 'glyph_h_advances' benchmark. | ||
| fe6854ba | 2025-05-26 08:18:00 | [gxvar] Speed up handling of deltas in `ItemVariationStore`. (1/3) * src/truetype/ttgxvar.c (ft_mul_add_delta_scalar, ft_round_and_shift16): New functions, reusing code from `ftcalc.c`. | ||
| b8444f2f | 2025-05-26 07:47:10 | [gxvar] Move scalar computation into its own function. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Split off affected code into... (tt_calculate_scalar): ...this new function. | ||
| 87501e2e | 2025-05-25 22:21:21 | [trueetype] Remove useless assignments. * src/truetype/ttobjs.c (tt_size_run_fpgm): Remove assignment that is ignored and overridden later in 'Compute_Funcs'. * src/truetype/ttinterp.c (TT_RunIns): Ditto. (Ins_MIAP): Formatting. | ||
| 75b84313 | 2025-05-23 08:03:59 | [gxvar] Optimize loading of 'gvar' table. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, ft_var_load_gvar): Use frames to reduce bounds checking. (TT_Vary_Apply_Glyph_Deltas): Better macro usage. | ||
| 702e4a1d | 2025-05-21 14:55:25 | * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix allocation. Bug was introduced in commit 582de1a4b6f. | ||
| 013adc82 | 2025-05-21 17:28:52 | * src/truetype/ttgxvar.c (ft_var_apply_tuple): Remove redundant test. This was erroneously added in commit e6e9110a8. | ||
| d7b6e947 | 2025-05-21 01:34:08 | [gxvar] Cache shared-tuple scalar values. GoogleSansFlex HB benchmark-font draw results: Before: 2.13ms After: 1.65ms Speedup: 22% * src/truetype/ttgxvar.h (GX_BlendRec): Add `tuplescalars` field. * src/truetype/ttgxvar.c (ft_var_load_gvar): Allocate `tuplescalars` array. (tt_set_mm_blend): Set its values. (TT_Vary_Apply_Glyph_Deltas): Use it. (tt_done_blend): Deallocate it. | ||
| 582de1a4 | 2025-05-20 23:09:16 | [gxvar] Reduce number of mallocs. 8% speed up in drawing GoogleSansFlex variable in HB benchmark-font. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use an allocation pool instead of individual allocations. | ||
| fd92af79 | 2025-05-20 16:55:38 | [gxvar] Another optimization in computing scalar. Another ~6% speedup in GoogleSansFlex var drawing. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Test `ncv` for being zero. | ||
| e7cc14ba | 2025-05-21 01:33:22 | [gxvar] Remove stale comment. The code *does* check against start/end! | ||
| e6e9110a | 2025-05-20 16:51:25 | * src/truetype/ttgxvar.c (ft_var_apply_tuple): Micro-optimize. | ||
| 14399c73 | 2025-05-20 16:17:00 | [gxvar] Inline two USHORT reads. Speeds up GoogleSansFlex variable glyph drawing by ~13%. Before: 2.95ms After: 2.57ms * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Do it. | ||
| 0a574d50 | 2025-05-20 15:56:05 | [gxvar] Micro-optimize loop end condition. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Do it. | ||
| dc8efeff | 2025-05-20 19:33:34 | [truetype] Don't process `mvar` metrics if default instance. GoogleSansFlex default-instance HarfBuzz benchmark-font draw: Before: 0.610ms After: 0.435ms Speedup: 28% * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `instance_index`. | ||
| 22511643 | 2025-05-20 22:18:19 | * src/truetype/ttinterp.c (Ins_MIRP,DELTAP,DELTAC): Minor. | ||
| 8b4dcd93 | 2025-05-20 17:27:43 | [truetype] Update bytecode error handling. * src/truetype/ttinterp.c (Ins_SHP,SHPIX,ALIGNRP): Return appropriate error in case of stack underflow. (Ins_IP): Ditto and remove redundant check. | ||
| 89e3e98e | 2025-05-16 13:19:26 | * src/truetype/ttinterp.c (TT_DotFix14): Silence UBSAN. | ||
| 8082aba5 | 2025-05-15 22:27:52 | * src/truetype/ttinterp.c (Ins_DELTAP): Flip if-else. | ||
| 7172bd11 | 2025-05-14 23:17:23 | [truetype] Optimize DELTAP and DELTAC. * src/truetype/ttinterp.c (Ins_DELTAP,DELTAC): Perform PPEM range- checking and manipulations outside the loop. | ||
| 8a152c82 | 2025-05-14 14:56:21 | * src/truetype/ttinterp.c (Compute_Funcs): Replace shifts. | ||
| 82891652 | 2025-05-14 12:45:53 | [truetype] Tighten code overflow checks. Fixes #1336. * src/truetype/ttinterp.c (Ins_NPUSHB,NPUSHW,PUSHB, PUSHW): Tighten conditions. | ||
| 408957dc | 2025-05-13 17:07:31 | [truetype] Finalize bytecode changes. * src/truetype/ttinterp.c: Formatting, minor. (TT_Goto_CodeRange): Initialize 'iniRange' here... (TT_RunIns): ... instead of here. * docs/CHANGES: Updated. | ||
| 2f2dfad5 | 2025-05-13 09:15:06 | [truetype] Streamline backward compatibility. The 'backward_compatibility' is only set in v40: no need to check the interpreter version again and again. In addition, we now track IUP in its lower bits. After both IUPx and IUPy have been called, 'backward_compatibility' becomes equal to 0x7. * src/truetype/ttinterp.h (TT_ExecContextRec): Wrap 'iup?_called' into 'backward_compatibility'. * src/truetype/ttinterp.c (Ins_INSTCTRL): Sync 'backward_compatibility'. (Direct_Move, Direct_Move_X/Y, Move_Zp2_Point, Ins_FLIPPT,FLIPRGON,FLIPRGOFF,SHPIX,DELTAP): Updated. (TT_RunIns): Do not mess with IUP flags. * src/truetype/ttgload.c (tt_loader_init): Set 'backward_compatibility'. (TT_Hint_Glyph): Updated. | ||
| 4792cff5 | 2025-05-08 20:41:00 | [truetype] Optimize bytecode movements. Replacing FT_MulDiv with FT_MulFix gives large performance gains. * src/truetype/ttinterp.h (TT_ExecContextRec): Store "projected" freedom vector. * src/truetype/ttinterp.c (Compute_Funcs): Compute "projected" freedom vector. (Direct_Move, Direct_Move_Orig, Compute_Point_displacement): Use it. | ||
| 55e60b9f | 2025-05-08 20:39:29 | [truetype] Simplify stack access. * src/truetype/ttinterp.c (Ins_MINDEX,CINDEX): Use local stack pointers. (Ins_DELTAP,DELTAC): Ditto; limit the number of pairs before looping. | ||
| c71b9dad | 2025-05-07 22:41:25 | [truetype] Tweak bytecode looping. * src/truetype/ttinterp.c (Ins_FLIPPT,SHP,SHPIX,IP,ALIGNRP): Handle counters and stack locally. (TT_RunIns): Updated. | ||
| 8c04ecd8 | 2025-05-02 21:10:08 | [truetype] Tweak bytecode initiation. * src/truetype/ttinterp.c (TT_Load_Context): Init stack tops. * src/truetype/ttinterp.h (TT_ExecContextRec): Document it and clean. * src/truetype/ttobjs.c (tt_size_run_prep,fpgm): Updated. * src/truetype/ttgload.c (tt_loader_init): Minor. | ||
| c3a55135 | 2025-05-02 20:15:50 | [truetype] Modify stack handling. * src/truetype/ttinterp.c (Ins_GETVARIATION): Increment stack. (Ins_NPUSHB,NPUSHW,PUSHB,PUSHW): Handle the code stack here, ... (TT_RunIns): ... instead of here. Consolidate error handling. (SkipCode): Remove preemptive check. | ||
| b0febf5d | 2025-05-02 19:45:14 | [truetype] Modify bytecode steps. * src/truetype/ttinterp.h (TT_Exec_ContextRec): Remove 'step_ins'. * src/truetype/ttinterp.c (TT_RunIns, Ins_Goto_CodeRange, Ins_JMPR,ENDF,PUSHW,NPUSHW): Set and use zero increment 'length' instead. (Ins_CALL,LOOPCALL,UNKNOWN): Updated. | ||
| 35513a4d | 2025-05-07 18:53:21 | * src/truetype/ttinterp.c (TT_DotFix14): Silence UBSAN. | ||
| 66e0d25e | 2025-04-17 15:37:27 | * src/truetype/ttinterp.c (TT_MulFix14,TT_DotFix14)[!FT_INT64]: Sync. | ||
| 9eecaa07 | 2025-04-17 12:44:37 | * src/truetype/ttinterp.c (TT_DotFix14): Silence UBSAN. | ||
| ccabe7ac | 2025-04-15 18:49:36 | [base, truetype] Silence UBSAN (cont'd). * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Use MUL_INT64. * include/freetype/internal/ftcalc.c (FT_MulFix): Ditto. | ||
| 58b3598c | 2025-04-12 09:18:16 | Typos in macros. * include/freetype/internal/ftcalc.h: s/_M_X86/_M_IX86/. * src/truetype/ttinterp.c: s/_M_X86/_M_IX86/. | ||
| c88bf8a2 | 2025-04-11 22:58:26 | [base, truetype] Silence UBSAN. * src/truetype/ttinterp.c (TT_MulFix14_64): Use unsigned multiplication. * include/freetype/internal/ftcalc.h (FT_MulFix_64): Ditto. | ||
| fb99fd63 | 2025-04-11 22:57:27 | [base, truetype] Synchronize MulFix assembly. * include/freetype/internal/ftcalc.h (FT_MulFix_*), src/truetype/ttinterp.c (TT_MulFix14_*): Synchronize routines. | ||
| 91753736 | 2025-04-10 19:58:48 | [truetype] Modernize bytecode projections. With 64-bit platforms widely available, it is more efficient to use 64-bit variables readily. It results in noticeable 10% improvement in glyph loading speed. * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14) [FT_INT64]: Prioritize available implementation with arguments adjusted based on the use cases. | ||
| a059b237 | 2025-01-19 22:39:17 | * src/truetype/ttgxvar.c (tt_face_vary_cvt): Fix all shared values. Applying cvar deltas to all shared points was incorrectly omitted. Fixes #1314. | ||
| 81330e1f | 2025-01-03 22:54:20 | * src/truetype/ttgload.c (TT_Load_Glyph): Consolidate flag setting. | ||
| 5245fd69 | 2025-01-03 21:26:10 | Delay FT_GLYPH_FORMAT_OUTLINE assignmets. This assignmets used to be done prematurely before errors were checked and outlines were actually loaded. Delaying the assignment provides certain protection against careless usage of malformed input that should now remain FT_GLYPH_FORMAT_NONE. * src/cff/cffgload.c (cff_slot_load): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Ditto. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. | ||
| 64f8b7fb | 2025-01-02 18:22:24 | Remove superfluous outline zeroing. This is already done by `ft_glyphslot_clear`. * src/cff/cffgload.c (cff_slot_load): Do not zero outline fields. * src/cid/cidgload.c (cid_slot_load_glyph: Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Ditto. * src/truetype/ttgload.c (load_sbit_image): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. | ||
| 10b3b14d | 2025-01-01 23:04:14 | * src/truetype/ttobjs.c: Abbreviate tracing. | ||
| abed051e | 2025-01-01 14:40:58 | [truetype] Consolidate bitmap strike handling. * src/truetype/ttgload.c (TT_Load_Glyph): Relocate omitted whitespace strike handling from here... (load_sbit_image): ... to here. | ||
| 4ef8eed1 | 2024-12-31 16:25:50 | [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. | ||
| f02bffad | 2024-10-14 11:47:31 | * src/truetype/ttgload.c (load_truetype_glyph): Rearrange. | ||
| ed8b82ba | 2024-08-08 10:28:05 | Various minor documentation or formatting fixes. | ||
| 1f72a120 | 2024-08-05 13:05:51 | * src/truetype/ttgxvar.c (ft_var_readpacked*): Minor. | ||
| 7c75b8a7 | 2024-08-01 19:14:44 | [truetype/GX] Use more robust conditions. * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Rewrite conditions to avoid undefined behavior. | ||
| 5e116bb0 | 2024-07-30 21:51:51 | [truetype/GX] Read points and deltas more carefully. Hopefully fixes newly introduced buffer overflows: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70807 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70809 * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Explicitly check stream frame limits and modify run counting. | ||
| 104f8544 | 2024-07-29 20:26:00 | [truetype/GX] Read stream more aggressively. With ample checks against the table size, we should be able to use macros without the limit checks and functional calls. * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Use FT_NEXT_* instead of FT_GET_*. | ||
| 1452355d | 2024-07-18 09:31:19 | * src/truetype/ttobjs.c (tt_size_run_prep): Correct scaling of CVT values. This reverts the scaling behaviour introduced in commit 37580053. Fixes issue #1005. | ||
| 73720c7c | 2024-06-23 10:58:00 | * src/truetype/ttgload.c (load_truetype_glyph): Unsigned fix. | ||
| 044d142b | 2024-06-20 22:16:51 | Use unsigned tags `FT_Outline`. This change comes along with 2a7bb4596f56 ans is only meant to reduce pointer casting in the code. * include/freetype/ftimage.h (FT_Outline): Do it. * src/*: Update `FT_Outline` users. | ||
| b1cbcb20 | 2024-06-20 15:00:20 | [ttgxvar] Avoid "applying zero offset to null pointer" In C it is undefined behavior to do arithmetic on a null pointer, including adding zero. When using NotoSansKhmer[wdth,wght].ttf UBSAN produces a report like ttgxvar.c:1052:31: runtime error: applying zero offset to null pointer when adding zero to `varData->deltaSet` (which is null) to produce `bytes`. Protect against all the potential issues of this kind by returning early if `varData->regionIdxCount == 0`. * src/truetype/ttgxvar.c (tt_var_get_item_delta): early return on no regions | ||
| 2a7bb459 | 2024-06-20 20:49:56 | Use unsigned point and contour indexing in `FT_Outline`. This doubles the number or allowed points, see https://github.com/harfbuzz/harfbuzz/issues/4752 Although it is hardly practical to use more than 32767 points, other font engines seem to support it. * docs/CHANGES: Announce it. * include/freetype/ftimage.h (FT_Outline): Do it and update limits. * src/*: Update `FT_Outline` users. | ||
| d41a855a | 2024-05-29 17:01:29 | [ttgxvar] Replace tabs with spaces Also clarify comments around conversion and clamping. * src/truetype/ttgxvar.c (ft_var_to_normalized): doit | ||
| 7ff43d3e | 2024-05-26 19:40:20 | [truetype/GX] Consolidate memory allocations. * src/truetype/ttgxvar.c (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Allocate and split bigger memory blocks, avoid unnecessary zeroing, do not copy shared tuples, revise error exit paths. | ||
| 3416ac16 | 2024-05-26 08:10:21 | Whitespace. | ||
| b6dbbd96 | 2024-05-24 17:38:14 | * src/truetype/ttgxvar.c (ft_var_apply_tuple): Reduce checks. | ||
| 70299c92 | 2024-05-23 22:50:32 | Revert "[truetype] Reduce allocation scope." This reverts commit 9ff4153cbfd60491f11bb56905ce6e20e94d23c7. | ||
| 9ff4153c | 2024-05-22 23:38:34 | [truetype] Reduce allocation scope. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Reduce scope of `points_org` and 'points_out`. | ||
| 5f131cfd | 2024-05-21 16:24:43 | [cff, truetype] Validate variation axes immediately. Instead of validating variation axes in every access, OpenType specs suggest that peak = 0 be used to tag invalid ranges. This implements just that once during loading. * src/cff/cffload.c (cff_blend_build_vector): Move the range checks... (cff_vstore_load): ... here. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Ditto... (tt_var_load_item_variation_store): ... ditto. | ||
| 99be2b31 | 2024-05-21 18:26:09 | [cff, truetype] Rearrange variation range checks. This should achieve quicker results for common cases. * src/cff/cffload.c (cff_blend_build_vector): Rearrange conditionals. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Ditto. | ||
| 347276c1 | 2024-05-21 13:12:45 | * src/truetype/ttgxvar.c (tt_var_get_item_delta): Align with specs. | ||
| 39f2fbf8 | 2024-05-20 22:47:14 | * src/truetype/ttgxvar.c (tt_var_get_item_delta): Minor refactoring. | ||
| d7cf931a | 2024-05-19 22:48:13 | [truetype, type1] Use FT_DUP to duplicate data. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use concise FT_DUP. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ditto. * src/type1/t1load.c (parse_subrs): Ditto. | ||
| 4d504684 | 2024-05-01 23:19:31 | [sfnt] Use faster macros in checksums. * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Use FT_NEXT_XXX. * src/sfnt/sfwoff2.c (compute_ULong_sum): Use macros. |