|
fc15ebe0
|
2022-03-21T11:15:41
|
|
* src/sfnt/ttkern.c (tt_face_get_kerning): Exit early if no table.
Fixes #1141.
|
|
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.
|
|
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.
|
|
0c2bdb01
|
2022-03-19T09:37:28
|
|
* src/base/ftobjs.c (FT_Request_Size): Guard `face->size`.
Fixes #1140.
|
|
d014387a
|
2022-03-19T09:30:45
|
|
* src/base/ftobjs.c (ft_open_face_internal): Thinko.
|
|
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.
|
|
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.
|
|
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.
|
|
1e2eb650
|
2022-03-07T10:13:29
|
|
Documentation, whitespace.
|
|
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).
|
|
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.
|
|
5499d7bf
|
2022-03-04T16:42:02
|
|
* include/freetype/freetype.h: Improve SDF documentation.
|
|
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
|
|
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
|
|
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.
|
|
6c5522c6
|
2022-02-19T13:37:07
|
|
* src/bdf/README: Updated.
|
|
ca46bc0c
|
2022-02-19T13:34:05
|
|
* builds/mac/ftmac.c, src/base/ftmac.c: s|FT_MAC_H|<freetype/ftmac.h>|.
|
|
5b26e92a
|
2022-02-19T05:26:53
|
|
src/sfnt/ttkern.c (tt_face_load_kern): Micro-optimize.
A kerning table can be handled by binary search if it has equal entries.
Fixes #1132.
|
|
20ec99be
|
2022-02-17T13:35:52
|
|
[builds/windows] Add support for legacy UWP builds.
* builds/windows/ftsystem.c: Add neccessary macro substitutions to
enable strict UWP builds.
See !141.
Co-authored-by: Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
01d4deb0
|
2022-02-16T14:21:00
|
|
ftmm.h: Minor documentation improvement.
|
|
00ae29fc
|
2022-02-12T23:42:08
|
|
[pshinter] Tune PSH_STRONG_THRESHOLD_MAXIMUM value.
Before the change, the hinting engine frequently confused horizontal
stem and serif hints making some stems too thin and some serifs too
thick. The value was tuned using serif fonts from the URW+ base 35
collection.
* src/pshinter/pshalgo.c [PSH_STRONG_THRESHOLD_MAXIMUM]: s/30/12/.
|
|
5a53e51b
|
2022-02-12T07:58:43
|
|
t1tables.h: Documentation improvements.
|
|
c67ecb8c
|
2022-02-12T07:52:57
|
|
t1tables.h: Whitespace.
|
|
338b4e88
|
2022-02-11T19:32:49
|
|
[type42] Fix `FT_Get_PS_Font_Private` for this format.
Since Type42 fonts don't have a 'Private' dictionary, the return value
should be `FT_Err_Invalid_Argument`.
* src/type42/t42drivr.c (t42_ps_get_font_private): Removed.
(t42_service_ps_info): Updated.
|
|
1680885a
|
2022-02-09T16:41:07
|
|
[pshinter] Clear reused mask.
In PS hinter, memory allocations persist until the module is done.
Therefore, we have to clear reused masks.
* src/pshinter/pshrec.c (ps_mask_table_alloc): Clear reused mask.
|
|
0447df71
|
2022-02-09T15:04:58
|
|
[pshinter] Use unsigned indices.
This reduces casting and eliminates some checks.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_table_merge,
ps_dimension_add_t1stem, ps_hints_t1stem3): Updated.
(ps_dimension_add_counter): Updated, unnecessary checks removed.
|
|
ed0e2e76
|
2022-02-08T16:35:14
|
|
[pshinter] Fix mask merging.
We forgot to update the number of bits when merging a larger mask
into a smaller one. This fix might have rendering effects.
* src/pshinter/pshrec.c (ps_mask_table_merge): Inherit the number
of bits from a larger mask. There is no need to zero unused bits,
already zeroed during allocation.
(ps_mask_clear_bit): Removed.
(ps_mask_ensure): Minor.
|
|
7c6b2f20
|
2022-02-08T14:37:34
|
|
[pshinter] Revise the hint table handling.
* src/pshinter/pshrec.c (ps_hint_table_ensure): Remove redundant size
check; avoid array zeroing because it is fully initialized when used.
(ps_hint_table_alloc): Fix off-by-one comparison and remove another
zeroing of the array elements.
|
|
24db55ec
|
2022-02-05T09:06:39
|
|
Various minor doc fixes.
|
|
a173aead
|
2022-02-06T08:25:52
|
|
[builds/windows] Add SVG to to project files.
* builds/windows/vc2010/freetype.vcxproj: Updated.
* builds/windows/vc2010/freetype.vcxproj.filters: Updated.
* builds/windows/visualc/freetype.vcproj: Updated.
|
|
dd8676b2
|
2022-02-03T14:32:50
|
|
* src/winfonts/winfnt.c (fnt_face_get_dll_font): Trace font resources.
|
|
56d182a7
|
2022-02-02T18:14:19
|
|
[cmake] Fix build on MacOS.
* CMakeLists.txt (CMAKE_OSX_ARCHITECTURES): Update value to fix the building
of a framework on MacOS.
* builds/mac/freetype-Info.plist (CFBundleExecutable): Make identifier
lowercase only.
Fixes #1127.
|
|
8e39e42e
|
2022-02-02T11:35:14
|
|
[psaux] Revise `PS_Table` handling.
The old impleemntation was not using `FT_REALLOC`, buing too careful
with the offset rebasing. It shoudl be safe to rely on the base
movements.
* src/psaux/psobjs.c (reallocate_t1_table, shift_elements): Combine
into...
(ps_table_realloc): ... this function based on `FT_REALLOC`.
(ps_table_done): Simplified.
(ps_table_add): Updated.
|
|
c6dd509b
|
2022-02-02T11:32:58
|
|
* src/cache/ftcmru.c (FTC_MruList_New): Explain zeroing.
|
|
946e1353
|
2022-01-31T14:19:07
|
|
[cache] Partially revert 9870b6c07e2c.
Fix crashes reported by Werner.
* src/cache/ftcmru.c (FTC_MruList_New): Use `FT_ALLOC` again.
|
|
36ee3160
|
2022-01-31T10:37:56
|
|
freetype.h: Minor documentation improvement.
|
|
983d4358
|
2022-01-30T22:13:51
|
|
[cache] Fix fallouts from edd4fedc5427.
Reported by Werner.
* src/cache/ftcimage.c (FTC_INode_New): Always initialize FT_Glyph.
* src/cache/ftcsbits.c (FTC_SNode_New): Always initialize FT_SBit.
|
|
bee88864
|
2022-01-30T21:55:21
|
|
Clean-up - do not doubt FT_FREE.
* src/base/ftobjs.c (memory_stream_close): Do not reassign zero
after `FT_FREE`.
* src/sfnt/sfwoff.c (sfnt_stream_close): Ditto.
* src/sfnt/sfwoff2.c (stream_close): Ditto.
* src/psaux/psobjs.c (ps_parser_load_field): Ditto.
* src/truetype/ttgxvar.c (ft_var_load_avar, tt_set_mm_blend,
tt_set_mm_blend): Ditto.
|
|
7fd03a3e
|
2022-01-30T20:50:42
|
|
* CMakeLists.txt: Include 'FindPkgConfig' module.
Older cmake versions don't provide `pkg_check_modules` by default.
Fixes #1126.
|
|
da877c86
|
2022-01-29T22:46:56
|
|
* src/psaux/psobjs.c (ps_parser_load_field): Reduce `string` scope.
|
|
35740aa6
|
2022-01-28T12:04:36
|
|
[cmake] Check the availability of `bzip2.pc'.
(CMakeLists.txt): Check the availability of `bzip2.pc'.
* If `bzip2.pc' is available, Requires.private should include
bzip2, but Libs.private should not include -lbz2.
* If `bzip2.pc' is unavailable, Requires.private cannot include
bzip2, but Libs.private should include -lbz2.
Fix #897.
|
|
fa226478
|
2022-01-28T15:20:12
|
|
* unix/configure.raw: We need 'librsvg' version 2.46.0 or newer.
Older versions don't have function `rsvg_handle_get_intrinsic_dimensions`.
|
|
b34741c1
|
2022-01-27T22:55:34
|
|
Minor clean-ups.
* src/base/ftrfork.c (raccess_make_file_name): Do not set error.
* src/sfnt/sfdriver.c (get_win_string, get_apple_string): Ditto.
* src/cff/cffobjs.c (cff_strcpy): Do not confuse about error.
* src/psaux/psobjs.c (ps_table_done): Ditto.
* src/truetype/ttgxvar.c (ft_var_readpacked*, ft_var_load_avar): Ditto.
|
|
e34a860a
|
2022-01-27T11:50:12
|
|
Document `FT_Outline_Decompose` degenerate segments.
`FT_Outline_Decompose` does not filter out and can return degenerate
segments in an outline. This can be surprising when attemping to
stroke such an outline. Clarify the existing documentation on this
matter to cover all forms of degeneracy (without specifying exactly
how they will be reported), why they might arise, and better explain in
what cases they may be an issue.
* include/freetype/ftoutlin.h (FT_Outline_Decompose): update
documentation.
Fixes #952.
|
|
ab1c98ac
|
2022-01-27T15:23:47
|
|
Fix sdf computation while `USE_SQUARED_DISTANCES`.
Function `map_fixed_to_sdf` expects spread to be absolute
and not squared.
* src/sdf/ftbsdf.c (finalize_sdf): Pass absolute spread
while `map_fixed_to_sdf`.
* src/sdf/ftsdf.c (sdf_generate_bounding_box): Ditto.
|
|
3d77756e
|
2022-01-27T08:34:48
|
|
[sfnt] Improve sRGB constants.
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use slightly
more precise values.
Fixes #1018.
|
|
9476cb7e
|
2022-01-27T08:32:42
|
|
docs/release: Updated.
|
|
837f0345
|
2022-01-26T15:49:24
|
|
* src/pfr/pfrload.c (pfr_phy_font_load): Use FT_QNEW_ARRAY.
|
|
0ac53590
|
2022-01-26T14:02:27
|
|
* src/sdf/ftsdf.c (sdf_*_new): Use standard macro.
|
|
09223ef9
|
2022-01-26T11:23:38
|
|
[pcf] Delay encoding allocation and avoid its zeroing.
* src/pcf/pcfread.c (pcf_get_encodings): Refactor and use FT_QNEW_ARRAY.
|
|
267c6918
|
2022-01-25T14:46:36
|
|
Aarg, typo.
|
|
9af1127f
|
2022-01-25T14:45:10
|
|
freetype.h: More updates to `FT_LOAD_COLOR` description.
|
|
8b7226bb
|
2022-01-25T14:28:45
|
|
* builds/unix/configure.raw (FT_DEMO_CFLAGS): Pass `-DHAVE-LIBRSVG`.
This helps in decoupling library support from `pkg-config` for other
platforms.
|
|
6a8e95b7
|
2022-01-25T08:49:41
|
|
Update documentation for `FT_LOAD_COLOR`.
|
|
5e9caaee
|
2022-01-24T12:19:20
|
|
[pshinter] Ensure all point flags are initialized.
Only off curve point flags were fully initialized.
* src/pshinter/pshalgo.c (psh_glyph_init): always initialize flags.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43930
|
|
65774521
|
2022-01-24T07:57:20
|
|
.mailmap: Typo.
|
|
ef48a332
|
2022-01-23T19:05:15
|
|
* src/svg/ftsvg.c (ft_svg_property_set): Disallow NULL pointers.
|
|
cddfe657
|
2022-01-23T12:28:21
|
|
.mailmap: Updated.
|
|
21d0fa37
|
2022-01-23T12:03:44
|
|
More documentation on handling OT-SVG.
|
|
9c153852
|
2022-01-23T08:56:17
|
|
* src/svg/ftsvg.c: Rename `svg_hooks` to `svg-hooks` for consistency.
|
|
112527dd
|
2022-01-22T11:45:30
|
|
[sfnt] Reject malformed SVG tables.
* src/sfnt/ttsvg.c (SVG_TABLE_HEADER_SIZE, SVG_DOCUMENT_RECORD_SIZE,
SVG_DOCUMENT_LIST_MINIMUM_SIZE, SVG_MINIMUM_SIZE): New macros.
(tt_face_load_svg): Check offsets.
Check table and record sizes.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43918
|
|
706c79a1
|
2022-01-21T22:46:35
|
|
* src/psaux/psobjs.c (ps_table_new): Revert to zeroing.
|
|
0d2b4952
|
2022-01-20T14:47:01
|
|
[psaux, type1, type42] Avoid annecessary zeroing.
* src/psaux/psobjs.c (ps_table_new): Use FT_QNEW_ARRAY.
* src/type1/t1load.c (parse_encoding): Ditto.
* src/type42/t42parse.c (t42_parse_encoding): Ditto.
|
|
02fa26f4
|
2022-01-03T17:48:36
|
|
[builds/unix] Handle 'librsvg' for demo programs.
* builds/unix/configure.raw: Check for 'librsvg'.
(LIB_CLOCK_GETTIME): Don't call `AC_SUBST` on this but on...
(FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables.
* builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): Replaced by...
(FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables.
|
|
0bf49bd2
|
2021-12-25T20:14:11
|
|
Add 'svg' module for OT-SVG rendering.
* CMakeLists.txt (BASE_SRCS): Add svg module file.
* meson.build (ft2_public_headers): Add `otsvg.h`.
* modules.cfg (RASTER_MODULES): Add `svg` module.
* builds/meson/parse_modules_cfg.py: Add svg module.
* include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`.
* include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and
`Missing_SVG_Hooks` error codes.
* include/freetype/internal/fttrace.h: Add tracing for `otsvg`.
* include/freetype/internal/svginterface.h: New file. It adds an interface
to enable the presetting hook from the `base` module.
* include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func,
SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering.
(SVG_RendererHooks): New structure to access them.
* src/base/ftobjs.c: Include `svginterface.h`.
(ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG
glyphs.
(ft_add_renderer): Updated.
* src/svg/*: New files.
|
|
97c09a80
|
2021-12-25T19:55:58
|
|
Add `FT_Glyph` support for OT-SVG glyphs.
* include/freetype/ftglyph.h (FT_SvgGlyphRec, FT_SvgGlyph): New structure.
* src/base/ftglyph.c: Include `otsvg.h`.
(ft_svg_glyph_init, ft_svg_glyph_done, ft_svg_glyph_copy,
ft_svg_glyph_transform, ft_svg_glyph_prepare): New function.
(ft_svg_glyph_class): New class.
(FT_New_Glyph, FT_Glyph_To_Bitmap): Updated to handle OT-SVG glyphs.
* src/base/ftglyph.h: Updated.
|
|
5cf01aa2
|
2021-12-25T19:46:46
|
|
[truetype, cff] Add code to load SVG document.
* src/cff/cffgload.c (cff_slot_load): Add code to load SVG doc.
* src/truetype/ttgload.c (TT_Load_Glyph): Add code to load SVG doc.
|
|
f93a897a
|
2021-12-25T19:20:44
|
|
Add code to load OT-SVG glyph documents.
* include/freetype/config/ftheader.h (FT_OTSVG_H): New macro.
* include/freetype/freetype.h (FT_FACE_FLAG_SVG, FT_HAS_SVG): New macros.
(FT_LOAD_SVG_ONLY): New internal macro.
* include/freetype/ftimage.h (FT_Glyph_Format): New enumeration value
`FT_GLYPH_FORMAT_SVG`.
* include/freetype/internal/ftobjs.h (FT_GLYPH_OWN_GZIP_SVG): New macro.
* include/freetype/internal/fttrace.h: Add `ttsvg` for `ttsvg.c`.
* include/freetype/internal/sfnt.h(load_svg, free_svg, load_svg_doc): New
functions.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add `svg` for
the SVG table.
* include/freetype/otsvg.h (FT_SVG_DocumentRec): New structure to hold the
SVG document and other necessary information of an OT-SVG glyph in a glyph
slot.
* include/freetype/tttags.h (TTAG_SVG): New macro.
* src/base/ftobjs.c: Include `otsvg.h`.
(ft_glyphslot_init): Allocate `FT_SVG_DocumentRec` in `slot->other`
if the SVG table exists.
(ft_glyphslot_clear): Free it upon clean-up if it is a GZIP compressed
glyph.
(ft_glyphslot_done): Free the document data if it is a GZIP compressed
glyph.
(FT_Load_Glyph): Don't auto-hint SVG documents.
* src/cache/ftcbasic.c (ftc_basic_family_load_glyph): Add support for
FT_GLYPH_FORMAT_SVG.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttsvg.c`.
* src/sfnt/sfdriver.c: Include `ttsvg.h`.
(sfnt_interface): Add `tt_face_load_svg`, `tt_face_free_svg` and
`tt_face_load_svg_doc`.
* src/sfnt/sfnt.c: Include `ttsvg.c`.
* src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Add code to load and
free data of the the SVG table.
* src/sfnt/ttsvg.c: New file, implementing `tt_face_load_svg`,
`tt_face_free_svg` and `tt_face_load_svg_doc`.
* src/sfnt/ttsvg.h: Declarations of the SVG functions in
`ttsvg.c`.
|
|
06c1a25e
|
2021-12-25T17:59:42
|
|
Add flag `FT_CONFIG_OPTION_SVG`.
This flag is going to be used to conditionally compile support for OT-SVG
glyphs. FreeType will do the parsing and rely on external hooks for
rendering of OT-SVG glyphs.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_SVG): New flag.
|
|
0b635b1e
|
2022-01-20T15:06:25
|
|
[pshinter] Avoid unnecessary zeroing.
* src/pshinter/pshalgo.c (psh_hint_table_init,psh_glyph_init,
psh_glyph_interpolate_normal_points): Use FT_QNEW_ARRAY.
|
|
99a940f8
|
2022-01-20T15:06:09
|
|
* include/freetype/freetype.h: Clarify `FT_Size` life cycle.
|
|
054782c4
|
2022-01-19T22:14:06
|
|
[base] Undefined scale means no scale.
It might be surprising that FreeType does not have default ppem and
the size has to be set explicitly or face undefined behavior with
undefined variables and errors. This offers an alternative to
missing or zero scale by simply setting FT_LOAD_NO_SCALE. Defined
behavior is bettr than undefined one.
This is alternative to !132 and discussed in
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43708
* src/base/ftobjs.c (FT_Load_Glyph): Deal with zero scale.
* include/freetype/freetype.h: Document it.
|
|
773e31c7
|
2022-01-18T14:05:46
|
|
* src/autofit/afglobal.c (af_face_globals_new): Reduce zeroing.
Everything in AF_FaceGlobals is initialized except metrics. Those
are zeroed here and initialized on demand later.
|
|
d118bf8e
|
2022-01-15T23:09:53
|
|
[bdf,type1] Avoid unnecessary hash zeroing.
* src/bdf/bdflib.c (_bdf_parse_start): Use `FT_QALLOC`.
* src/type1/t1load.c (parse_subrs): Use `FT_QNEW`.
|
|
3f6497bd
|
2022-01-15T22:44:28
|
|
Add Watcom C/C++ calling.
In the unlikely case the source is built with OpenWatcom's -ec?
switches to enforce a calling convention, the qsort() compare
function must still be set to __watcall.
* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
Updated.
|
|
5e227133
|
2022-01-15T17:08:18
|
|
[pshinter] Avoid accessing uninitialized zone.
The `normal_top.count` may be 0, implying no `normal_top.zones` exist.
The code must not access these (non-existent) `normal_top.zones`.
* src/pshinter/pshalgo.c (ps_hints_apply): Do not assume that
`normal_top.zones[0]` is initialized. Test `normal_top.count`
before using `normal_top.zones[0]`. Do not rescale if there are no
`zones`.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43675
|
|
edd4fedc
|
2022-01-14T22:53:57
|
|
[cache] Avoid unnecessary zeroing.
* src/cache/ftccmap.c (ftc_cmap_node_new): Use `FT_QNEW`.
* src/cache/ftcimage.c (FTC_INode_New): Ditto.
* src/cache/ftcsbits.c (FTC_SNode_New): Ditto.
|
|
11ea89b5
|
2022-01-14T22:07:44
|
|
Add Watcom C/C++ support.
* include/freetype/config/integer-types.h: Make sure `long long` is
used then available.
* include/freetype/internal/ftcalc.h (FT_MSB): Add Watcom C/C++ pragma.
|
|
ba5d661f
|
2022-01-14T21:54:17
|
|
* src/sdf/ftbsdf.c (ED): s/near/prox/.
This works around the Watcom C definition of `near` as restricted
__near.
|
|
7f7bf6f0
|
2022-01-14T20:33:28
|
|
* include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten.
This works around Watcom C library using __watcall.
|
|
7eb9a9db
|
2022-01-14T14:40:11
|
|
* src/pshinter/pshglob.c (psh_globals_new): Avoid zeroing.
This large allocation is followed by careful initialization. Whatever
is missed should be initialized manually.
|
|
81b81feb
|
2022-01-14T18:22:23
|
|
* src/base/fthash.c (hash_insert): Avoid unnecessary zeroing.
|
|
904ad212
|
2022-01-13T23:38:56
|
|
* src/bdf/bdflib.c (_bdf_parse_glyphs): Remove redundant assignment.
|
|
ee52b571
|
2022-01-13T09:45:48
|
|
* src/lzw/ftlzw.c (FT_Stream_OpenLZW): Avoid unnecessary zeroing.
|
|
6ee89519
|
2022-01-12T15:12:53
|
|
[bzip2] Reset bzip stream on any error.
According to the bzip documentation it is undefined what will happen if
`BZ2_bzDecompress` is called on a `bz_stream` it has previously returned an
error against. If `BZ2_bzDecompress` returns anything other than `BZ_OK`
the only valid next action is `BZ2_bzDecompressEnd`.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43564
* src/bzip2/ftbzip2.c (FT_BZip2FileRec_): Add `reset` to track the need to
reset the stream.
(ft_bzip2_file_init): Initialize `reset` to 0.
(ft_bzip2_file_reset): Set `reset` to 0 after resetting.
(ft_bzip2_file_fill_output): Set `reset` to 1 when `BZ2_bzDecompress`
returns anything other than `BZ_OK`.
|
|
b647dbde
|
2022-01-12T06:21:52
|
|
.gitlab-ci.yml: Minor comment cleanups.
|
|
ca44a236
|
2022-01-12T04:26:39
|
|
.gitlab-ci.yml: Add steps to `before_script` to ensure recent CA.
Fetch current list of valid CAs from Windows Update and manually import them
to trusted datastore. This action is required to make downloads work from
sites that need recent Let's Encrypt ISRG Root X1 certificate.
|
|
f1d3b9f1
|
2022-01-11T17:15:35
|
|
Revert "[bzip2] Avoid use of uninitialized memory."
This reverts commit d276bcb7f0c02c20d3585b2e5626702df6d140a6.
The original commit did avoid the use of uninitialized memory. However,
it appears that the original commit is no longer required. The
underlying issue was resolved by a change in freetype2-testing "Build
bzip2 correctly." [0]. Prior to [0] bzip2 was built without msan, so
bzip2 writes were not tracked or considered initialized. Clearing
`buffer` in the original commit allowed msan to see the `buffer` content
initialized once in FreeType code, but msan saw no writes into buffer
from bzip2. With bzip2 now built with msan, the bzip2 writes are
properly instrumented and msan sees the bzip2 writes into the buffer. As
a result the original commit can be safely reverted to allow for better
detection of other uninitialized data scenarios.
* src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Revert to using `FT_QNEW`.
[0] https://github.com/freetype/freetype2-testing/commit/3c052a837a3c960709227a0d6ddd256e87b88853
|
|
e838c37c
|
2022-01-11T11:14:32
|
|
[type42] Track how much type42 ttf data is available.
Currently `T42_Open_Face` eagerly allocates 12 bytes for the ttf header
data which it expects `t42_parse_sfnts` to fill out from /sfnts data.
However, there is no guarantee that `t42_parse_sfnts` will actually be
called while parsing the type42 data as the /sfnts array may be missing
or very short. This is also confusing behavior as it means
`T42_Open_Face` is tightly coupled to the implementation of the very
distant `t42_parse_sfnts` code which requires at least 12 bytes to
already be reserved in `face->ttf_data`.
`t42_parse_sfnts` itself eagerly updates `face->ttf_size` to track how
much space is reserved for ttf data instead of traking how much data has
actually been written into `face->ttf_data`. It will also act strangely
in the presense of multiple /sfnts arrays.
* src/type42/t42objs.c (T42_Open_Face): ensure `ttf_data` is initialized
to NULL. Free `ttf_data` on error.
* src/type42/t42parse.c (t42_parse_sfnts): delay setting `ttf_size` and
set it to the actual number of bytes read. Ensure `ttf_data` is freed
if there are multiple /sfnts arrays or there are any errors.
|
|
3876846e
|
2022-01-11T13:40:20
|
|
[sfnt] Fix limit checks for `COLR` v1 ClipBoxes
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Fix off-by-one in
limit checks.
|
|
d0cfb4e1
|
2022-01-11T10:54:10
|
|
Update all copyright notices.
|
|
947fddc8
|
2022-01-09T07:26:26
|
|
* src/sfnt/ttcolr.c (read_paint): Fix undefined left-shift operation.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43151
|
|
639a0215
|
2022-01-11T09:14:48
|
|
* src/type42/t42objs.c (T42_Open_Face): Avoid use of uninitialized memory.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43508
|
|
33626164
|
2022-01-11T08:01:30
|
|
.gitlab-ci.yml: Fix typo in previous commit.
|
|
4c0db607
|
2022-01-11T07:52:28
|
|
.gitlab-ci.yml: Update Windows image.
The old image produced errors like
```
Downloading zlib patch from
https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch
A fallback URL could be specified using patch_fallback_url key in the wrap file
WrapDB connection failed to
https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch
with error
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
failed: certificate has expired (_ssl.c:1122)>
```
|
|
2e62b744
|
2022-01-11T05:37:56
|
|
* subprojects/zlib.wrap: Update from upstream.
|
|
4a89112b
|
2022-01-08T16:56:57
|
|
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Add limit checks.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40716
|
|
3f9b78fc
|
2022-01-10T18:19:41
|
|
[zlib] Don't typedef `ptrdiff_t`.
While using zlib in 'solo' mode (via the `Z_SOLO` macro), we actually
include some standard header files, making the typedef fail on systems where
the native `ptrdiff_t` type differs.
Fixes #1124.
* src/zlib/zutil.h: Comment out definition; it doesn't work on Windows.
* src/zlib/patches/freetype-zlib.diff: Updated.
|
|
da8a8b8b
|
2022-01-10T17:25:47
|
|
[zlib] Some organizational changes.
We now first apply zlib's `zlib2ansi` script, then FreeType's patch file.
* src/gzip/README.freetype: Updated.
* patches/0001-zlib-Fix-zlib-sources-to-compile-for-FreeType.patch: Renamed
to...
* patches/freetype-zlib.diff: This.
Clean up description, then regenerate it as follows:
- Copy unmodified files from `zlib` repository.
- Run `zlib2ansi` script.
- Run `git diff -R > patches/freetype-zlib.diff.new`.
- Insert patch description of old diff file, then replace old diff with
new diff file.
|
|
a25e85ed
|
2021-08-17T15:20:25
|
|
[gzip] Update sources to zlib 1.2.11
This can be tested by building with the Unix development build
make setup devel
make
or by building the freetype-demos programs with
meson setup build -Dfreetype2:zlib=internal
meson compile -C out
and trying to run `ftview` with a `.pcf.gz` font file.
* src/gzip/ftgzip.c, src/gzip/rules.mk: Update for new zlib sources. Also
remove the temporary fix introduced in commit 6a431038 to work around the
fact that the internal sources were too old.
* src/gzip/README.freetype: New file describing the origin of the sources
and how they were modified.
* src/gzip/patches/*: Patch files applied to original sources.
* src/gzip/*: Updated zlib sources with the patch file(s) from
`src/gzip/patches/` applied, followed by a conversion with zlib's
`zlib2ansi` script.
|