kc3-lang/freetype

Branch :


Log

Author Commit Date CI Message
920c5502 2023-08-25 19:51:30 * Version 2.13.2 released. ========================== Tag sources with `VER-2-13-2'. * docs/VERSION.TXT: Add entry for version 2.13.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.13.1/2.13.2/, s/2131/2132/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * builds/unix/configure.raw (version_info): Set to 26:1:20. * CMakeLists.txt (VERSION_PATCH): Set to 2.
0c817334 2023-08-25 17:57:47 * src/base/ftcalc.c (FT_MulAddFix): Simplify 32-bit rounding.
d42679b9 2023-08-25 18:05:01 Fix clang warnings. * src/cffload.c (cff_blend_doBlend): Fix type of `sum`. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Fix type of `word_delta_count`.
aa5f0018 2023-08-24 20:46:48 * subprojects/*.wrap: Updated.
e3ada2f7 2023-08-21 14:33:24 builds/unix/configure.raw: Use variable to specify minimum Python version.
00b07598 2023-08-24 08:13:18 * builds/toplevel.mk: Simplify version extraction.
97251fd5 2023-08-21 23:23:22 [base] Improve the matrix degeneracy check. Also fixes #1251. * src/base/ftcalc.c (FT_Matrix_Check): To avoid overflow, scale by shifting. * include/freetype/internal/ftcalc.h (FT_Matrix_Check): Update description.
a3f44aad 2023-08-22 12:20:56 builds/toplevel.mk: Don't use `\#` in functions. The behaviour changed in GNU make 4.3, where `#` (without the backslash) would be necessary. Using a variable instead the code works with both older and newer GNU make versions. Fixes #1252.
e907eef6 2023-08-19 22:02:14 builds/freetype.mk: Invoke `mkdocs` as a Python module FreeType's `refdoc` target currently allows users to override the default Python path, which is useful for testing and development. In contrast, `mkdocs` is invoked via the default Python path. Invoking `mkdocs` via Python's module syntax allows for greater flexibility, although there is no change for the default use case.
a9793fea 2023-08-15 11:30:26 [base] Avoid UB with memcpy `FT_NEW_ARRAY(p, 0)` sets `p` to `NULL`. `FT_Stream_ReadAt` with a memory based stream uses `FT_MEM_COPY` which is `memcpy` which specifies that it is undefined behavior for either the `src` or `dst` to be `NULL`. Instead of forcing all callers work around calling `FT_Stream_Read` when `buffer == NULL && count == 0` do the check in `FT_StreamRead`. This allows any call with `count == 0` to succesfully read zero bytes without UB. * src/base/ftstream.c (FT_Stream_ReadAt): skip `FT_MEM_COPY` when `count == 0`. (FT_Stream_TryRead): ditto Fixes: #1250
a20de84e 2023-08-12 11:47:41 Fix warnings in tracing messages for 32bit compilation. Since we now require C99, use `%td` for `ptrdiff_t` and `%zu` for `size_t`.
3829fdaa 2023-08-04 11:41:23 Avoid overflow in COLR bounds checks. The values read into `base_glyphs_offset_v1` and `layer_offset_v1` may be in the range 0xFFFFFFFD-0xFFFFFFFF. On systems where `unsigned long` is 32 bits adding 4 to such values will wrap and pass bounds checks but accessing values at such offsets will be out of bounds. On the other hand `table_size` has already been tested to be at least `COLRV1_HEADER_SIZE` (34) so it is safe to subtract 4 from it. * src/sfnt/ttcolr.c (tt_face_load_colr): subtract 4 from `table_size` instead of adding 4 to font data offsets in bounds checks Fixes: https://crbug.com/1469348
95a87208 2023-08-01 22:48:31 * src/base/ftobjs.c (open_face_from_buffer): Silence `maybe-uninitialized`. We never call this function without a `driver_name` (#1245).
b2584c73 2023-07-28 22:35:58 [truetype] Reduce v40 footprint. * src/truetype/ttgload.c (TT_HInt_Glyph, tt_loader_set_pp, tt_loader_init): Refactor code.
1ecfd219 2023-07-27 16:12:28 [truetype] Remove Infinality for good (remaining bits). * src/truetype/ttobjs.h: Remove remaining fields. * src/truetype/ttinterp.c: Do not initialize them. * include/freetype/internal/tttypes.h: Remove descriptions.
5b7e45ac 2023-07-27 15:06:38 [truetype] Remove Infinality for good. Remove everything `#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY`, which was undefined for a while now. * include/freetype/internal/tttypes.h: Ditto. * src/truetype/truetype.c: Ditto. * src/truetype/ttdriver.c: Ditto. * src/truetype/ttgload.c: Ditto. * src/truetype/ttinterp.c: Ditto. * src/truetype/ttinterp.h: Ditto. * src/truetype/ttobjs.c: Ditto. * src/truetype/ttsubpix.[ch]: Remove files. * src/truetype/rules.mk: Don't mention "ttsubpix.c".
9e3c5d7e 2023-07-21 21:36:57 * vms_make.com: Provide separate library compiled with C++. Some types on OpenVMS x86_64 (for example, `long') have different sizes depending on whether compiled with either C or C++. In particular, X-Windows applications crash if linked with the C++ version. This patch makes `vms_make.com` create a second version of the FreeType library compiled with C++ if OpenVMS is running on the x86_64 platform.
f7ae7e88 2023-07-21 21:33:20 * vms_make.com: Fix typos.
7c542d02 2023-07-21 21:31:28 * src/smooth/ftgrays.c (FT_SSE2): Fix definition for VMS.
5769f13a 2023-07-19 13:37:48 vms_make.com: Make use of additional libraries optional. Check whether `.olb` files are present. Also check for the HarfBuzz library.
e8aa5af9 2023-07-19 13:34:45 vms_make.com: Add `/warn=noinfo` to `CFLAGS`. This reduces enormously the informationals while compiling on x86_64 (i.e., which `.h` file is inluded form where).
dd3c9c5f 2023-07-18 13:25:57 [woff2] Clean up on large brotli expansion * src/sfnt/sfwoff2.c (woff2_open_font): set error and goto cleanup Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60711
336503df 2023-07-16 07:36:01 [woff2] Avoid allocation bomb. This is a fix for commit 85167dbd5, reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60615 * src/sfnt/sfwoff2.c (MAX_SFNT_SIZE): New macro. (woff2_open_font): Use it to limit the maximum size of an uncompressed WOFF2 font.
3c92e7bf 2023-07-14 18:58:55 [cff] Fix compiler warning. * src/cff/cffparse.c, src/cff/cffparse.h: Make `cff_parse_fixed` a local function.
85167dbd 2023-07-13 16:49:34 [woff2] Remove sfnt size guess check In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value is now just a hint and a conforming implementation must not reject otherwise valid data if the `totalSfntSize` turns out not to be exact. * src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed woff2 data would fit in the sfnt size guess. Fixes: #1235
26a7f047 2023-07-11 01:40:25 [cff] Make blend operator work with floats in private dicts. The CFF2 blend operator takes N default values and corresponding sets of deltas and pushes N values specific to a designspace location. CFF has a floating point numeric type and the FreeType blending code was not converting those into its internal 16.16 Fixed type format. Fixes #1243. * src/cff/cffparse.c (do_fixed): Handle floating point numbers. Also fix scaling overflow check for integer-to-fixed conversion. * src/cff/cffload.c (cff_blend_doBlend): Updated.
dec2743e 2023-07-07 19:24:48 * src/truetype/ttgload.c (TT_Hint_Glyph): More mostly cosmetic update. This is a follow-up to commit 49c74ac02, which creates a new local variable "exec = loader->exec", and shortening a lot of "loader->exec". This commit does two more such changes missed in that first commit. Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
355e9197 2023-07-06 21:07:16 [gzip] Don't compile internal zlib development files when using system zlib. `src/gzip/rules.mk` compiles the internal zlib sources even when using the zlib development files provided by a host system. If the internal zlib development files are not present, FreeType fails to build from source. This patch ensures the internal zlib development files are only prerequisites when not using zlib development files on a host system. * src/gzip/rules.mk (GZIP_DRV_SRCS): Define conditionally.
e4586d96 2023-06-24 05:18:54 * Version 2.13.1 released. ========================== Tag sources with `VER-2-13-1'. * docs/VERSION.TXT: Add entry for version 2.13.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.13.0/2.13/1/, s/2130/2131/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 26:0:20. * CMakeLists.txt (VERSION_PATCH): Set to 1. * subprojects/libpng.wrap, subprojects/zlib.wrap, subprojects/dlg: Updated.
5c00a468 2023-05-17 01:29:40 Comment fixes.
86d0ca24 2023-06-09 05:13:47 [sdf] Correct handling of empty glyphs. This is a refinement of commit 7b3ebb9. * src/sdf/ftsdfrend.c (ft_sdf_render): Goto 'Exit' instead of directly returning. (fd_bsdf_render): Ditto, also taking care of setting `FT_GLYPH_OWN_BITMAP` correctly.
4e1c0e8f 2023-06-05 11:53:34 Mark FT_Renderer_Class::raster_class as pointer to const The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`. The address of the definition is taken and assigned to `FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`. Until recently the `const` was cast away and with the removal of the cast there are now warnings about dropping this `const`. Instead of adding back the casts, make `FT_Renderer_Class::raster_class` a pointer to const, as is done with pointers in other interfaces. * include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class` as const.
7bed7a02 2023-06-01 21:05:32 Fix some `FT_Fixed` vs. `FT_Long` confusion. `FT_Fixed` and `FT_Long` are both typedef'ed to be `signed long`. However, `FT_Fixed` implies that the lower 16 bits are being used to express fractional values and so these two types should not be confused. * include/freetype/internal/services/svmm.h (FT_Set_MM_Blend_Func): Use `FT_Fixed` for `coords`. Users are passing `FT_Fixed` and implementations are taking `FT_Fixed`. (FT_Get_MM_Blend_Func): Ditto. * src/autofit/afcjk.c (af_cjk_metrics_check_digits): Use `FT_Long` for `advance` and `old_advance`. `advance`'s address is passed as `FT_Long*` to `af_shaper_get_elem`, which writes the advance in em units (not fixed). The exact value is not important here as it is only compared to check whether it has changed. * src/autofit/aflatin.c (af_latin_metrics_check_digits): Ditto.
2fb8eda5 2023-06-01 19:38:36 */*: Remove many function pointer casts. In C it is undefined behavior to call a function through a function pointer of a different type. This is now detected by the Control Flow Integrity Sanitizer. All known issues have already been fixed. Prevent any accidental re-introduction by removing function pointer casts when defining services. The services will call the service functions through the function pointers on the service. As a result the functions must have the same type so there should be no need to cast. Removing the casts allows compilers to warn about assignment to an incompatible function pointer type.
b641b607 2023-06-03 06:09:30 Minor formatting.
80a507a6 2023-05-23 13:13:56 Replace `sprintf` with `snprintf`. Fixes #1233. * include/freetype/config/ftstdlib.h (ft_sprintf): Replace with... (ft_snprintf): This new macro. * src/autofit/afhints.c (af_print_idx): Add argument to pass the buffer size. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Updated. * src/bdf/bdflib.c (BUFSIZE): New macro. (bdf_parse_properties_, bdf_parse_start_): Use `ft_snprintf`. * src/tools/ftrandom/ftrandom.c (do_test): Use `snprintf`.
66cc4619 2023-05-23 12:54:48 docs/DEBUG: Formatting.
562f3481 2023-05-20 12:52:25 [doc] Type1 GX (sfnt-wrapped Type1) is not supported. * docs/formats.txt: Clarify the reference of Type1 GX, and state that this format is not supported. This is because the content `TYP1' table is not exactly same with the Type1 font format specification; no eexec encryption is used. For detail and concrete examples, see the analysis on: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1231
2342a03a 2023-05-19 14:11:57 Add missing end quote of a string in the example code of FT_Trace_Set_Level
115e9275 2023-05-19 12:11:45 [truetype] Reduce heap allocation of `deltaSet` variation data. `deltaSet` is an array of packed integers that can be 32 bits, 16 bits, or 8 bits. Before this change, these values were unpacked to 32-bit integers. However, this can cause big heap allocations, e.g., around 500 KByte for 'NotoSansCJK'. To reduce this amount, store the packed integers and unpack them just before passing to the calculation. At calculation time, due to the variable length of region indices, temporary heap allocations are necessary. This heap allocation is not negligible and visible in `ftbench` results. So, use stack-allocated arrays for short array calculations. Fixes #1230. * include/freetype/internal/ftmmtypes.h (GX_ItemVarDataRec): New fields `wordDeltaCount` and `longWords`. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Load packed data. (tt_var_get_item_delta): Unpack data before applying.
99dadd56 2023-05-17 12:40:59 vms_make.com: Create shared executable for x86 version of OpenVMS.
416d4c25 2023-05-15 15:44:36 Add new load flag `FT_LOAD_NO_SVG`. Modern color fonts often contain both an 'SVG' and 'COLR' table. FreeType always preferred 'SVG' over 'COLR' (this was a design decision), however, this might not be the right choice for the user. The new flags makes FreeType ignore the 'SVG' table while loading a glyph. Fixes #1229. * include/freetype/freetype.h (FT_LOAD_NO_SVG): New macro. * src/base/ftobjs.c (FT_Load_Glyph), src/cff/cffgload.c (cff_slot_load), src/truetype/ttgload.c (TT_Load_Glyph): Use it.
872a759b 2023-05-13 09:34:45 .mailmap: Updated.
e1a4e081 2023-05-12 22:27:08 [cache] Merge functions. * src/cache/ftccache.c (FTC_Cache_Init): Merge into... (ftc_cache_done): ... this function, with unnecessary checks removed.
771ff8bd 2023-05-12 22:21:47 [cache] Minor casting and cosmetic updates. * src/cache/ftcglyph.c (ftc_gcache_{init,done}): Remove casting. (FTC_GCache_Lookup): Cosmetic variable renaming. * src/cache/ftcsbits.c (ftc_snode_compare): Formatting.
3af4772d 2023-05-12 05:58:43 * include/freetype/ftcache.h: Typo, punctuation.
b07ab47b 2023-05-11 23:23:52 * include/freetype/ftcache.h: Formatted and updated.
7132f5b0 2023-05-12 09:49:58 * include/freetype/internal/t1types.h: Fix the indentation.
ad708d70 2023-05-11 17:41:49 [cache] Revise the dynamic hash table accounting. Instead of counting entries relative to the middle of the hash table, this switches to the absolute counter with the full index range mask. As a result, some calculations become a bit simpler. The cache resizing logic stays largely the same. * src/cache/ftccache.h (FTC_NODE_TOP_FOR_HASH): Revised with new counter. * src/cache/ftccache.c (ftc_get_top_node_for_hash): Ditto. (ftc_cache_resize): Simplify reallocations and stop their zeroing. (ftc_cache_init): Stop over-allocating but keep zeroing initially. (FTC_Cache_Clear, FTC_Cache_RemoveFaceID): Updated accordingly.
6ca0a935 2023-05-11 14:31:23 [t1cid] Set FT_FACE_FLAG_CID_KEYED. * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED. * cidriver.c (cid_get_is_cid): Comment about the case that is_cid cannot guarantee the glyph collection specification.
c3876354 2023-05-09 07:15:53 * src/smooth/ftgrays.c (FT_SSE2): Don't define for VMS.
e02a40a4 2023-05-08 20:12:26 * src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`. This was forgotten to change in commit 2b54eba36b (in May 2004). Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739
5edd6d52 2023-05-08 07:22:59 Minor compiler warning fixes. * src/autofit/afcjk.c (af_cjk_get_standard_widths), src/autofit/aflatin.c (af_latin_get_standard_widths): Use `FT_CALLBACK_DEF`. * src/cff/cffparse.c (cff_parser_run): Initialize and fix allocation of `q`.
bd37b847 2023-05-08 06:46:55 * src/psaux/t1cmap.c: Signature fixes.
968fc281 2023-05-08 06:26:43 * src/bzip2/ftbzip2.c: Signature fixes.
d52166ae 2023-05-08 06:15:44 [cache] Signature fixes. * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove redundant function. It is equivalent to `ftc_gnode_compare` and becomes completely meaningless with fixed signatures. Update all callers. * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove redundant function. It is equivalent to `ftc_snode_compare` and becomes completely meaningless with fixed signatures. Update all callers.
c8ae37ba 2023-05-07 21:06:14 [sdf] Signature fixes.
924329a9 2023-05-07 20:57:22 * src/svg/ftsvg.c: Signature fixes.
6e7b1b76 2023-05-07 20:51:32 [raster] Signature fixes.
02283a6e 2023-05-07 20:37:38 [smooth] Signature fixes.
669b7f7d 2023-05-07 20:26:12 [pshinter] Signature fixes. * src/pshinter/pshrec.c (t1_hints_close, t1_hints_apply): New wrapper functions. (t1_hints_funcs_init): Use them. (t2_hints_close, t2_hints_apply): New wrapper functions. (t2_hints_funcs_init): Use them.
274e0dd5 2023-05-07 19:54:46 [autofit] Signature fixes.
365eb10d 2023-05-07 19:16:38 * src/sfnt/ttcmap: Signature fixes.
60c11919 2023-05-07 16:42:01 * src/pcf/pcfdrivr.c: Signature fix.
5f7a26fd 2023-05-07 16:30:21 * src/winfonts/winfnt.c: Signature fixes.
394c4de9 2023-05-07 16:25:37 * src/type42/t42parse.c: Signature fixes.
19aca966 2023-05-07 15:57:06 [pfr] Signature fixes.
3297a7a9 2023-05-07 15:23:46 * src/cid/cidload.c: Signature fixes.
4a28ff3d 2023-05-07 09:14:27 * src/cff/cffcmap.c: Signature fixes.
563f4011 2023-05-07 08:50:44 * src/type1/t1load.c: Signature fixes.
95d635ea 2023-05-07 08:34:32 [truetype] Signature fixes.
e05c0562 2023-05-07 08:29:15 [base] Signature fixes.
ff0ef828 2023-05-07 07:19:44 * src/type42/t42drivr.c: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
7cc5dfa2 2023-05-07 07:10:23 * src/type1/*: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
3a85bf0b 2023-05-07 06:43:21 * src/truetype/*: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
e245951c 2023-05-06 23:59:25 * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests. * src/sfnt/sfdriver.c (sfnt_load_table): New wrapper function. (sfnt_service_sfnt_table): Use it.
ceba488c 2023-05-06 20:14:27 * src/psnames/psmodule.c: Use `FT_CALLBACK_DEF`.
4360e20e 2023-05-06 20:05:42 * src/pfr/pfrdrivr.c: face -> pfrface, pfrface -> face.
0685b0ad 2023-05-06 20:01:47 * src/pcf/pcfdrivr.c: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
b9ce8e33 2023-05-06 19:23:45 * src/cid/cidriver.c: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
bc7466ad 2023-05-06 19:15:01 * src/bdf/bdfdrivr.c: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
c0414119 2023-05-06 18:57:42 * src/cff/*: Clean up interface. Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
8fe50c2a 2023-04-27 23:06:51 [truetype] Fix style name handling for variation fonts. * include/freetype/internal/tttypes.h (TT_FaceRec): New field `non_var_style_name`. * src/sfnt/sfobjs.c (sfnt_load_face): Initialize `non_var_style_name`. (sfnt_done_face): Free `non_var_style_name`. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Restore non-VF style name if switching back to non-VF mode.
c8a24209 2023-04-27 11:40:46 [truetype] Fix PostScript name handling for variation fonts. A variation font's PostScript name of a named instance is usually different from the PostScript name of an unnamed instance. However, if a change between a named instance and an unnamed instance with exactly the same design axis values happened, it was possible that the PostScript name wasn't correctly updated. This commit reorganizes the code to handle this issue within the top-level API functions, using a new service to trigger recomputation of the PostScript name. * include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New typedef. (FT_Service_MultiMasters): New field `construct_ps_name`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call `mm->construct_ps_name` to handle `postscript_name`. (FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle `postscript_name`. Use shortcut. * src/cff/cffdrivr.c (cff_construct_ps_name): New function. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`. (TT_Set_MM_Blend): Simplify. (TT_Set_Named_Instance): Return -1 if axis values haven't changed. Don't set `face_index`. (tt_construct_ps_name): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. * src/type1/t1load.c (T1_Set_MM_Blend): Simplify.
7af8fd00 2023-04-27 07:37:14 * include/freetype/internal/services/svmm.h: Minor changes.
6713b1e4 2023-04-26 12:03:04 [truetype] Fix deactivation of variation font handling. According to the documentation, the functions `FT_Set_Named_Instance`, `FT_Set_MM_Design_Coordinates`, `FT_Set_Var_Design_Coordinates`, and `FT_Set_Var_Blend_Coordinates` can unset the `FT_FACE_FLAG_VARIATION` flag. (The same is true for `FT_Set_MM_WeightVector` but this information was accidentally omitted from the documentation.) However, if a call of these functions didn't change the axis values this could fail because internal shortcuts exited too early. This commit reorganizes the code to handle `FT_FACE_FLAG_VARIATION` in the top-level API functions, also taking care of the issue at hand. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_MM_WeightVector, FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Handle `FT_FACE_FLAG_VARIATION`. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design, TT_Set_Named_Instance) Don't handle `FT_FACE_FLAG_VARIATION`. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_WeightVector, T1_Set_MM_Design): Ditto. * src/cff/cffobjs.c (cff_face_init): Use `FT_Set_Named_Instance` instead of low-level functions. * src/truetype/ttobjs.c (tt_face_init): Ditto.
fdcb14a2 2023-04-27 06:18:38 s/set_instance/set_named_instance/ * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed to... (FT_Set_Named_Instance_Func): ...this. (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/base/ftmm.c (FT_Set_Named_Instance): Updated. * src/cff/cffdrivr.c (cff_set_instance): Renamed to... (cff_set_named_instance): ...this. (cff_service_multi_masters): Updated. * src/cff/cffobjs.c (cff_face_init): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
fb982e78 2023-04-26 08:17:17 New Variation Font function `FT_Get_Default_Named_Instance`. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Get_Default_Named_Instance): New function. * include/freetype/internal/services/svmm.h (FT_Get_Default_Named_Instance_Func): New typedef. (FT_Service_MultiMasters): New field `get_default_named_instance`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * include/freetype/internal/tttypes.h (TT_Face): New field `var_default_named_instance`. * src/sfnt/sfobjc.s (sfnt_init_face): Initialize `var_default_named_instance`. * src/cff/cffdrivr.c (cff_get_default_named_instance): New function. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `var_default_named_instance`. (TT_Get_Default_Named_Instance): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. * docs/CHANGES: Updated.
b5e57b04 2023-05-06 16:41:13 [cid] Improve tracing messages; formatting.
9127c68f 2023-05-04 16:54:22 * src/cache/ftccache.c (ftc_node_hash_unlink): Minor.
345f8810 2023-05-03 23:33:32 * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Purge backwards.
f2f97545 2023-05-03 23:02:04 [cache] Revise list cleansing. * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Use one loop to do it. * src/cache/ftcmanag.c (FTC_Manager_Compress, FTC_Manager_FlushN): Streamline loops.
be15811c 2023-05-03 01:31:37 [t1cid] Improve cid_get_cid_from_glyph_index(). Update cid_get_cid_from_glyph_index() to return an error and CID=0 in the case that the specified glyph index points to an invalid entry. cidgload.h (cid_compute_fd_and_offsets): Declare new helper function to set the fd_select and 2 offsets to access the glyph description data. cidgload.c (cid_compute_fd_and_offsets): Move the part loading fd_select and 2 offsets from cid_load_glyph() to here. If the loaded parameters are broken, return the Invalid_Offset error. This function does not load the glyph data, only fills these parameters. (cid_load_glyph): Use new helper function in above. cidriver.c (cid_get_cid_from_glyph_index): Check whether the requested glyph index points to a valid entry, by calling cid_compute_fd_and_offsets(). If it is valid, fill the cid by the glyph index (=CID). If it is invalid, return an error and fill the cid by 0.
77bbfc59 2023-04-24 09:48:09 API documentation: Re-organize chapters and sections * Split the very long 'Base Interface' section into smaller sections. * Split the 'Core API' chapter into two chapters. * Remove single enumeration values from `@order` fields since they have no effect.
36a086b6 2023-04-28 19:40:35 * src/sfnt/pngshim.c (Load_SBit_Png): Remove FALL_THROUGH warning.
08268691 2023-04-28 15:32:16 * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard. Reject 'OTTO' fonts with no valid tables.
966ff5a5 2023-04-28 15:25:20 * src/cff/cffdrivr/c (cff_get_ps_name): Avoid unnecessary crash. The situation can happen if `FT_New_Face` (or one of its siblings) is called with a negative index to get the number of contained faces, followed immediately by a call to `FT_Get_Postscript_Name`. While this is not a valid use of the FreeType library there is no need for a crash. Fixes #1219.
17a0c5df 2023-04-28 10:40:41 * src/cff/cffdrivr.c (cff_ps_get_font_info): Reject 'CFF2' format.
4908c1e8 2023-04-28 06:54:25 * src/cid/cidgload.c (cid_load_glyph): Fix compiler warnings.
13df1c7d 2023-04-26 13:17:36 Minor documentation updates.