| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* src/dense/ftdense.c: FT_UDIV, FT_UDIVPREP macros taken from smooth
rasterizer, help optimize fixed-point division
|
|
|
|
| |
* src/dense/ftdense.c: Optimize line drawing when a vertical line is encountered
|
|
|
|
|
|
|
| |
* src/dense/ftdense.c: Use integer SIMD functions for accumulation
* src/dense/ftdense.h: Change types of FT26D6, FT20D12 to better fit
their usage
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/dense/ftdense.c: Redefine FT_SWAP to fix compilation error
* src/include/freetype/config/ftmodule.h: Added ft_dense_renderer_class
* src/dense/dense.c: Build single object of module
* modules.cfg: Added 'dense' RASTER_MODULE
* src/dense/module.mk, src/dense/rules.mk: Added Makefile
* CMakeLists.txt: Added 'dense.c' to compilation files
|
|
|
|
|
|
| |
* src/dense/ftdense.c: (dense_render_line, dense_render_quadratic,
dense_render_cubic, dense_render_glyph, dense_raster_render, Lerp):
New Functions
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/dense/ftdense.c: (ONE_PIXEL, TRUNC, UPSCALE, DOWNSCALE,
FT_SWAP, FT_MIN, FT_MAX, FT_ABS): New Macros
(dense_move_to, dense_line_to, dense_conic_to): Added outline
decomposing functions
(dense_raster_new, dense_raster_done, dense_raster_reset,
dense_raster_set_mode, dense_raster_render): Added interface
functions
|
|
|
|
|
|
|
|
| |
* src/dense/ftdenserend.c: Add 'dense' renderer along with its interface
functions.
(ft_dense_set_mode, ft_dense_transform, ft_dense_get_cbox, ft_dense_init,
ft_dense_done, ft_dense_render)
|
|
|
|
|
|
|
|
|
|
|
| |
* src/dense/ftdenserend.h (ft_dense_renderer_class): New Structures
* src/dense/ftdense.h (dense_worker): New Structure
(dense_render_line, dense_render_quadratic, dense_render_cubic): New
function declarations
(ft_dense_raster): Export dense raster funcs
* src/dense/ftdenseerrs.h: Add module error setup
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This must happen after the NULL check.
Taken from
https://github.com/freetype/freetype/pull/2
|
|
|
|
|
| |
We trust glibc which uses shifts or builtins to swap bytes. This
must be more efficient.
|
|
|
|
|
|
| |
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462
|
|
|
|
|
|
|
|
| |
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>'.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
It corresponds to outer indices of 0 to 0xFFFE.
* src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Remove invalid
code.
|
|
|
|
|
| |
* src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Check and walk
the encoding array indexes.
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
* builds/unix/configure.raw: use AC_CHECK_PROG() instead of `which` to find `libpng-config`.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is mostly for consistency because PFR fonts with bitmap strikes
do not seem to exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
This is useful for builds that are not started from the root directory.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
|
|
|
|
| |
* include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|