Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| bbc445e1 | 2025-01-11 23:11:07 | [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. | ||
| 4433c7b7 | 2025-01-11 18:54:04 | * src/bdf/bdflib.c (a2i): Formatting. | ||
| ff5872b4 | 2025-01-10 22:55:13 | * src/bdf/bdflib.c (bdf_parse_*_): Minor improvements. | ||
| cf451e5f | 2025-01-10 22:31:07 | * src/bdf/bdf.h (bdf_font_t): Correct `internal` type. * src/bdf/bdflib.c (*): Update users. | ||
| 1f57020f | 2025-01-10 03:23:41 | * src/bdf/bdflib.c (bdf_parse_start_): Fix tracing labels. | ||
| 73318c86 | 2025-01-08 15:45:32 | [cff] Remove size/slot checks. After the previous commit, cff_glyph_load is no longer called without first checking for valid size and glyph objects in FT_Glyph_Load and these checks can be removed downstream. * src/cff/cffdrivr.c (cff_glyph_load): Remove `size` and `glyph` checks. * src/cff/cffgload.c (cff_slot_load): Ditto. | ||
| c7a255b4 | 2025-01-07 19:52:29 | * src/cff/cffdrivr.c (cff_get_advances): Do only fast advances. Otherwise, let TT_Get_Advances fall back on cff_load_glyph to do slow advances. This avoids unchecked access to cff_load_glyph and this is how tt_get_advances is implemented. | ||
| 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. | ||
| 1beb83fd | 2025-01-01 22:28:36 | * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Refactor `flip`. | ||
| 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. | ||
| 38272bf8 | 2024-12-16 14:29:36 | [ftstroke] Fix invalid pointer assignement to `arc` In `FT_Stroker_ConicTo` and `FT_Stroker_CubicTo` there is a `bez_stack`. `arc` is initialized with `arc = bez_stack` and is never set to point into any different object. The main loop looks like `while ( arc >= bez_stack )` which is depending on a later `arc -= 2` (or `arc -= 3`) to make `arc` point to before `bez_stack`. However, using pointer subtraction to make `arc` point outside the array is undefined behavior, and attempting to use the value in the loop predicate is "very" undefined behavior. (C99 "Additive operators" 6.5.6.8.) This particular undefined behavior was discovered as either hangs or MemorySantizer issues after "[InstCombine] Infer nuw for gep inbounds from base of object" [0]. With this change, clang can infer that `arc` must always point into the `bez_stack` object and therefore cannot be at a "negative index" so the predicate is always true. [0] https://github.com/llvm/llvm-project/commit/e21ab4d16b555c28ded307571d138f594f33e325 * src/base/ftstroke.c (FT_Stroker_ConicTo, FT_Stroker_CubicTo): test loop exit condition (there are no more arcs to process) before decrementing `arc` Fixes: #1307 | ||
| 59320b2d | 2024-12-04 16:55:10 | [cff] Fix leak of cmap data When `sfnt->load_face` succeeds it has already loaded any (optional) cmap data. As a result, a subsequent call to `sfnt->load_cmap` will overwrite the cmap data pointer with a new copy of the data but not free the old, leading to a leak. This is a fix for "* src/cff/cffobjs.c (cff_face_init): Better handling of Type0 fonts.". This still allows the cmap to be missing but avoids the leak by only calling `sfnt->load_cmap` when there is no `head` table (the font data is not being loaded as OpenType/CFF). * src/cff/cffobjs.c (cff_face_init): Fix leak Fixes: #1306 | ||
| 3f3e3de3 | 2024-11-06 06:28:41 | * src/cff/cffobjs.c (cff_face_init): Better handling of Type0 fonts. This issue relates to the PDF specification and its usage of CFF-based embedded Type0 fonts. For Type0 fonts containing CID-keyed descendant CFF-based fonts, the glyph index is the CID present in the content stream. As a result, there is no requirement for a 'cmap' table to be present in the font since the glyph indices are derived directly from the CIDs. FreeType throws an error when it doesn’t find a 'cmap' table for such an Open Type font containing CFF outlines. This commit relaxes this requirement for a 'cmap' table for such fonts. | ||
| 13944366 | 2024-10-15 18:07:55 | Move generic destroy to later in the face and size destruction. * src/base/ftobjs.c (destroy_size, destroy_face): This is such that the generic destroy can be used to call `FT_Done_Library`. For that to work, it needs to call it *after* having removed the face from the respective module. | ||
| f02bffad | 2024-10-14 11:47:31 | * src/truetype/ttgload.c (load_truetype_glyph): Rearrange. | ||
| 089ccb1b | 2024-10-13 12:14:43 | * src/smooth/ftgrays.c (gray_convert_glyph): Clear stack pointers. Fixes a dangling pointer warning, see #1299. | ||
| 5f20c892 | 2024-10-13 10:20:42 | apinames: Fix a buffer overrun for VMS platform. Some output formats may rewrite symbol names during the output, like the concatenation of "64__" suffix on VMS. To estimate sufficient size to store symbol name, pass the output format info to `names_add`. For VMS, `names_add` allocates longer buffer to append "64__". * apinames.c (SUFFIX_VMS_64ADDR): New macro of "64__". (main): Pass the format info to `read_header_file`. (read_header_file): Pass the format info to `names_add`. (names_add): Receive the format info, and reserve the symbol name buffer 4 byte longer in the case of VMS, to append the suffix in `names_dump`. | ||
| 26b545f3 | 2024-10-13 11:09:40 | apinames: Fix out-of-scope reference of a static array. * apinames.c (names_dump): For WATCOM_LBC format, the DLL name with no suffix is constructed on a static array temp[], but the scope is closed before use it. The declaration of temp[] is moved to the wider scope for the dumping part to refer it. | ||
| 0dd4eef6 | 2024-10-10 15:56:22 | Fix help message of apinames. * src/tools/apinames.c: The first header file must be given after the options. All arguments after the first header file are dealt as header files to be parsed, regardless with their leading "-". For example, "apinames include/freetype/freetype.h -dFREETYPE.DLL" warns "unable to open -dFREETYPE.DLL". Thus, the "header1" must be given after the arguments to be parsed as the options. | ||
| 83af801b | 2024-09-07 13:44:57 | * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Respect metrics_only. Also fixes recursive flip. | ||
| 30080320 | 2024-09-06 13:43:47 | * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Tweak loop. | ||
| 98283cb3 | 2024-09-06 17:03:58 | [sfnt] Support sbix graphicType 'flip'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Currently undocumented by Apple, this flips the bitmap data horizontally. It is used on macOS in Apple Color Emoji; 19.4d6e1; 2024-02-05 (file `Apple Color Emoji.ttc`). Fixes issue #1282. | ||
| d2612e1c | 2024-08-26 07:01:19 | * src/sfnt/ttcmap.c (tt_cmap*_get_info): Remove casting. | ||
| f92c9655 | 2024-08-13 23:29:13 | Fix various typos. | ||
| 42608f77 | 2024-08-11 20:30:23 | * 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. | ||
| 6b992aaa | 2024-08-11 19:44:13 | * src/*/*: Fix C++ compilation; fix clang warnings. | ||
| 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. | ||
| e181911d | 2024-08-05 13:02:04 | * src/base/ftstream.c (FT_Stream_ReadFields): Switch to `FT_Offset`. | ||
| a48cddde | 2024-08-01 21:15:46 | * src/winfonts/winfnt.c (fnt_face_get_dll_font): Unwrap arithmetic. | ||
| 72e199e8 | 2024-08-01 21:12:41 | * src/base/ftstream.c (FT_Stream_ReadFields): Update condition. | ||
| 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_*. | ||
| 3f8edd23 | 2024-07-28 20:56:07 | * src/sfnt/ttload.c (tt_face_load_name): Shorten dereference. | ||
| d42bffd4 | 2024-07-28 20:32:41 | * src/autofit/afmodule.c (af_autofitter_load_glyph): Shorten deref. | ||
| 24888540 | 2024-07-28 19:42:49 | [bdf,pcf,winfonts,sfnt] Remove barely used marcros. * include/freetype/internal/ftobjs.h (FT_FACE_SIZE, FT_SIZE_FACE): Removed. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): Ditto. | ||
| 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. | ||
| 37cefe33 | 2024-06-13 12:01:54 | * psobjs.c (ps_table_add): Check length before calling `FT_MEM_CPY`. Fixes issue #1280. | ||
| bab9564a | 2024-06-26 05:39:11 | Make 'multi' build work again. * src/psaux/psobjs.c: Include `psft.h`. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttgpos.c`. Fixes issue #1284. | ||
| 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. | ||
| 2b9fdec5 | 2024-06-19 21:38:58 | * src/pfr/pfrgload.c (pfr_glyph_curve_to): Avoid casting. | ||
| 7a753c96 | 2024-06-18 21:14:58 | * src/base/ftgloadr.c (FT_GlyphLoader_Prepare): Minor refactoring. | ||
| 93a067e3 | 2024-06-18 17:48:41 | [base, autofit, psaux] Remove unnecessary casting. * src/autofit/afhints.c (af_glyph_hints_reload): Remove (short) casting. * src/base/ftgloadr.c (FT_GlyphLoader_Add): Ditto. * src/psaux/psobjs.c ({t1,cff,ps}_builder_{add,close}_contour): Ditto. | ||
| 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. | ||
| 4ccdc9f9 | 2024-05-20 18:53:57 | [cff] Optimize the blend vector computations. * src/cff/cffload.c (cff_blend_build_vector): Use FT_MulDiv and skip multiplying by 1. | ||
| b25265fe | 2024-05-19 22:58:23 | [bdf] Use concise macros. * src/bdf/bdflib.c (bdf_create_property): Use FT_STRDUP. (bdf_parse_glyphs_, bdf_parse_start_): Use FT_DUP for brevity. | ||
| 026fd5d4 | 2024-05-19 22:54:57 | [cache] Use FT_DUP to duplicate data. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Use concise FT_MEM_DUP. | ||
| 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. | ||
| b8db8197 | 2024-05-12 22:38:38 | [type1/MM] Safer handle arrays of different types. * src/type1/t1load.c (parse_blend_design_map): Separately allocate... (T1_Done_Blend): ... and free `design_points` and `blend_points`. | ||
| 5b1cde80 | 2024-05-11 23:27:34 | * src/type1/t1load.c (parse_blend_design_map): Add risky cast. | ||
| b875924a | 2024-05-10 23:01:23 | * src/pshinter/pshrec.c (ps_hints_stem): Correct argument. | ||
| 5858fa16 | 2024-05-07 18:19:58 | [colr] Avoid overflow in range checks In 32 bit builds `FT_ULong` is 32 bits and can silently overflow when a large number is read into one and then it is summed or multiplied with another number. Checks for range overflow must be written so that they themselves do not overflow. Also ensure that the table_size is always the first part of the range check and consistently use `<` or `<=`. * src/sfnt/ttcolr.c (tt_face_load_colr): Avoid overflow. (find_base_glyph_v1_record): Remove old work-around. Bug: https://issues.chromium.org/issues/41495455 Bug: https://issues.chromium.org/issues/40945818 | ||
| d0e3239f | 2024-05-06 13:39:06 | [sdf, bsdf] Use shared FT_SqrtFixed. FT_SqrtFixed (95b0fe2a6dff) is faster and does not overflow. * src/sdf/ftsdfcommin.h (square_root): Replace with a macro. * src/sdf/ftsdfcommin.c (square_root): Remove function. | ||
| 2edfd7e1 | 2024-05-04 16:42:47 | * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Remove FT_ABS. See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68679 | ||
| 7bd887f1 | 2024-05-03 16:04:35 | * src/sfnt/sfwoff2.c (woff2_open_font): Fix copy-paste typo. | ||
| 3f28a6b6 | 2024-05-03 15:44:57 | [woff,woff2] Limit the number of tables and use FT_MSB. The upper limit of 4095 is implied by the SFNT header format where the multiplication by 16 would overflow without it. * src/sfnt/sfwoff.c (woff_open_font): Updated. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. | ||
| 13d1180f | 2024-05-02 13:16:46 | [woff2] Disallow zero table font entries The existing code already disallows zero table woff2 overall, but still allows for individual CollectionFontEntry to create font instances with zero tables. Such fonts are not useful so error early. This also fixes an MSAN discovered issue where if a CollectionFontEntry numTables is zero then the sfnt_header was not fully initialized. * src/sfnt/sfwoff2.c (woff2_open_font): error on zero tables, always initalize sfnt_header Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68384 | ||
| 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. | ||
| 13da9042 | 2024-05-01 00:34:21 | * src/sfnt/sfwoff2.c (compute_ULong_sum): Clean up. | ||
| 5962d3c1 | 2024-04-29 22:34:09 | * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Remove nodes instantly. | ||
| a209e1ad | 2024-04-29 17:54:30 | [cache] Remove unused `node_reset`. * src/cache/ftcmru.h (FTC_MruListClassRec): Remove `node_reset` field. * src/cache/ftcbasic.c (ftc_basic_{image,sbit}_family_class): Ditto. * src/cache/ftcmanag.c (ftc_face_list_class): Ditto. (ftc_size_node_reset): Remove function. * src/cache/ftcglyph.h: Fix comment. | ||
| f8f0d1a1 | 2024-04-29 16:58:59 | * src/cache/ftcmru.c (FTC_MruList_New): Do not reset nodes. Resetting of the size nodes can crash, if a parent face purge happens simultaneously and destroys the node. It is safer to create a new node. Fixes #1270, reopened with a separate issue. | ||
| 1168b1b5 | 2024-04-27 20:44:01 | * src/cache/ftcimage.c (ftc_inode_weight): Formatting. | ||
| 982bc838 | 2024-04-21 15:53:05 | [cache] Minor tweaks. * src/cache/ftcimage.c (ftc_inode_free): Remove unnecessary check. * src/cache/ftcmanag.c (FTC_Manager_Done): Do not zero before freeing. | ||
| 5a3bfa92 | 2024-04-20 23:28:17 | * src/cache/ftcbasic.c: Cosmetic harmonization. | ||
| 23e1d645 | 2024-04-20 12:01:58 | [cache] Reduce type mismatches. * src/cache/ftcbasic.c (FTC_BasicAttrRec): Match type of `load_flags` to its main purpose in `FT_Load_Glyph`. (FTC_ImageCache_Lookup{,Scaler},FTC_SBitCache_Lookup{,Scaler}): Updated. | ||
| 9a2d6d97 | 2024-04-19 14:45:39 | * src/cache/{ftcbasic.c,ftccmap.c}: Use FTC_INLINE. | ||
| dbdcd758 | 2024-04-19 14:02:43 | [cache] Tweak headers. * src/cache/ftccback.h: Include less and move `ftc_node_destroy`... * src/cache/ftccache.h: ... to here. * src/cache/ftcmanag.c: Include less. | ||
| db83e9c0 | 2024-04-18 23:23:13 | * src/cache/ftcglyph.c [!FTC_INLINE]: Fix compilation. | ||
| 12adfc21 | 2024-04-17 15:07:23 | [cache] Improve MRU list management. * src/cache/ftcmru.c (FTC_MruList_Remove): Cosmetic. (FTC_MruList_New): Accept only valid changes. * src/cache/ftcmanag.c (ftc_size_node_done): Simplify. | ||
| d091bca5 | 2024-04-17 00:33:14 | [cache] Fix error handling. Manipulate the cache after a face is requested or a size is looked up successfully. Fixes #1270. * src/cache/ftcmanag.c (ftc_size_node_init, ftc_size_node_reset, ftc_face_node_init): Check for errors before accepting a change. * src/cache/ftcmru.c (FTC_MruList_New): Do nothing if reset fails. | ||
| b3a6a20a | 2024-04-14 15:37:57 | [smooth] Switch to vertical bisections. With horizontal bisections, the smallest section is a whole single scanline. Almost horizontal lines or other complex scanlines can easily overflow the rendering pool. Switching to vertical bisections splits the scanlines and should rule out the overflows. Fixes #1269. * src/smooth/ftgrays.c (gray_convert_glyph): Bisect vertically. | ||
| fff58f54 | 2024-04-14 15:12:31 | * src/smooth/ftgrays.c (gray_convert_glyph): Refactor for convenience. | ||
| 674d629b | 2024-04-14 13:06:01 | [smooth] Store persistent clipping box. * src/smooth/ftgrays.c (gray_TWorker, gray_raster_render): Add and set the new structure field. (gray_convert_glyph): Use it. | ||
| f42ce255 | 2024-03-08 14:55:12 | [colr] Ensure enough bytes for PaintColrLayers * src/sfnt/ttcolr.c (read_paint): check that there are five additional bytes to be read when reading PaintColrLayers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66566 | ||
| 17545d4b | 2024-03-01 11:16:48 | Avoid n^2 scanning for binary data. When creating a CID parser the location of the 'StartData' or '/sfnts' tokens needs to be known. However, the token parser requires that the entire document be in memory and flattening the entire stream into memory is to be avoided. To avoid forcing the entire stream into memory, previously this code would scan through the stream looking for 'StartData' or '/sfnts' as strings. However, these strings could have been in a comment or string token, so the stream would be read into memory up to that point and the parser run to check that these strings were actually tokens. This forced a parser restart from the beginning each time; as a result, data with many 'StartData' non-tokens would take n^2 time to check. * src/cid/cidparse.c (cid_parser_new): Change algorithm to make the initial scan look for the last possible 'StartData' or '/sfnts' string in the stream. The stream is read forward instead of backward as a typical normal CID font will have one 'StartData' toward the beginning of the data and it it much faster to read the data from beginning to end instead of end to beginning. For memory-based fonts the limit is set to the end of the stream since the stream is already in memory. Then the parser is run once to look for 'StartData' or '/sfnts' tokens. If they are found the parser is re-set to reflect this new information. Reported as https://issues.chromium.org/issues/40201695 | ||
| 2a790a9f | 2024-02-28 17:45:19 | [cff, truetype] Always set up default variable instance. For default variable instances `cff_face_init` did not set the blend. This mostly worked as later use of the unset blend produced the default variation. However, if a user called `TT_Get_MM_Var` the blend would be partially set up, but not fully. In particular the number of axes, the axis definitions, and the instance locations would be set up, but not the current instance location (`coords` and `normalizedcoords`). This could lead to the default instances of CFF2 fonts erroring on any use of `blend`. Ensure the default variable instance is fully set up by always calling `FT_Set_Named_Instance` on a variable face. * src/cff/cffobjs.c (cff_face_init): Call `FT_Set_Named_Instance` on default instances. * src/truetype/ttobjs.c (tt_face_init): Ditto. Fixes #1268. | ||
| 546237e1 | 2024-02-23 11:55:53 | * src/truetype/ttgxvar.c (ft_var_to_normalized): Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66543 | ||
| 47574f7e | 2024-01-27 11:11:22 | Update all copyright notices. | ||
| 4f0256c1 | 2024-01-27 10:47:10 | * src/sfnt/ttgpos.c (tt_gpos_get_glyph_class): Fix warning C4018. | ||
| 8f286c86 | 2024-01-19 16:42:48 | Add support for kerning from 'GPOS' tables. This commit adds support for kerning from 'GPOS' tables, while maintaining support for basic 'kern' tables. `FT_HAS_KERNING` will be true for a font with either available and `FT_Get_Kerning` will still use the basic 'kern' table data if avilable, otherwise check the GPOS 'kern' feature. This feature is disabled by default; it can be enabled with the `TT_CONFIG_OPTION_GPOS_KERNING` flag. Only basic kerning (pair positioning with just an x advance) is supported from the GPOS layout features; support for that was added to make the existing `FT_Get_Kerning` API more consistently functional. FreeType does not intend to extend itself to further GPOS functionality though; a higher-level library like HarfBuzz can be used instead for that. * include/freetype/config/ftoption.h, include/devel/ftoption.h (TT_CONFIG_OPTION_GPOS_KERNING): New configuration option. * include/freetype/internal/fttrace.h: Add `ttgpos` trace handler. * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_gpos` and `get_gpos_kerning` fields. (FT_DEFINE_SFNT_INTERFACE): Updated. * include/freetype/internal/tttypes.h: Include `fttypes.h`. (TT_FaceRec) [TT_CONFIG_OPTION_GPOS_KERNING]: Add `gpos_table` and `gpos_kerning_available` fields. * src/sfnt/ttgpos.c, src/sfnt/ttgpos.h: New files. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_interface): Updated. * src/sfnt/sfnt.c: Include `ttgpos.c`. * src/sfnt/sfobjs.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_load_face) [TT_CONFIG_OPTION_GPOS_KERNING]: Load and free GPOS kerning data; check GPOS kerning availability. * src/truetype/ttdriver.c (tt_get_kerning): Use GPOS kerning if there's no 'kern' table. | ||
| 57617782 | 2024-01-14 13:03:51 | [smooth] Remove SSE2. As a result of 7b308a29dd10, the regular 64-bit execution is now faster than SSE2. The rendering speed of script fonts at 64 ppem or larger is improved by about 3% without SSE2. See !314 for the testing results. * src/smooth/ftgrays.c (gray_render_conic)[FT_INT64]: Remove SSE2 code. | ||
| 7bac4d14 | 2024-01-08 20:25:31 | * src/sfnt/ttcolr.c (find_base_glyph_v1_record): Fix build in C90 mode. |