summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [gzip] Make static compilation not leak global symbols.David Vanderson2022-12-1410-144/+227
| | | | | | | | | | | | | | * src/gzip/ftgzip.c (HAVE_HIDDEN): Do not define; it is no longer needed because everything is static. (HAVE_MEMCPY): Define. (zcalloc, zcfree): Remove no longer needed definitions (because `Z_SOLO` is active). * src/gzip/patches/freetype-zlib.diff: Regenerated. Fixes #1146. Co-authored-by: Werner Lemberg <wl@gnu.org>
* * src/gzip/ftzconf.h: Updated to zlib 1.2.13.Werner Lemberg2022-12-142-3/+17
| | | | I forgot to copy that file.
* * builds/unix/configure.raw: Don't check for `memcpy` and `memmove`.Werner Lemberg2022-12-141-3/+0
| | | | We expect a C99 compiler, and both functions are part of this standard.
* [sdf, sfnt] Handle minor compiler warnings.Werner Lemberg2022-12-132-3/+5
| | | | | | | | * src/sdf/ftsdf.c (get_min_distance_conic): Initialize `nearest_point`. * src/sfnt/ttsvg.c (find_doc): Initialize `mid_doc`. Fixes #1195.
* * subprojects/zlib.wrap: Micro-update from upstream.Werner Lemberg2022-12-071-4/+4
|
* * include/freetype/internal/ftcalc.h (FT_MSB): Support Open Watcom 2.0.Jiří Malák2022-12-061-5/+5
| | | | Closes !232.
* * src/base/ftdbgmem.c (ft_mem_source_compare): Add FT_COMPARE_DEF.Luca Bacci2022-11-221-1/+1
| | | | Closes !230.
* * src/autofit/afloader.c (af_loader_load_glyph): Remove `size` check.Alexei Podtelezhnikov2022-11-201-6/+1
| | | | This is done by `FT_Load_Glyph`.
* Comments added.Alexei Podtelezhnikov2022-11-181-0/+2
|
* * src/autofit/afloader.c (af_loader_load_glyph): Fix dereference.Johan Matsson2022-11-161-1/+3
| | | | | | | | This must happen after the NULL check. Taken from https://github.com/freetype/freetype/pull/2
* * src/pcf/pcfutil.c ({Two,Four}ByteSwap): Use builtins or shifts.Alexei Podtelezhnikov2022-11-141-18/+33
| | | | | We trust glibc which uses shifts or builtins to swap bytes. This must be more efficient.
* * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Integer overflow.Werner Lemberg2022-11-141-1/+2
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462
* [meson] Use generated ftmodule.hLoïc Yhuel2022-11-141-1/+4
| | | | | | | | ftmodule.h is generated at the root of the build directory, but FT_CONFIG_MODULES_H (freetype/config/ftmodule.h) is used instead. This makes the build fail when disabling modules in modules.cfg. * meson.build (harfbuzz_dep): Add '-DFT_CONFIG_MODULES_H=<ftmodule.h>'.
* [meson] Fix generated ftmodule.hLoïc Yhuel2022-11-141-7/+9
| | | | | | The sdf module wasn't recognized, so the generated ftmodule.h had "None_renderer_class". * builds/meson/parse_modules_cfg.py: Handle sdf in RASTER_MODULES.
* Add `TT_CONFIG_OPTION_NO_BORING_EXPANSION` configuration macro.Dominik Röttsches2022-11-123-2/+49
| | | | | | | | | | | This gives users a possibility to deactivate new features not (yet) in the OpenType standard. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_NO_BORING_EXPANSION): New macro. * src/truetype/ttgxvar.c (ft_var_load_avar): Use it to disable 'avar' version 2.0 support.
* [truetype] Improve bounds checks for `ItemVariationStore`.Behdad Esfahbod2022-11-121-11/+6
| | | | | | | * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Move bounds check ... (tt_var_get_item_delta): ... to this function, because it is safer. For example, the 'avar' table 2.0 codepath was not performing a bounds check at all.
* [truetype] In `ItemVariationStore`, value 0xFFFF for `dataCount` is valid.Behdad Esfahbod2022-11-121-10/+0
| | | | | | | It corresponds to outer indices of 0 to 0xFFFE. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Remove invalid code.
* [pcf] Improve CMap efficiency and readability.Alexei Podtelezhnikov2022-11-101-45/+24
| | | | | * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Check and walk the encoding array indexes.
* Fix `-Wstrict-prototypes`.Sam James2022-11-102-2/+2
| | | | | | | | | * builds/unix/configure.raw: Fix `-Wstrict-prototypes`. Clang 16 warns on these and they will be dropped in C23. * builds/unix/freetype2.m4: Ditto. Signed-off-by: Sam James <sam@gentoo.org>
* [truetype] Check avar_segment before accessBen Wagner2022-11-091-3/+6
| | | | | | | | | * src/truetype/ttgxvar.c (tt_done_blend): check `avar_segment` before accessing to free its `correspondence`. Reported as: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53062
* [truetype] Restore behavior of ft_var_load_hvvarBen Wagner2022-11-091-9/+6
| | | | | | | | | | | | | | | | | | | | | * src/truetype/ttgcvar.c (ft_var_load_hvvar): restore previous behavior In a previous change [0] the behavior of `ft_var_load_hvvar` was changed to not load the item variation store if it was at offset 0, but not return an error when this happened. This broke any users, like `tt_hvadvance_adjust`, that rely on successful completion of `ft_var_load_hvvar` to imply that returned table's `itemStore` had been initialized. This lead such users to dereference NULL. This change appears to have been unintentional and unrelated to the actual avar2 changes. As a result, fix these NULL dereferences by restoring the code to always attempt to initialize the `itemStore`. [0] ae4eb996 "[truetype] Add support for `avar` table 2.0 format." Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53061
* docs/CHANGES: Updated.Werner Lemberg2022-11-081-2/+22
|
* [build] use AC_CHECK_PROG() macro for libpng-config detectionsuzuki toshiya2022-11-081-6/+2
| | | | * builds/unix/configure.raw: use AC_CHECK_PROG() instead of `which` to find `libpng-config`.
* [build] fix for make multisuzuki toshiya2022-11-083-0/+3
| | | | | | | | Fix "make multi" by MR !223 * include/freetype/internal/services/svmm.h: include ftmm.h to define FT_Get_MM_Func. * src/truetype/ttgxvar.h: include ftmmtypes.h to use GX_AVarTable properly. * src/base/ftmac.c: include ftdebug.h to use FT_THROW() properly.
* * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Accelerate the search.Alexei Podtelezhnikov2022-11-071-3/+8
| | | | | This is mostly for consistency because PFR fonts with bitmap strikes do not seem to exist.
* [bdf, pfr, psnames] Accelarate charmap searches.Alexei Podtelezhnikov2022-11-063-44/+45
| | | | | | | | | | | | | | The binary searches within charmaps can be accelerated because they often contain dense continuous blocks of character codes. Within such blocks, you can predict matches based on misses. This method has been deployed in `bdf` since 0f122fef34; we only refactor it there. We now use it in `pfr` and `psnames`, which speeds up the unicode charmap access by about 50% in PFR and Type 1 fonts. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Refactor. * src/pfr/pfrcmap.c (pfr_cmap_char_{index,next}): Predict `mid` based on the mismatch distance. * src/psnames/psmodule.c (ps_unicodes_char_{index,next}): Ditto.
* [truetype] Add support for `avar` table 2.0 format.Behdad Esfahbod2022-11-042-40/+176
| | | | | | | | | | | | | | | | | | | See https://github.com/harfbuzz/boring-expansion-spec/blob/main/avar2.md for the specification. Currently, this is implemented only in most recent OS versions on Apple platforms and in the HarfBuzz library, but it is expected to be added to the OpenType standard soon. * src/truetype/ttgxvar.h (GX_AVarTableRec): New structure. (GX_BlendRec): Use it to replace `avar_segment` with `avar_table`. * src/truetype/ttgxvar.c (ft_var_load_avar): Load new table version. (ft_var_to_normalized, tt_done_blend): Extend for new format. (ft_var_load_hvvar, ft_var_to_design): Updated.
* Replace '1/64th' (and similar entries) with '1/64' in docs and comments.Werner Lemberg2022-10-249-20/+20
|
* * include/freetype/*: Fix documentation typos.Ivan Panchenko2022-10-243-18/+17
|
* * src/truetype/ttgload.c: Cosmetic changes.Alexei Podtelezhnikov2022-10-211-24/+11
|
* [cff, truetype] Simplify SVG metrics scaling.Alexei Podtelezhnikov2022-10-212-35/+23
| | | | | | | | Use pre-calculated scaling factors. Also, the advance widths used to be rounded, which was incorrect. * src/cff/cffgload.c (cff_slot_load): Use `x_scale` and `y_scale`. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
* * subprojects/zlib.wrap: Update to zlib version 1.2.13.Werner Lemberg2022-10-201-8/+8
|
* [sfnt] Additional bounds checks for `COLR` v1 table handling.Dominik Röttsches2022-10-181-11/+18
| | | | | | | | | | | * src/sfnt/ttcolr.c (read_paint): Add `colr` argument, necessary for... ... another use of `ENSURE_READ_BYTES`. Update callers. (tt_face_get_paint_layers): Ensure that the 4-byte paint table offset can be read. This is a follow-up to !124 and issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404
* [gzip] Update sources to zlib 1.2.13.Werner Lemberg2022-10-189-56/+74
|
* * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Simplify calculations.Alexei Podtelezhnikov2022-10-181-21/+12
|
* Minor formatting.Werner Lemberg2022-10-182-14/+12
|
* [sfnt] Guard individual `COLR` v1 paint field reads.Dominik Röttsches2022-10-181-2/+38
| | | | | | | | | | | * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): New macro. (read_paint): Use it – after the start pointer `p` has been checked for whether it allows reading the format byte, each successive paint table field read need to be bounds-checked before reading further values. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404
* * builds/toplevel.mk: Prefix all paths with `$(TOP_DIR)/`.Xiang Xiao2022-10-171-22/+22
| | | | | | This is useful for builds that are not started from the root directory. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
* * src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant.Liu Kunpeng(柳鲲鹏)2022-10-162-5/+18
| | | | * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it.
* Note the lack of floating-point data types.Alexei Podtelezhnikov2022-10-142-2/+6
|
* [cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`.Werner Lemberg2022-10-104-39/+20
| | | | | | | | | This ancient option stayed completely undocumented. Given that the 'cff' driver requires the 'psnames' module, it makes no sense today to have this macro. * src/cff/cffdrivr.c (cff_services), src/cff/cffobjs.c (cff_face_init): Remove corresponding conditional code.
* Synchronize `ftoption.h` flavours.Werner Lemberg2022-10-101-4/+6
|
* Minor comment changes.Werner Lemberg2022-10-102-6/+6
|
* Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name.Alexei Podtelezhnikov2022-10-041-94/+96
|
* [autofit] Reset the face charmap directly.Alexei Podtelezhnikov2022-10-034-5/+4
| | | | | | | | | There is no need to validate the original charmap in `FT_Set_Charmap`. It can be reset directly. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Use direct assignment. * src/autofit/af{latin,cjk,indic}.c (af_latin_metrics_init): Ditto.
* * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.Alexei Podtelezhnikov2022-10-031-8/+2
| | | | | | As with the previous commit, we can avoid the validation checks of `FT_Set_Charmap` and set it directly when choosing from the available list.
* * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Avoid `FT_Set_Charmap`. Alexei Podtelezhnikov2022-10-031-8/+6
| | | | | Set charmap aggressively without all validations of `FT_Set_Charmap` because we take it from the available array and only temporarily. Even CMap Format 14 will gracefully return 0.
* * src/cache/ftcbasic.c (ftc_basic_family_get_count): Remove redundancy.Alexei Podtelezhnikov2022-10-031-2/+1
|
* * src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.Werner Lemberg2022-09-301-2/+4
| | | | | | | Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid overflow. Fixes #1180.
* * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.Werner Lemberg2022-09-301-3/+3
|