Log

Author Commit Date CI Message
Dominik Röttsches 44fd524e 2022-07-05T15:09:28 [sfnt] Support variable 'COLR' v1 `PaintVarRotate*`. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE` and `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER`. (read_paint): Handle new enumeration values.
Dominik Röttsches 603fef28 2022-07-05T14:56:22 [sfnt] Support 'COLR' v1 variable `PaintVarScale*`. * src/sfnt/ttcolr.c: (FT_PaintFormatInternal): New enumeration values `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE`, `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER`, `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM`, and `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER`. (read_paint): Handle new enumeration values.
Dominik Röttsches d134b9e3 2022-07-05T14:51:48 [sfnt] Support for 'COLR' v1 variable translate. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE`. (read_paint): Handle new enumeration value.
Dominik Röttsches 8ec531c2 2022-07-05T14:47:57 [sfnt] Support for 'COLR' v1 variable transforms. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM`. (read_paint): Handle new enumeration value.
Dominik Röttsches 9c4ad2a9 2022-07-05T14:43:10 [sfnt] Deltas for 'COLR' v1 gradient coordinates. * src/sfnt/ttcolr.c (read_paint) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Read and apply deltas to radial, linear, and sweep gradient coordinates such as 'p0', 'p1', 'p2', 'center', 'radii', and 'angles'.
Dominik Röttsches 3414fef7 2022-07-04T16:29:31 [sfnt] Support variable 'COLR' v1 color lines. * include/freetype/ftcolor.h (FT_ColorStopIterator): Add field `read_variable` to indicate whether a variation index base should be read. * src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations `FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT` `FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`. (read_color_line): New parameter `read_variable`; update callers. (read_paint): Handle new enumerations.
Dominik Röttsches 7c151abb 2022-07-04T12:44:06 [sfnt] Apply variation deltas to `PaintVarSolid`. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal_): New enumeration `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`. (get_deltas_for_var_index_base) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function to retrieve an array of delta values, which will be used for most of 'COLR' v1 variation formats (in follow-up commits). (read_paint): Add `face` parameter; update caller. Handle `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`.
Dominik Röttsches 8a9192f6 2022-07-07T13:02:10 [sfnt] Check safety of cast to `TT_Driver` before accessing member. * src/sfnt/ttcolr.c (VARIABLE_COLRV1_ENABLED): Access `enable_variable_colrv1` only if driver class matches.
Stephen Holdaway d5d048bb 2022-07-03T20:26:31 doc: Clarify description of `FT_Stream_IoFunc`. The existing documentation comments on `FT_Stream_IoFunc` hinted at the dual seek/read behavior required for custom stream implementations to work, but it didn't explicitly explain it. Without looking at the internals of FreeType, it was easy for someone to assume their implementation should handle both seek and read operations all the time. If this is done, you get a variety of errors, but mostly just `Unknown_File_Format` (error code 0x02).
Dominik Röttsches 31b14fd4 2022-06-29T16:01:13 [sfnt] Load variation store for 'COLR' v1. * src/sfnt/ttcolr.c: Include `ttobjs.h` temporarily. (VARIABLE_COLRV1_ENABLED): New temporary macro to detect whether variable COLRv1 is enabled. (Colr): New fields `var_store` and `delta_set_idx_map`. (tt_face_load_colr, tt_face_free_colr) [VARIABLE_COLRV1_ENABLED]: Load and free variation store data using the functions from the Multiple Masters service.
Chris Liddell 1a242558 2022-06-30T09:25:14 [base] Improve error handling in `FT_GlyphLoader_CheckPoints`. If `FT_GlyphLoader_CreateExtra` returns an error (and a couple of other places), `FT_GlyphLoader_CheckPoints` would propagate the error immediately, rather than cleaning up the partially set up `FT_GlyphLoader`. As a consequence, a subsequent attempt to create a glyph could result in a crash. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Ensure all the error conditions exits are consistent, eventually calling `FT_GlyphLoader_Reset`.
Thomas Sondergaard 55a97b0c 2022-06-23T08:51:50 CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets. FreeType can be located by consuming projects that use `find_package(Freetype)` either via the old `MODULE` path (which uses `FindFreetype.cmake` supplied by CMake), or via the new `CONFIG` path (which uses `freetype-config.cmake` as supplied by this project). Up to this point the CMake module has supplied the target `Freetype::Freetype` and the config file provided by this project the target `freetype`. Now we supply both `freetype` and `Freetype::Freetype` so that consuming projects can always use the target `Freetype::Freetype` regardless of what path was taken by `find_package(Freetype)`. Fixes #1165.
Werner Lemberg 31005d98 2022-07-02T09:34:13 include/freetype/ftmm.h: Improve documentation.
Dominik Röttsches bec4ef41 2022-07-01T12:04:28 [base] Round values in `FT_MulAdd_Fix`. This avoids regressing Blink layout tests and makes `FT_MulAdd_Fix` delta retrieval implementation consistent with the previous implementation, which used `FT_fixedToInt` and included rounding. * src/base/ftcalc.c (FT_MulAdd_Fix): Implement it. Also fix remaining `temp` initialization compilation issue. Fixes #1169.
Werner Lemberg de27955c 2022-07-01T06:33:50 Minor formatting.
Dominik Röttsches 0607e0e9 2022-06-30T10:55:50 Fix initialisation of temp variable in new FT_MulAddFix src/truetype/ttgxvar.c (FT_MulAddFix): Initialise `temp`.
Dominik Röttsches dece9535 2022-06-29T11:48:53 [truetype] Perform variation store delta computation with 64-bit precision. * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Make type explicitly 32-bit. * include/freetype/internal/services/svmm.h (FT_Var_Get_Item_Delta_Func): Change return type to `FT_ItemVarDelta` * truetype/ttgxvar.h (tt_var_get_item_delta): Change return type to `FT_ItemVarDelta`. * truetype/ttgxvar.c (tt_var_get_item_delta): Store scalars and deltas to intermediate array, perform computation using new method `FT_MulAddFix`.
Dominik Röttsches 15fef219 2022-06-29T11:48:10 New function `FT_MulAddFix` to compute the sum of fixed-point products. This function, based on the code of `FT_MulFix`, uses 64-bit precision internally for intermediate computations. * include/freetype/internal/ftcalc.h, base/ftcalc.c (FT_MulAddFix): Implement it.
Werner Lemberg 2db58e06 2022-06-22T12:13:27 CMakeLists.txt: Move inclusion of `FindPkgConfig` down. It must come after `CMAKE_TOOLCHAIN_FILE`. Fixes #1167.
Dominik Röttsches 117df36b 2022-06-22T09:33:20 [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14
Alexei Podtelezhnikov 5e48c88d 2022-06-21T17:34:29 * docs/CHANGES: Announce impending Infinality removal.
Alexei Podtelezhnikov 9006ff7d 2022-06-21T17:10:56 * ttgload.c (TT_Process_Composite_Glyph): Fix a signedness warning.
Werner Lemberg 2848378b 2022-06-21T17:08:04 s/fixed point/fixed-point/
Werner Lemberg 40c6f973 2022-06-21T14:45:42 .gitlab-ci.yml: Correctly upgrade `meson`.
Dominik Röttsches 4b6f92e6 2022-06-01T13:24:09 Proposal: Feature control for variable COLRv1 * include/freetype/ftdriver.h (variable-color-v1 property): Add documentation for variable-colr-v1 property. * src/truetype/ttdriver.c (tt_property_set): Ingest variable-control property when called, set to enable_variable_colrv1 driver flag. * src/truetype/ttobjs.h (TT_DriverRec): Add enable_variable_colrv1 flag.
Xavier Claessens b861b241 2022-05-27T11:26:30 [meson] Disable FreeType in HarfBuzz fallback. This avoids cyclic subproject configuration when the 'harfbuzz' feature is enabled, or `--wrap-mode=forcefallback` is used, but HarfBuzz is built as a subproject. HarfBuzz does the same and disables HarfBuzz support when configuring FreeType as a subproject. * meson.build (harfbuzz_dep): Implement it. * subprojects/harfbuzz.wrap: New file. * .gitlab-ci.yml [windows meson]: Use latest version of the meson 0.59 series, which has a necessary bug fix to make CI work.
Alexei Podtelezhnikov 47103b2f 2022-06-18T23:09:17 [truetype] Clean up phantom point accounting. This formalizes that the phantom points appended in the outline do not increase its point count, nor are they tagged or included in any additional contours. Only their coordinates are stored. They are counted in the glyph zone, however. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Infer `n_points` from the outline size plus four phantom points. * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Remove this argument. * src/truetype/ttgload.c (tt_prepare_zone): Add phantom four. (TT_Process_Simple_Glyph, load_truetype_glyph): Update all callers.
Alexei Podtelezhnikov 705f4161 2022-06-18T23:02:26 [truetype/GX] Clean up phantom point adjustment. This moves phantom point and advance variation adjustment next to calculations. The logic stays the same, HVAR and VVAR take priority. * src/truetype/ttgload.c (load_truetype_glyph): Move it from here... * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here and check for HVAR and VVAR presence outside the main loop.
Ben Wagner f7daf9d2 2022-06-17T12:37:02 [stream] Fix reading s32 when long is s64 `FT_READ_LONG`, `FT_GET_LONG`, and related macros did not return negative values when `long` is more than 32 bits. `FT_Stream_ReadULong` would read four bytes into the LSB of an `FT_ULong` and return that. Since this can never set the MSb of the `FT_ULong` when `FT_ULong` is more than 32 bits the cast to `FT_Long` never resulted in a negative value. Fix this by modifying `FT_Stream_Read*` to return a type of the same size as the bytes it is reading and changing the `FT_READ_*` and `FT_GET_*` macros to cast to the same type returned by `FT_Stream_Read*` but with the correctly signed type (instead of casting to what is assumed to be the type of `var` which will happen automatically anyway). There exist a few cases like with the `OFF3` variants where there isn't generally a type with the correct size. `FT_PEEK_OFF3` works around this loading the bytes into the three most significant bits and then doing a signed shift down. `FT_NEXT_OFF3` also already worked correctly by casting this signed value to another signed type. `FT_Stream_GetUOffset` works correctly but one must be careful not to attempt to cast the returned value to a signed type. Fortunately there is only `FT_GET_UOFF3` and no `FT_GET_OFF3`. All of these cases are handled correctly when reading values through `FT_Stream_ReadFields` since it generically computes the signed value through an `FT_Int32`. This change is essentially doing the same for these macros. * include/freetype/internal/ftstream.h (FT_NEXT_*, FT_GET_*, FT_READ*): Update macros and return types to use fixed size types for fixed size values. * src/base/ftstream.c (FT_StreamGet*, FT_StreamRead*): Dito. Issue: #1161
Alexei Podtelezhnikov d9b8a69e 2022-06-16T22:13:25 [truetype/GX] Fix an old typo. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Vertical advance is measured along y-coordinate.
Alexei Podtelezhnikov 9c706dcc 2022-06-16T16:11:51 [truetype/GX] Clean up advance adjustment (Brrr). * src/truetype/ttgload.c (load_truetype_glyph): Remove remaining code.
Ben Wagner 90795210 2022-06-15T16:07:22 [type1] Directly search for eexec in private dict This code originally just searched for `eexec`. This was later modified to check that the `eexec` found is valid (not in a string or comment). This was done by searching for `eexec` as before and then, for each `eexec` found, searching from the beginning using the correct parsing to see if the `eexec` was still found. If the private dictionary is large and contains many copies of `eexec` which are not valid, the initial part of the private dictionary is scanned once for each, potentially leading to n^2 parsing time. Instead of finding an initial `eexec` and then re-parsing to discover if it is valid, drop the initial search for `eexec` and just parse to find a valid `eexec`. This is strictly faster since the validation must happen anyway and avoids restarting from the beginning each time an `eexec` is found in the data. * src/type1/t1parse.c (T1_Get_Private_Dict): avoid n^2 parsing Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1328883
Alexei Podtelezhnikov d6fc8c6b 2022-06-15T18:28:50 [truetype/GX] Clean up advance adjustment. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Move the advance adjustment from here... * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here and simplify arguments. * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Update prototype with fewer arguments.
Ben Wagner 8bb7722a 2022-06-13T15:09:36 [gzip] Handle inflate returning Z_NEED_DICT When `inflate` returns `Z_NEED_DICT` this is currently not reported as an error and callers may assume that the decompression succeeded when it did not. In particular, a compressed table in a woff file may not actually be decompressed and written as expected, leaving the backing memory for the expanded table uninitialized. * src/gzlip/ftgzip.c (FT_Gzip_Uncompress): treat `Z_NEED_DICT` as indicating invalid data since there is no means to provide a dictionary. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1335712
Ben Wagner 58395dd2 2022-06-13T15:28:00 [woff] Don't allocate table entries until needed * src/sfnt/sfwoff.c (woff_open_font): delay allocating space for the table entries until they are actually written out with the data.
Alexei Podtelezhnikov 8b6bcc92 2022-06-12T09:04:13 * src/sfnt/sfwoff2.c (woff2_open_font): Partial revert. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47981.
Alexei Podtelezhnikov e7482ff4 2022-06-11T23:47:19 * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Cosmetic macro change.
Alexei Podtelezhnikov 73631b95 2022-06-11T16:10:40 [woff, woff2] Avoid buffer zeroing. * src/sfnt/sfwoff.c (woff_open_font): Use Q-macros. * src/sfnt/sfwoff2.c: Ditto. (reconstruct_font): Allocate table_entry on stack.
Alexei Podtelezhnikov 4fef1fce 2022-06-10T11:34:56 [smooth] Fix GCC LTO crashes on Windows. Fixes #1164 by using a volatile variable around `setjmp`. It is hard to say how this fixes crashes related to certain link-time optimizations. This does not decrease the rendering performance. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`.
bruvzg 9acefc4f 2022-06-09T10:51:07 * src/smooth/ftgrays.c [FT_STATIC_RASTER]: Fix compilation.
Ben Wagner b11074cf 2022-06-06T15:59:56 [svg] Set linear advances when loading SVG glyphs * include/freetype/freetype.h (FT_GlyphSlotRec_): update doc * src/cff/cffgload.c (cff_slot_load): do it * src/truetype/ttgload.c (TT_Load_Glyph): do it Fixes: #1156
Ben Wagner c26872ed 2022-05-26T20:27:53 [svg] Clear correct flags for doc ownership This issue was discovered with an SVG based font with some documents compressed and other uncompressed. After loading the first compressed document the ownership flag on the glyph slot was set to true but never set to false. As a result after loading a compressed document a glyph from an uncompressed document would load fine, but when this glyph slot was cleared it would try to free its document resulting in a wild free. * src/base/ftobjs.c (ft_glyphslot_clear): clear correct flags Fixes: #1162
Alexei Podtelezhnikov d6857981 2022-05-31T22:40:55 [docs] Correct favicon.
Alexei Podtelezhnikov 8addad60 2022-05-31T22:38:24 [docs] Use hinted favicon.
Alexei Podtelezhnikov c26f0d0d 2022-05-26T23:48:26 [docs] Update favicon.
Behdad Esfahbod (بهداد اسفهبد) b98dd169 2022-05-25T14:49:37 * src/sfnt/ttmtx.c (tt_face_get_metrics): Apply variations unconditionally. This causes a speed-up of approx. 20% for getting advance widths.
Dominik Röttsches 7838c78f 2022-05-20T17:22:25 [truetype] Support reading 32bit/16bit VarStore deltas * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Define type to be used for delta arrays, upgrade to FT_long. * src/truetype/ttgxvar.c: Adhere to long_words bit and read either Short/Byte pairs or Long/Short pairs, as defined by spec. For better readability, define macro for repetitive read code.
Dominik Röttsches 9aa99f22 2022-05-20T17:20:08 [truetype] Handle 0xFFFF special value inside delta retrieval function * truetype/ttgxvar.c (tt_hvadvance_adjust, tt_apply_mvar, tt_var_get_item_delta): Remove special 0xFFFF handling in favor of less redundant handling inside the tt_var_get_item_delta function, as it is equivalent to returning a 0 delta. Avoids code-duplication checking for special value 0xFFFF.
Dominik Röttsches a4c4566b 2022-05-19T06:30:47 [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`. This will be needed for 'COLR' v1 variation support. * src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion, GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to... * include/freetype/internal/ftmmtypes.h: ... this new file. * include/freetype/internal/service/svmm.h (MultiMasters): Include `ftmmtypes.h`. (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func, FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func, FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs. (MultiMasters): Add them. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_load_item_variation_store, cff_load_delta_set_index_mapping, cff_get_item_delta, cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper methods calling into mm service. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping, ft_var_get_item_delta, ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed to ... (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, tt_var_get_item_delta, tt_var_done_item_variation_store, tt_var_done_delta_set_index_map): ... this for consistency. Mark them as non-static. * src/truetype/ttgxvar.h: Add corresponding prototypes. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
Dominik Röttsches 5f19f49c 2022-05-13T15:43:06 [truetype] Move deallocation of `DeltaSetIdxMap` into own function. This is a preparation for handling `DeltaSetIdxMap` and `VarStore` as a FreeType service. * src/truetype/ttgxvar.c (ft_var_done_delta_set_index_map): New function. (tt_done_blend): Use it.
Werner Lemberg e3ac7bb6 2022-05-18T16:12:19 * builds/toplevel.mk (do-dist): Don't remove meson wrap files. Fixes #1157.
Werner Lemberg b4b7c3f6 2022-05-18T16:02:21 * subprojects/zlib.wrap: Update to zlib version 1.2.12.
Werner Lemberg c8a9c889 2022-05-18T07:06:58 REAMDE: Mention that gitlab's 'download' button doesn't work. This is because the `git archive` command doesn't preserve submodules. Note that currently there is no support for disabling the 'download' button in gitlab (https://gitlab.com/gitlab-org/gitlab/-/issues/17032). Fixes issue #1158.
Werner Lemberg 5d49473f 2022-05-11T18:15:02 [truetype] Handle inner/outer index values 0xFFFF/0xFFFF. This was introduced in OpenType 1.8.4. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping, tt_hvadvance_adjust, ft_var_load_mvar, tt_apply_mvar): Handle special inner/outer index values. (ft_var_load_item_variation_store): Add test. Fixes #1154.
Werner Lemberg e8ebfe98 2022-05-01T07:05:36 * Version 2.12.1 released. ========================== Tag sources with `VER-2-12-1'. * docs/VERSION.TXT: Add entry for version 2.12.1. * docs/CHANGES, docs/release: 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.12.0/2.12.1/, s/2120/2121/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 24:3:18. * CMakeLists.txt (VERSION_PATCH): Set to 1.
Anuj Verma 7b3ebb9c 2022-04-30T22:43:33 [sdf] Do not throw errors for invisible glyphs. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Return `FT_Err_Ok` if width or height is zero, since some glyphs do not generate visible bitmaps. Fixes #1150.
Werner Lemberg 62bc04f4 2022-04-30T15:37:14 * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_COLOR` for SVG fonts. Fixes #1151.
Brendan Shanks 6fb7b7a0 2022-04-26T15:29:35 autogen.sh: Fix building when freetype is itself a git submodule. There are situations where .git is not a directory, like when freetype is a submodule in another repository.
Alexei Podtelezhnikov ed4d0710 2022-04-25T19:05:11 [builds/windows] Simplify non-desktop UWP check. Fixes mingw compilation described in !159. * builds/windows/ftsystem.c: Do not use WINAPI_FAMILY_PARTITION macro.
Alexei Podtelezhnikov 581dd064 2022-04-25T08:03:08 [truetype] Reset IUP flags in `TT_RunIns`. Fixes #1148 by moving the flag initialization back, partly reverting 7809007a and fd03dcc1. Initializing these flags elsewhere skips 'cvt'. * src/truetype/ttinterp.c (TT_RunIns): Initialize the IUP flag here... (TT_Run_Context): ... instead of here.
Xavier Claessens d59c7ce1 2022-04-21T08:43:18 [meson] Remove `default_library=both` from `default_options`. It is inconsistent with what all other Meson projects do. It also prevents static linking to FreeType when it is a subproject because `default_options` in a subproject takes precedence on values set on the main project. For example, building 'GStreamer' with `-Ddefault_library=static` would still dynamically link on FreeType unless the user also sets `-Dfreetype2:default_library=static`. * meson.build: Updated. * .gitlab-ci.yml: Retain `both` option for testing.
Werner Lemberg 079a22da 2022-04-19T09:28:21 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46792
Georg Brandl 978eefee 2022-04-12T11:43:37 * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_SVG]: Fix segfault. This can happen if the function is called with `size` being `NULL`. Fixes #1147.
Steve Lhomme 3100c812 2022-02-15T10:27:47 .gitlab-ci.yml: Add a Universal Windows build target It's compiled for Windows 10 and up, ensuring UNICODE is set (default for UWP) and selecting the proper WINAPI_FAMILY (WINAPI_FAMILY_APP). Do not try to run the UWP exe in the Docker as it doesn't work.
Ben Wagner a1ca7010 2022-04-04T15:28:54 [sfnt] Correct FT_ColorStopIterator documentation. * include/freetype/ftcolor.h (FT_ColorStopIterator): the user should not set `p` to NULL before calling `FT_Get_Colorline_Stops`. `p` and `num_color_stops` are set by `FT_Get_Paint`. `p` and `current_color_stop` are updated by `FT_Get_Colorline_Stops`.
Werner Lemberg aee6b947 2022-04-01T14:23:37 * builds/unix/configure.raw: Add option `--with-librsvg`. Since 'librsvg' is written in Rust, this option allows distributions to avoid a dependency on the entire Rust toolchain to provide the FreeType demo programs. Suggested by Lars Wendler in !156.
Werner Lemberg fc082956 2022-04-01T14:44:42 * src/sfnt/sfwoff.c (reconstruct_glyf): Fix gcc 10 warning.
Werner Lemberg 1603378b 2022-04-01T10:23:15 [gzip] Update sources to zlib 1.2.12.
Eric Jing 89d5cce5 2022-04-01T08:52:31 CMakeLists.txt: Fix `Info.plist` path. When building a framework using CMake with `add_subdirectory`, CMake must be able to find `freetype-Info.plist` when configuring the framework properties. Fixes #1145.
Werner Lemberg 695d606a 2022-04-01T08:50:33 Whitespace.
Ben Wagner d247c562 2022-03-31T18:54:15 [truetype] Use SUB_LONG for component offset. * src/truetype/ttgload.c (TT_Process_Composite_Component): do it. Bug: https://crbug.com/1309429
Werner Lemberg 38534503 2022-03-31T20:52:43 CMakeList.txt: Update code to handle recent changes for `freetype.pc`. Fixes #1144.
Werner Lemberg 8a33164d 2022-03-31T20:50:39 CMakeLists.txt: s/PKG_CONFIG/PKGCONFIG/, s/REQUIRED_/REQUIRES_/.
Werner Lemberg e50798b7 2022-03-30T14:06:21 * Version 2.12.0 released. ========================== Tag sources with `VER-2-12-0'. * docs/VERSION.TXT: Add entry for version 2.12.0. * docs/CHANGES, docs/release: 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.11.1/2.12.0/, s/2111/2120/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 12. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 24:2:18. * CMakeLists.txt (VERSION_MINOR): Set to 12. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (do-dist): Generate `ChangeLog` entries for all commits since version 2.11.0 (when we stopped creating this file manually).
Werner Lemberg 87989a14 2022-03-31T07:43:41 Fix clang++ warnings. * src/base/ftglyph.c (ft_svg_glyph_prepare), src/base/ftobj.c (ft_glyphslot_init), src/cache/ftccmap.c (ftc_cmap_node_new), src/cache/ftcimage.c (FTC_INode_New), src/lzw/ftlzw.c (FT_Stream_OpenLZW), src/psaux/psobjs.c (ps_parser_load_field), src/pshinter/pshglob.c (psh_globals_new), src/sfnt/ttsvg.c (tt_face_load_svg_doc): Initialize variables used for allocation. * src/sdf/ftsdf.c (split_sdf_conic, split_sdf_cubic): Change type of `max_splits` to FT_UInt. (sdf_generate_bounding_box): Add cast.
Werner Lemberg 97cdbb24 2022-03-30T14:06:15 Whitespace.
Werner Lemberg 119e404b 2022-03-18T13:25:51 [builds] Fix creation of `freetype2.pc` for static-only builds. We have to help `pkg-config` since it can't recognize that there is no shared library installed. Note that meson already does exactly the same. * builds/unix/configure.raw (REQUIRES_PRIVATE, LIBS_PRIVATE): Rename to... (PKGCONFIG_REQUIRES_PRIVATE, PKGCONFIG_LIBS_PRIVATE): This. Adjust them depending on `$enable_shared`. (PKGCONFIG_REQUIRES, PKGCONFIG_LIBS): New variables. * builds/unix/freetype2.in, builds/unix/unix-def.in: Use new and updated variables.
Werner Lemberg a8e4563c 2022-03-19T23:54:31 Add `FT_FACE_FLAG_SBIX_OVERLAY` and `FT_HAS_SBIX_OVERLAY`. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX_OVERLAY, FT_HAS_SBIX_OVERLAY): New macro. * src/sfnt/ttsbit.c (tt_face_load_sbit): Handle `FT_FACE_FLAG_SBIX_OVERLAY`. Remove obsolete tracing message.
Werner Lemberg 1949a7ec 2022-03-19T18:51:34 Add `FT_PARAM_TAG_IGNORE_SBIX`. This is another bit to handle 'sbix' tables as described in the OpenType specification. * include/freetype/ftparams.h (FT_PARAM_TAG_IGNORE_SBIX): New macro. * src/sfnt/sfobjc.c (is_apple_sbix): Rename to... (has_sbix): ... this. Check for more sbit tables. Handle `FT_PARAM_TAG_IGNORE_SBIX` to eventually control `has_sbix`. Only call sbit table loader if an sbit table is present.
Werner Lemberg ac4c1ebf 2022-02-07T06:55:54 [truetype] Fix 'sbix' table handling. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Correct calculation of 'metrics->horiBearingY'. Set vertical metrics. * src/sfnt/sfobjs.c (sfnt_load_face): Adjust setting of `FT_FACE_FLAG_SBIX`. Handle metrics of fonts with 'sbix' table. * src/truetype/ttgload.c (TT_Load_Glyph): For 'sbix' embedded bitmaps, apply bbox offset and bearing values of the corresponding glyph in the 'glyf' table if it exists and has a contour. * src/truetype/ttobjs.c (tt_face_init): Handle font with 'sbix' table. Fixes issue #998.
Werner Lemberg 907715a6 2022-02-09T07:31:56 Add `FT_FACE_FLAG_SBIX` and `FT_HAS_SBIX`. Fonts with 'sbix' tables need special handling by the application. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX, FT_HAS_SBIX): New macros. * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_SBIX` if 'sbix' table is present.
Werner Lemberg 06727a52 2022-02-09T08:36:15 * include/freetype/freetype.h (FT_LOAD_SBITS_ONLY): Tag macro as public.
Carlo Bramini 127c1e83 2022-03-23T22:53:07 [builds/windows] Fix WCE support. * builds/windows/ftsystem.c [_WIN32_WCE]: Include <malloc.h> needed by _alloca.
Steve Lhomme 0574692c 2022-03-23T22:46:15 [build/windows] Improve UWP support. * builds/windows/ftsystem.c [UWP]: Wrap CreateFile2 into CreateFileA.
Werner Lemberg fc15ebe0 2022-03-21T11:15:41 * src/sfnt/ttkern.c (tt_face_get_kerning): Exit early if no table. Fixes #1141.
Ben Wagner a960be9e 2022-03-18T17:41:01 [woff2] Support overlap flag for simple glyphs. In the woff2 spec it has been proposed to allow the OVERLAP_SIMPLE flag to be retained through the woff2 format [0]. [0] https://www.w3.org/TR/WOFF2/#glyf_table_format * src/sfnt/sfwoff2.h (GLYF_OVERLAP_SIMPLE): add glyf flag. * src/sfnt/sfwoff2.c (reconstruct_glyf): parse optionFlags and overlapSimpleBitmap[]. (store_points): set OVERLAP_SIMPLE on first point's flag if the overlap bit is set.
Werner Lemberg d2c3bbcd 2022-03-19T19:31:25 [cff] Synchronize `cff_slot_load` with `TT_Load_Glyph`. * src/cff/cffgload.c (IS_DEFAULT_INSTANCE): New macro. (cff_slot_load): Use it.
Werner Lemberg 0c2bdb01 2022-03-19T09:37:28 * src/base/ftobjs.c (FT_Request_Size): Guard `face->size`. Fixes #1140.
Werner Lemberg d014387a 2022-03-19T09:30:45 * src/base/ftobjs.c (ft_open_face_internal): Thinko.
Ben Wagner 7789f2bb 2022-03-18T15:52:47 [doc] FT_OUTLINE_OVERLAP was introduced in 2.10.3. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Document when added.
Werner Lemberg 22a0cccb 2022-03-19T06:40:17 * src/base/ftobjs.c (ft_open_face_internal): Properly guard `face_index`. We must ensure that the cast to `FT_Int` doesn't change the sign. Fixes #1139.
Werner Lemberg 53dfdcd8 2022-03-17T19:24:16 [sfnt] Avoid invalid face index. Fixes #1138. * src/sfnt/sfobjs.c (sfnt_init_face), src/sfnt/sfwoff2.c (woff2_open_font): Check `face_index` before decrementing.
Werner Lemberg 1e2eb650 2022-03-07T10:13:29 Documentation, whitespace.
Anuj Verma 360e2507 2022-03-04T16:58:50 [sdf] Fix corner checks and improve performance. * src/sdf/ftsdf.c (sdf_generate_bounding_box): Always check for a corner if two distances (for different curves) are very close. (sdf_conic_to): Check whether the conic curve can be treated as a line (which happens if the control point coincides with any end point).
Anuj Verma 2600ef63 2022-03-04T16:53:27 [sdf] Implement deviation-based splitting for Bezier curves. * src/sdf/ftsdf.c (split_sdf_cubic, split_sdf_shape): Add checks to figure out the deviation of Bezier curves and stop splitting if the curve is flat enough. * src/sdf/ftsdfcommon.h (ONE_PIXEL): New macro.
Anuj Verma 5499d7bf 2022-03-04T16:42:02 * include/freetype/freetype.h: Improve SDF documentation.
Ben Wagner 335224be 2022-03-03T16:33:40 [sfnt] Fix bounds check in SVG. The `SVG_DOCUMENT_LIST_MINIMUM_SIZE` macro is non trivial and not protected by parentheses. As a result, the expression `table_size - SVG_DOCUMENT_LIST_MINIMUM_SIZE` expands to `table_size - 2U + SVG_DOCUMENT_RECORD_SIZE` instead of the expected `table_size - (2U + SVG_DOCUMENT_RECORD_SIZE)`. This causes an incorrect bounds check which may lead to reading past the end of the `SVG ` table. * src/sfnt/ttsvg.c (tt_face_load_svg): wrap macro definitions in parentheses. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45179
Ben Wagner 034e5dbf 2022-02-22T20:37:43 [psaux] Full bounds check for OtherSubr 19. It is possible for OtherSubr 19 to be invoked when `decoder->buildchar` is NULL (so that `decoder->len_buildchar` is 0), the `blend` is non-NULL with `blend->num_designs` set to 2, and the user supplied `idx` to be large (for example 0xFFFFFFFE). Since these are all `FT_UInt32` the existing bounds check overflows in a well defined manner, allowing for an invalid call to `memcpy`. In addition, it is possible to call OtherSubr 19 with `decoder->len_buildchar`, `blend->num_designs`, and `idx` all zero (implying that `blend->weight_vector` and `decoder->buildchar` are NULL). This passes the bounds check (it is logically always fine to copy nothing starting at index zero) but may invoke undefined behavior in `ft_memcpy` if it is backed by `memcpy`. Calling `memcpy` with either the `src` or `dst` NULL is undefined behavior (even if `count` is zero). * src/psaux/psintrp.c (cf2_interpT2CharString): Correctly check that `blend->num_designs` can be copied to `decoder->buildchar[idx]`. Also avoid passing NULL to `ft_memcpy`. Bug: https://crbug.com/1299259
suzuki toshiya bcdfa386 2022-02-20T23:55:32 [cmake] Drop the support of CMake 2.x. * CMakeLists.txt: Require CMake 3.0 (released on 2014) or newer. The issue #1059 reports the difficulty to support both of CMake 2.x and newer one by single CMakeLists.txt without the inflation of cmake_policy() workarounds. For better maintainability, the support of CMake 2.x is dropped.
Werner Lemberg 6c5522c6 2022-02-19T13:37:07 * src/bdf/README: Updated.