Check for Python and pip in the order p3, p2, p so that we use the same
version of Python *and* pip at any given point of time.
* builds/freetype.mk: Minor formatting.
Add checks for Python, pip and docwriter. Docwriter is now a PyPI
package, downloadable from
https://pypi.org/project/docwriter/
This package can be installed with the command `pip install docwriter'
on any system that has pip.
Running `make' on a fresh build will now warn if package `docwriter' is
not installed, and also provide information about the `make refdoc-venv'
alternative.
* builds/freetype.mk: Modify targats `refdoc' and `refdoc-venv' to
use detected python version/alias, and run docwriter as a package.
* builds/unix/configure.raw: Add rules to check python, pip and
docwriter. (code discussed in the dev mailing list).
* builds/unix/unix-def.in: Add variables PYTHON and PIP detected by
`configure.ac'. This is conditionally assigned (if empty) in
`freetype.mk' to the defaults.
Call Python scripts with the virtualenv directory created in
`DOC_DIR/env'. Also ignore the folder in .gitignore.
* builds/freetype.mk (refdoc-venv): Change all calls to local venv.
* docs/reference/.gitignore: Add directory `env/'.
Add required folders, assets and gitignore rules for docwriter. Static
site directory `docs/reference/site/' will be created by MkDocs.
* docs/reference/.gitignore: Ignore HTML, markdown and mkdocs.yml file.
* docs/reference/markdown: New folder to store generated markdown files.
Change target `refdoc' to call docwriter. Steps:
* Install required python modules using `pip'.
* Call docwriter with required options.
* Change to the docs directory and call `mkdocs'.
* src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
`FT_MEM_ZERO' if we actually have a buffer.
(ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
We no longer use predefined _DLL, which can be defined for static
builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
following libtool convention.
* CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
Define DLL_EXPORT manually.
* include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
For Multiple Masters fonts We don't support intermediate designs;
this implies that
number_of_designs == 2 ^^ number_of_axes
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
* src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
(T1_Get_MM_Var): Remove now redundant test.
This code is taken from the type1 module.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
* src/cid/cidload.c (parse_fd_array): Set some private dict default
values.
(cid_face_open): Do the sanitizing.
Fix some tracing messages.
This change makes the driver use the `defaultChar' property of PCF
files.
* src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
unsigned.
* src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
unsigned.
Validate `defaultChar'.
If `defaultChar' doesn't point to glyph index zero, swap glyphs with
index zero and index `defaultChar' and adjust the encodings
accordingly.
* src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
the first character in the font to be the default character.
This is a valid encoding tag for BDF, PCF, and Windows FNT, and
there is no reason to disallow it for these formats.
* src/base/ftobjs.c (FT_Select_Charmap): Implement it.
Taken from patch #9667, written by Steve Langasek
<vorlon@debian.org>.
This fixes a build failure (most probably a bug in gcc) on ppc64el
when building with -O3.
It turned out that we incorrectly round CVT and glyph point deltas
before accumulation, leading to severe positioning errors if there
are many delta values to sum up.
Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
by Behdad.
* src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
16.16 format.
(tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
format array, and add the accumulated values to the CVT at the end
of the function.
(TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
`points_out' in 16.16 format.
Collect deltas in `point_deltas_x' and `point_deltas_y', which are
16.16 format arrays, and add the accumulated values to the glyph
coordinates at the end of the function.
* src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
reject degenerate font matrices.
* include/freetype/internal/ftcalc.h: Updated.
* src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
(cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
src/type42/t42parse.c (t42_parse_font_matrix): Use
`FT_Matrix_Check'.