* src/dense/ftdense.h: (FT26D6, FT20D12): New typedefs
* src/dense/ftdense.c: dense_render_line, dense_render_glyph now
use fixed-point numbers for calculation
Disabled SIMD for now
* src/dense/ftdense: Use SSE4.1 for final accumulation step
(FT_SSE4_1): Macro which checks if SSE4.1 is available
* src/dense/rules.mk: Enable linking for SSE4.1
Breakdown of what the files will contain
* src/dense/ftdenserend.c, src/dense/ftdenserend.h: The 'dense' renderer.
* src/dense/ftdense.c, src/dense/ftdense.h: The rasterizer for the
'dense' renderer.
* src/dense/ftdenseerrs.h: Common error defines.
* src/dense/dense.c: For building a single object of the entire module.
The values read into `base_glyphs_offset_v1` and `layer_offset_v1` may
be in the range 0xFFFFFFFD-0xFFFFFFFF. On systems where `unsigned long`
is 32 bits adding 4 to such values will wrap and pass bounds checks but
accessing values at such offsets will be out of bounds.
On the other hand `table_size` has already been tested to be at least
`COLRV1_HEADER_SIZE` (34) so it is safe to subtract 4 from it.
* src/sfnt/ttcolr.c (tt_face_load_colr): subtract 4 from `table_size`
instead of adding 4 to font data offsets in bounds checks
Fixes: https://crbug.com/1469348
Some types on OpenVMS x86_64 (for example, `long') have different sizes
depending on whether compiled with either C or C++. In particular,
X-Windows applications crash if linked with the C++ version.
This patch makes `vms_make.com` create a second version of the FreeType
library compiled with C++ if OpenVMS is running on the x86_64 platform.
In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value
is now just a hint and a conforming implementation must not reject
otherwise valid data if the `totalSfntSize` turns out not to be exact.
* src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed
woff2 data would fit in the sfnt size guess.
Fixes: #1235
The CFF2 blend operator takes N default values and corresponding
sets of deltas and pushes N values specific to a designspace
location. CFF has a floating point numeric type and the FreeType
blending code was not converting those into its internal 16.16
Fixed type format.
Fixes#1243.
* src/cff/cffparse.c (do_fixed): Handle floating point numbers.
Also fix scaling overflow check for integer-to-fixed conversion.
* src/cff/cffload.c (cff_blend_doBlend): Updated.
This is a follow-up to commit 49c74ac02, which creates a new local variable
"exec = loader->exec", and shortening a lot of "loader->exec". This commit
does two more such changes missed in that first commit.
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
`src/gzip/rules.mk` compiles the internal zlib sources even when using the
zlib development files provided by a host system. If the internal zlib
development files are not present, FreeType fails to build from source.
This patch ensures the internal zlib development files are only
prerequisites when not using zlib development files on a host system.
* src/gzip/rules.mk (GZIP_DRV_SRCS): Define conditionally.
This is a refinement of commit 7b3ebb9.
* src/sdf/ftsdfrend.c (ft_sdf_render): Goto 'Exit' instead of directly
returning.
(fd_bsdf_render): Ditto, also taking care of setting `FT_GLYPH_OWN_BITMAP`
correctly.
The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`.
The address of the definition is taken and assigned to
`FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`.
Until recently the `const` was cast away and with the removal of the
cast there are now warnings about dropping this `const`. Instead of
adding back the casts, make `FT_Renderer_Class::raster_class` a pointer
to const, as is done with pointers in other interfaces.
* include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class`
as const.
`FT_Fixed` and `FT_Long` are both typedef'ed to be `signed long`. However,
`FT_Fixed` implies that the lower 16 bits are being used to express
fractional values and so these two types should not be confused.
* include/freetype/internal/services/svmm.h (FT_Set_MM_Blend_Func): Use
`FT_Fixed` for `coords`. Users are passing `FT_Fixed` and implementations
are taking `FT_Fixed`.
(FT_Get_MM_Blend_Func): Ditto.
* src/autofit/afcjk.c (af_cjk_metrics_check_digits): Use `FT_Long` for
`advance` and `old_advance`. `advance`'s address is passed as `FT_Long*` to
`af_shaper_get_elem`, which writes the advance in em units (not fixed). The
exact value is not important here as it is only compared to check whether it
has changed.
* src/autofit/aflatin.c (af_latin_metrics_check_digits): Ditto.