|
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.
|
|
0d343863
|
2021-08-17T17:27:36
|
|
[meson] Change Zlib configuration option.
* meson_options.txt, meson.build: Change the format of the 'zlib' meson
build configuration option to be a combo with the following choices:
- none: Do not support gzip-compressed streams at all.
- internal: Support gzip-compressed streams using the copy of the gzip
sources under `src/gzip/`; this should only be used during development
to ensure these work properly.
- external: Support gzip-compressed streams using the 'zlib' Meson
subproject, linked as a static library.
- system: Support gzip-compressed streams using a system-installed version
of zlib.
- auto: Support gzip-compressed streams using a system-installed version
of zlib, if available, or using the 'zlib' subproject otherwise. This
is the default.
- disabled: Backward-compatible alias for 'none'.
- enabled: Backward-compatible alias for 'auto'.
|
|
d276bcb7
|
2022-01-09T07:48:59
|
|
[bzip2] Avoid use of uninitialized memory.
* src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Don't use `FT_QNEW` but
`FT_NEW` for setting up `zip` to avoid uninitialized memory access while
handling malformed PCF fonts later on.
Fixes
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42800
|
|
ca011128
|
2022-01-08T22:28:44
|
|
[sfnt] Fix off-by-one error.
The 0-base index is equal to the number of previosly parsed entries.
It is an error to adjust it by one to get the number truncated by
a stream error. This is probably inconsequential because valid
entries are correctly accounted for.
* src/sfnt/ttload.c (check_table_dir): Do not adjust the truncated
number of tables.
|
|
7a493e3a
|
2022-01-08T10:28:19
|
|
[sfnt, type42] Correct previous commit.
Really fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773.
* src/sfnt/ttload.c (check_table_dir): Revert change.
* src/type42/t42.parse.c (t42_parse_sfnts): Don't use `FT_QREALLOC` but
`FT_REALLOC` for setting up `ttf_data` to avoid uninitialized memory access
while handling malformed TrueType fonts later on.
|
|
bf9b1ef9
|
2022-01-07T10:25:52
|
|
* src/sfnt/ttload.c (check_table_dir): Initialize `table`.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773
|
|
b5c2172f
|
2022-01-07T06:53:44
|
|
[sfnt] Avoid 'runtime error: applying zero offset to null pointer'.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_byte_aligned): Exit early if
`line` is NULL.
|
|
5aa2a5c3
|
2022-01-07T06:41:36
|
|
[autofit, pshinter] Use `FT_OFFSET`.
This avoids
```
runtime error: applying zero offset to null pointer
```
warnings of clang's undefined behaviour sanitizer.
* src/autofit/afcjk.c (af_cjk_hints_link_segments,
af_cjk_hints_compute_edges, af_cjk_hints_compute_blue_edges,
af_cjk_hint_edges, af_cjk_align_edge_points): Do it.
* src/autofit/afhints.c (af_glyph_hints_align_edge_points,
af_glyph_hints_align_strong_points): Ditto.
* src/autofit/aflatin.c (af_latin_metrics_init_widths,
af_latin_hints_link_segments, af_latin_hints_compute_edges,
af_latin_hints_compute_blue_edges, af_latin_hint_edges): Ditto.
* src/pshinter/pshalgo.c (psh_hint_table_init): Ditto.
|
|
afb4ca01
|
2022-01-06T12:54:15
|
|
[truetype] Reset localpoints when varying cvt.
When iterating over the cvt tuples and reading in the points it is necessary
to set all of `localpoints`, `points`, and `point_count` in all cases. The
existing code did not reset `localpoints` to `NULL` when there were no
private point numbers. If the previous tuple did have private point numbers
and set `localpoints` to `ALL_POINTS` this would not be cleared and the
wrong branch would be taken later, leading to possible heap buffer overflow.
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Reset `localpoints` to `NULL`
when it isn't valid.
Fixes: https://crbug.com/1284742
|
|
2b672e72
|
2022-01-02T18:33:03
|
|
* builds/unix/configure.raw: Restore `SYSTEM_ZLIB` variable.
This was accidentally removed with commit 93ebcbd0 almost eight years ago.
|
|
4eb6cb88
|
2021-12-25T09:23:58
|
|
Fix warnings for CMake Unity builds.
* src/cache/ftcbasic.c (FT_COMPONENT): Undefine macro before redefinition.
* src/smooth/ftgrays.c (TRUNC, FRACT): Ditto.
|
|
4f357118
|
2021-12-17T11:22:09
|
|
Clang-Tidy warning fixes.
* src/base/ftobjs.c (FT_Get_Paint): Operator has equivalent nested operands.
* src/bdf/bdflib.c (_bdf_add_property): Value stored to `fp` is never read.
* src/sdf/ftbsdf.c (bsdf_init_distance_map): Value stored to `pixel` is
never read.
* src/sdf/ftsdf.c (split_sdf_shape): Value stored to `error` is never read.
|
|
d6a5c577
|
2021-12-13T23:40:16
|
|
* meson.build: Optimize lookup for `python3` program.
The python module's `find_installation` method is intended to provide
routines for compiling and installing python modules into the
`site-packages` directory. It does a couple of slow things, including run
an introspection command to scrape sysconfig info from the detected
interpreter, which are not needed for the sole use case of invoking the
found installation as an executable.
Furthermore, when invoked without the name or path of a python binary, it is
hardcoded to always look for `python3` corresponding to the interpreter
meson itself uses to run. So using `find_installation` did not even allow
detecting `python2` as a fallback.
Instead, switch to a simple `find_program` lookup that finishes as soon as
the program is found.
|
|
57fd6180
|
2021-12-13T23:33:03
|
|
* builds/meson/*.py: Fix name of python executable for auxiliary scripts.
The previous change to check the return code of `run_command` invocations
caused the CI to fail. Although most scripts used `python_exe` as the
program command, the script to determine the project version did not.
But, all scripts used `python` as the shebang, and this is not available on
all systems. Particularly Debian does not provide a `python` command,
though `python3` does exist. This meant that formerly the version number
was lacking, and now the build simply fails.
Instead, rely on `python3` since it is guaranteed to exist when running
meson, and `python2` is end of life anyway.
|
|
e342f83c
|
2021-12-13T22:50:18
|
|
* meson.build: Check the return value of `run_command`.
By default, errors are not checked and a command that is somehow broken will
just capture incorrect output (likely an empty string). Current development
versions of meson now raise a warning for this implicit behavior, and advise
explicitly setting the `check:` keyword argumend to determine whether a
failing return code should be considered an error.
Since none of the commands in this project are expected to fail, mark them
as required to succeed.
|
|
0da2a115
|
2021-12-13T11:44:24
|
|
[truetype] Upstream the hdmx binary search.
* src/truetype/ttobjs.h (TT_SizeRec): Add `widthp` for the hdmx
widths.
* src/truetype/ttobjs.c (tt_size_reset): Initialize `widthp` even
though it might never be used by the interpreter.
* src/truetype/ttgload.c (tt_loader_init): Avoid repeated searches
in the hdmx table.
|
|
fd03dcc1
|
2021-12-12T12:29:04
|
|
[truetype] Reset the IUP-called flags for each subglyph.
This fixes fall-out from 7809007a5b88b15, where the composite
accents were no longer hinted.
* src/truetype/ttgload.c (ttloader_init): Move the IUP-called flag
initialization from here...
* src/truetype/ttinterp.c (TT_Run_Context): ... to here.
|
|
7add5b2b
|
2021-12-11T22:54:06
|
|
[truetype] Binary search through the `hdmx` records.
The `hdmx` table is supposed to be sorted by ppem size, which
enables binary search. We also drop the check for the sufficient
length of the record because it is now enforced when the table
is loaded.
* include/freetype/internal/tttypes.h (TT_FaceRec): Store the `hdmx`
record pointers sorted by ppem instead of ppem's themselves.
* src/truetype/ttpload.c (tt_face_load_hdmx): Prudently sort records.
(tt_face_get_device_metrics): Implement binary search to retrieve
advances.
|
|
a8ef33e3
|
2021-12-11T22:42:46
|
|
[truetype] Honor FT_LOAD_ADVANCE_ONLY if `hdmx` is usable.
This simply shortcuts the glyph loading if FT_LOAD_ADVANCE_ONLY
is specified by FT_Get_Advances and the `hdmx` data are located.
Particularly, the classic v35 interpreter or "verified" ClearType
fonts might see 100x speed up in retrieving the hdmx cache.
* src/truetype/ttgload.c (TT_Load_Glyph): Insert the shortcut.
|
|
6c831d65
|
2021-12-11T22:34:27
|
|
[truetype] Initialize the loader with `hdmx` data.
The `hdmx` matching can be done before the glyph is loaded.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Add a field.
* src/truetype/ttgload.c (compute_glyph_metrics): Relocate the `hdmx`
code from here...
(tt_loader_init): ... to here, before the glyph is loaded.
|
|
7809007a
|
2021-12-11T22:22:57
|
|
[truetype] Relocate subpixel flag setting.
`TT_RunIns` is too busy to deal with subpixel flags. It is better
to set them in `tt_loader_init`, which is executed before each
glyph program.
* src/truetype/ttinterp.c (TT_RunIns): Move the flag setting from
here...
* src/truetype/ttgload.c (tt_loader_init): ... to here.
|
|
a35b081e
|
2021-12-11T22:12:25
|
|
[truetype] Limit INSTCTRL appication within specs.
* src/truetype/ttinterp.c (Ins_INSTCTRL): Limit its global effects
to the CVT program and local effects to the glyph program.
This also fixes an Infinality buglet. The `ignore_x_mode` should be
locally unset by the glyph program.
|
|
bad92be9
|
2021-12-09T17:06:28
|
|
[bdf] Fix use of uninitialized value.
In _bdf_readstream if the data contained no newline then the buffer
would continue to grow and uninitialized data read until either the
uninitialized data contained a newline or the buffer reached its
maxiumum size. The assumption was that the line was always too long and
the buffer had been filled, however this case can also happen when there
is not enough data to fill the buffer.
Correct this by properly setting the cursor to the end of the available
data, which may be different from the end of the buffer. This may still
result in one extra allocation, but only on malformed fonts.
* src/bdf/bdflib.c (_bfd_readstream): Correctly update cursor. Remove
unread set of `avail`.
Bug: https://lists.nongnu.org/archive/html/freetype-devel/2021-12/msg00001.html
|
|
012b00f3
|
2021-12-07T10:19:06
|
|
[truetype] Reduce Infinality footprint again.
* src/truetype/ttgload.c (compute_glyph_metrics): Streamline and
prioritize the Infinality checks to use `hdmx`.
|
|
1f951898
|
2021-12-06T23:08:46
|
|
[builds/windows] Guard some non-ancient API.
We can support Windows 98 and NT 4.0 in principle...
* builds/windows/ftdebug.c, builds/windows/ftsystem.c: Check for the
ancient SDK using _WIN32_WINDOWS, _WIN32_WCE, or _WIN32_WINNT.
|
|
9a533aa2
|
2021-12-06T21:46:47
|
|
* builds/windows/visualc/freetype.vcproj: Add missing file.
|
|
3f83daee
|
2021-12-01T20:17:59
|
|
* Version 2.11.1 released.
==========================
Tag sources with `VER-2-11-1'.
* docs/VERSION.TXT: Add entry for version 2.11.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.11.0/2.11.1/, s/2110/2111/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 24:1:18.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* builds/toplevel.mk (version_tag, CHANGELOG_SCRIPT): New variables.
(do-dist): Generate `ChangeLog` file with all commits since last release.
|
|
03380482
|
2021-11-29T20:45:07
|
|
[builds/windows] Improve debugging.
* builds/windows/ftdebug.c (FT_Message, FT_Panic): Buffer output
and call `OutputDebugStringA` only if `IsDebuggerPresent`.
[_WIN32_WCE] (OutputDebugStringA): Implement the missing API.
|
|
3b45f564
|
2021-11-29T18:17:49
|
|
* src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android.
Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in
Android).
|
|
64e26ad3
|
2021-11-27T22:31:17
|
|
* builds/windows/vc2010/freetype.vcxproj (DlgCopy): Minor tweak.
|
|
36a905e1
|
2021-11-26T09:15:46
|
|
* src/truetype/ttpload.c (tt_face_load_hdmx): Added comments.
|
|
32f13c11
|
2021-11-25T22:38:40
|
|
[truetype] Quietly reject out-of-spec `hdmx` tables.
The `hdmx` table is optional and can be safely rejected without
an error if it does not follow specifications. The record size
must be equal to the number of glyphs + 2 + 32-bit padding.
* src/truetype/ttpload.c (tt_face_load_hdmx): Thoroughly check
the record size and improve tracing.
|
|
cff026d4
|
2021-11-23T16:05:12
|
|
[truetype] Partly revert 5b626281.
Fixes #1118.
* src/truetype/ttpload.c (tt_face_load_hdmx): Do not assume that
`record_size` is rounded even though the records are padded.
|
|
99086bf2
|
2021-11-23T16:02:02
|
|
* builds/windows/vc2010/freetype.vcxproj (DlgCopy): Use transforms.
|
|
3cabd142
|
2021-11-22T19:36:45
|
|
Update `CHANGES` files, other minor whitespace and documentation issues.
|
|
81912a13
|
2021-11-21T18:31:53
|
|
formats.txt: Add info about WOFF and WOFF2.
|
|
407f31ff
|
2021-11-21T11:01:37
|
|
meson.build: Initialize `common_ldflags`.
|
|
896630be
|
2021-11-21T07:58:50
|
|
* meson.build: Fix compatibility version on MacOS.
Fixes #1117.
|
|
a11650d7
|
2021-11-21T07:51:31
|
|
* src/truetype/ttinterp.c (Ins_MD): Avoid `FT_ABS`.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38562
|
|
f8a4163a
|
2021-11-20T07:01:26
|
|
* include/freetype/fttypes.h (FT_MAKE_TAG): Remove the same casting.
|
|
6da5f95f
|
2021-11-20T09:29:09
|
|
[gxvalid] Fix minor compilation warning.
* src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup): Declare
as static.
|
|
f5ce1824
|
2021-11-20T07:56:34
|
|
[smooth] Fix stand-alone compilation.
* src/smooth/ftgrays.c (FT_Trace_Enable, FT_Trace_Disable)[STANDALONE_]:
Define.
|
|
8c8f51c5
|
2021-11-19T21:50:22
|
|
Avoid undefined left-shifts.
We really have to use double casts to avoid issues with C's and C++'s
signedness propagation rules in implicit casts.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182
* include/freetype/config/public-macros.h (FT_STATIC_CAST,
FT_REINTERPRET_CAST): Modify macro to take two arguments.
Update all callers.
(FT_STATIC_BYTE_CAST): New macro.
* include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
* include/freetype/fttypes.h (FT_MAKE_TAG): Ditto.
Use `FT_Tag` for casting.
* src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed.
(FT_STATIC_BYTE_CAST): New macro.
* src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with...
(FT_STATIC_BYTE_CAST): ... this.
|
|
9079c5d9
|
2021-11-13T08:53:19
|
|
Provide C++ versions for public macros with casts.
Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for
macros with C-style casts even for system header files; this also affects
directories included with `-isystem`. While this could be seen as a problem
with g++, the problem is more a philosophical one: Over the time, C and C++
diverged more and more, and some features of C are no longer the 'right'
solution in C++.
* include/freetype/config/public-macros.h (FT_STATIC_CAST,
FT_REINTERPRET_CAST): New macros.
* include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_,
FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`.
Correctly handle negative 'signed char' input.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
* include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto.
* include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use
`FT_REINTERPRET_CAST`.
* src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro.
[!STANDALONE]: Include `FT_CONFIG_CONFIG_H`.
Fixes #1116.
|
|
238245cd
|
2021-11-16T22:07:28
|
|
Fix clang++ warnings.
* src/*: Initialize some variables to NULL.
|
|
e4f7673e
|
2021-11-13T21:11:00
|
|
[truetype] Updates for the forthcoming OpenType 1.9 standard (2/2).
* src/truetype/ttgxvar.c (ft_var_load_item_variation_store):
s/shortDeltaCount/wordDeltaCount/ (as done in the specification, too).
Recognize new format and reject it for now.
|
|
93e6b3e8
|
2021-11-13T14:41:40
|
|
[truetype] Updates for the forthcoming OpenType 1.9 standard (1/2).
This is in preparation for implementing `DeltaSetIndexMap` format 1, which
is used by `COLR` v1 tables, and which allows 32bit indices.
https://docs.microsoft.com/en-us/typography/opentype/otspec190/delta/otvarcommonformats_delta.html
* src/truetype/ttgxvar.h (GX_DeltaSetIdxMapRec): Change type of `mapCount`
to `FT_ULong`.
* src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add argument
for passing the table size; update caller.
Implement new format.
|
|
d31bafcb
|
2021-11-14T11:02:54
|
|
Fix clang warnings.
* src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block.
* src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto.
* src/smooth/ftgrays.c (gray_convert_glyph): Add cast.
* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast.
* src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter.
(parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts.
|
|
9597fd7b
|
2021-11-11T17:33:37
|
|
[sfnt] Avoid undefined shifts in `COLR` v1 paint parsing
* src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Tighten shift
behavior by using multiplication, mostly using macros from ftcalc.h.
Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1269168
|
|
cf553136
|
2021-11-12T22:27:18
|
|
[builds/windows] Improve `DlgCopy` target.
Fixes #1113.
* builds/windows/vc2010/freetype.vcxproj: Run `DlgCopy` conditionally
and decouple it from `Build`.
|
|
42e61723
|
2021-11-11T23:06:36
|
|
Explicitly define `FT_MSB` for Clang.
* include/freetype/internal/ftcalc.h [__clang__] (FT_MSB): Updated.
|
|
c5cd2a3d
|
2021-11-10T08:46:26
|
|
* src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization.
|
|
188c7d66
|
2021-11-09T22:47:26
|
|
Additional `FT_MSB` macro definitions.
Better macros for Windoes CE and ARM in general, based on !109
from metarutaiga.
* include/freetype/internal/ftcalc.h [_MSC_VER] (FT_MSB): Updated.
|
|
05089e8a
|
2021-11-08T22:33:12
|
|
[build/windows] Remove logging from default debug configurations.
DLG is rather costly for performance and should be used judiciously.
This removes it from the default configurations but gives an example
how to enable it using the `UserDefines` property.
* builds/windows/vc2010/freetype.vcxproj: Hide FT_DEBUG_LOGGING.
|
|
d899b200
|
2021-11-08T12:27:04
|
|
* src/sfnt/sfobjs.c (sfnt_open_font): Fix typo.
|
|
b86f96bc
|
2021-11-08T11:15:50
|
|
* src/gxvalid.*, src/otvalid.*: Fix `-Wformat` warnings.
|
|
cce78228
|
2021-11-08T09:41:54
|
|
[pshinter] Fix C++ compilation.
* src/pshinter/pshalgo.c (psh_compute_dir): Fix type of `result`.
(psh_hint_table_find_strong_points): Add cast.
|
|
7ef26604
|
2021-11-04T09:10:57
|
|
[sfnt] Reduce footprint if WOFF and WOFF2 support is not needed.
Based on a patch from metarutaiga (MR !106). The gist of this commit is
that it doesn't make sense to support WOFF without compression (which would
be only possible in WOFF 1.0 anyway).
* src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with
`FT_CONFIG_OPTION_USE_ZLIB` block.
Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block.
* src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with
`FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code.
* src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c,
src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks,
not parts of the code.
Fixes #1111.
|
|
bb4e049a
|
2021-11-04T08:58:13
|
|
[truetype] Make trickyness checks depend on TT_USE_BYTECODE_INTERPRETER.
Based on a patch from metarutaiga (MR !106).
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag,
tt_check_trickyness_family, tt_synth_sfnt_checksum, tt_get_sfnt_checksum,
tt_check_trickyness_sfnt_ids, tt_check_trickyness): Put functions into a
`TT_USE_BYTECODE_INTERPRETER` block.
(tt_face_init): Put trickyness checks into a `TT_USE_BYTECODE_INTERPRETER`
block.
Fixes #1111.
|
|
9ebdc9cb
|
2021-11-07T23:21:40
|
|
* src/sfnt/ttload.c (tt_face_load_gasp): Fix a type mismatch warning.
|
|
7f4b9bfb
|
2021-11-07T10:20:16
|
|
[dlg] Define DLG_STATIC explicitly.
DLG_STATIC is intended to disable Windows DLL linking attributes.
It does not hurt to define it explicitly when we wrap DLG code.
This fixes tons of LNK4286 and C4273 warnings from MSVC if we
forget to define DLG_STATIC as a compiler option.
* builds/windows/vc2010/freetype.vcxproj: Remove DLG_STATIC option.
* src/dlg/dlgwrap.c [FT_DEBUG_LOGGING]: Define DLG_STATIC.
* include/freetype/internal/ftdebug.h [FT_DEBUG_LOGGING]: Ditto.
|
|
c693377e
|
2021-11-07T10:05:05
|
|
[dlg] Lighten up the inclusions.
The DLG wrapper needs to know if FT_DEBUG_LOGGING is defined in
`ftoption.h`. It does not need entire FreeType.
* src/dlg/dlgwrap.c: Include FT_CONFIG_OPTIONS_H directly.
|
|
cb9e7b7a
|
2021-11-06T22:59:31
|
|
[truetype] Avoid some memory zeroing in variations.
* src/truetype/ttgxvar.c (ft_var_readpackeddeltas, ft_var_load_avar,
ft_var_load_item_variation_store, ft_var_load_gvar): Use FT_QNEW_ARRAY
if memory immediately initialized or discarded otherwise.
|
|
fc55291b
|
2021-11-04T11:07:43
|
|
[truetype] Fix handling of packed deltas in Variation Fonts.
* src/truetype/ttgxvar (ft_var_readpackeddeltas): Don't expect the number of
bytes used to encode the deltas to be higher than the number of encoded
values. The specification allows a very compact encoding; for example, a
list of 200 zeros can be encoded with just a couple of bytes.
We now count the consumed bytes to make sure to not read more than expected.
|
|
9ed5332f
|
2021-11-04T08:56:59
|
|
[truetype] Fix CVAR handling of tuples for all points.
* src/truetype/ttgxvar (tt_face_vary_cvt): Function
`ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets
`point_count` to value 0. However, the CVAR code was incorrectly expecting
that `point_count` would be set to match the length of the CVT table.
|
|
23d1d8ad
|
2021-11-04T08:55:39
|
|
* src/truetype/ttgxvar.c: Fix typos in macros that guard CVAR code.
|
|
5d651faa
|
2021-11-03T22:43:22
|
|
* docs/INSTALL: Mention Meson and MSBuild more prominently.
|
|
e6e6cbf1
|
2021-11-03T10:07:20
|
|
[libpng] Update Meson wrap for win-arm64
1.6.37-5 released patches for win-arm64 to successfully build
libpng with Meson:
https://github.com/mesonbuild/wrapdb/pull/205
https://github.com/mesonbuild/wrapdb/pull/216
Updated by the following command:
meson wrap update libpng
Tested on win-arm64 and x64.
|
|
d3d3ff76
|
2021-11-01T17:32:27
|
|
[sfnt] Clarify `COLR` v1 FT_Paint* format representations
* include/freetype/ftcolor.h (FT_PaintLinearGradient,
FT_PaintRadialGradient, FT_PaintSweepGradient, FT_PaintTransform,
FT_PaintTranslate, FT_PaintScale, FT_PaintRotate, FT_PaintSkew): Clarify
16.16 fixed point representation of struct fields.
* src/sfnt/ttcolr.c (read_paint): Shift coordinates for
FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient
accordingly.
Fixes: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1110
|
|
588a058d
|
2021-11-02T22:51:51
|
|
[builds/windows] Let MSBuild handle DLG copy.
* builds/windows/vc2010/freetype.vcxproj: Specify DlgCopy target.
* builds/windows/vc2010/script.bat: Deleted.
|
|
94cb3a2e
|
2021-10-29T10:31:59
|
|
* src/truetype/ttgload.c (load_truetype_glyph): Fix MSVC warning C4312.
|
|
31fd0547
|
2021-10-29T10:13:47
|
|
[builds/windows] Separate MSVC linker and librarian.
MSVC uses LIB for static and LINK for dynamic libraries. They are
related but the former has much smaller set of options.
* builds/windows/vc2010/freetype.vcxproj: Updated.
|
|
79b28d37
|
2021-10-28T22:51:15
|
|
[builds/windows] Revise MSVC linking optimizations.
* builds/windows/vc2010/freetype.vcxproj: Optimize DLL linking only.
* builds/windows/visualc/freetype.dsp: Ditto.
* builds/windows/visualc/freetype.vcproj: Ditto.
|
|
793c0126
|
2021-10-27T22:36:11
|
|
[woff] Optimize table tagging.
* include/freetype/internal/wofftypes.h (WOFF_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff.c (woff_open_font): Use 32-bit tag.
|
|
a577bbcb
|
2021-10-27T22:24:27
|
|
[woff2] Optimize table tagging.
Fixes #1107.
* include/freetype/internal/wofftypes.h (WOFF2_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff2.c (compare_tags, find_table, woff2_open_font):
Use 32-bit tag.
* src/sfnt/woff2tags.[ch] (woff2_known_tags): Use static storage and
return 32-bit tag.
|
|
80b13f57
|
2021-10-26T10:57:17
|
|
Formatting.
|
|
535c67dd
|
2021-10-25T22:38:05
|
|
[mm] Tolerate missing Blend dictionary entries
In a Multiple Master font, the Blend dictionary must contain valid
Private, FontInfo, and FontBBox. The current code will error if any of
these are present and invalid, but will not error and will provide
uninitialized data if the Blend dictionary exists but does not contain
one of these entries. This change reverts to the older behavior of
treating any missing entries as containing all zero data and not
returning an error.
In the future it may be best to keep track of when these are actually
initialized and error if they are not.
* src/type1/t1load.c (t1_allocate_blend): Zero initiailize.
|
|
f091e60c
|
2021-10-25T22:31:09
|
|
[builds/windows] Add MSVC linker optimazations.
We continue to build static libraries with statically linked C run-
time and add options to optimize references.
* builds/windows/vc2010/freetype.vcxproj: Sort entries, add options.
|
|
92f5e15f
|
2021-10-23T09:43:46
|
|
* builds/windows/vc2010/freetype.vcxproj: Use MachineARM64.
|