|
bb59c3c9
|
2022-10-16T22:10:19
|
|
* src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant.
* include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it.
|
|
3ab1875c
|
2022-10-14T22:06:23
|
|
Note the lack of floating-point data types.
|
|
5182264a
|
2022-10-10T12:31:53
|
|
[cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`.
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.
|
|
0d66abca
|
2022-10-10T12:41:19
|
|
Synchronize `ftoption.h` flavours.
|
|
141d979a
|
2022-10-10T12:25:51
|
|
Minor comment changes.
|
|
15f68734
|
2022-10-04T23:36:09
|
|
Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name.
|
|
0417527d
|
2022-10-03T19:23:26
|
|
[autofit] Reset the face charmap directly.
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.
|
|
1b6dce84
|
2022-10-03T19:18:48
|
|
* src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
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.
|
|
8faf57dd
|
2022-10-03T17:13:30
|
|
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Avoid `FT_Set_Charmap`.
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.
|
|
b93f20ab
|
2022-10-03T15:10:12
|
|
* src/cache/ftcbasic.c (ftc_basic_family_get_count): Remove redundancy.
|
|
de8f14a8
|
2022-09-30T23:25:02
|
|
* src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.
Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid
overflow.
Fixes #1180.
|
|
2adb810c
|
2022-09-30T17:00:10
|
|
* src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.
|
|
90527092
|
2022-09-29T18:38:06
|
|
[truetype] Fix undefined pointer arithmetic.
* src/truetype/ttgxvar.c (tt_var_get_item_delta, ft_var_load_mvar): Use
`FT_OFFSET`.
|
|
ff66e912
|
2022-09-29T17:46:23
|
|
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Use lighter FT_DivFix.
|
|
5faa1df8
|
2022-09-29T18:25:41
|
|
[base] FT_Attach_Stream: Make `parameters` argument constant.
|
|
3f3427c6
|
2022-09-28T22:35:49
|
|
* src/tools/*.py: Migrate to Python 3.
Fixes #1185, closes !205. Formatting changes according to PEP8.
|
|
df260139
|
2022-09-27T17:50:55
|
|
[sfnt] Guard access in 'COLR' table when requesting child table pointer.
* src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Tighten
pointer bounds checks.
(get_child_table_pointer): Check whether incoming pointer `p` lies within
the 'COLR' table.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51816
|
|
bd417007
|
2022-09-26T14:46:42
|
|
[sfnt] Add SVG document bounds checking.
Add a check that the document content is actually contained within the
`SVG ` table. Without this check a malformed font may claim arbitrary
memory as its document content.
* src/sfnt/ttsvg.c (tt_face_load_svg): Take `numEntries` into account when
testing 'documentRecord' extents.
(find_doc): Rename `stream` to `document_records` for clarity.
(tt_face_load_svg_doc): Split `doc` from `doc_list` pointer for clarity.
Test that the document content is contained within the table.
Ensure minimum length of document before testing for gzip format.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51812
|
|
c9c32631
|
2022-09-22T20:40:21
|
|
[base] Clean up the bitmap flow control.
* src/base/ftbitmap.c (FT_Bitmap_Copy): Flip the copy if its pitch
is trully opposite, zero is not a positive value.
(FT_Bitmap_Convert): Set negative pitch as needed, accept negative
alignment values.
|
|
c456eeb4
|
2022-09-22T15:09:17
|
|
[base] Discard and recreate bitmaps for copying and converting.
Reusing target bitmaps for copying and converting is permitted. It is,
however, pointless to preserve their content before overwriting. Free-
malloc might be faster than realloc.
* src/base/ftbitmap.c (FT_Bitmap_Copy, FT_Bitmap_Convert): Free
an old buffer and create a new one.
|
|
33ceac2a
|
2022-09-15T09:47:07
|
|
Reject 'COLR' table if version is 1 but header too small.
* src/sfnt/ttcolr.c (tt_face_load_colr): If the version is determined to
be 1, then the table size has to be at least the size of the v1 header.
Also, for peeking the number of base glyphs and entries in the layer list,
ensure that the table is sufficiently long.
Fixes #1179. Original patch by Sergey Temnikov.
|
|
a0d15364
|
2022-09-15T09:14:06
|
|
* src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix format 1 handling.
Fixes #1181.
|
|
8e68439a
|
2022-09-06T15:57:11
|
|
[truetype] Reject 'fvar' loading when `num_instances` is too small.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Reject retrieving master when
'fvar' values locally do not match with sanitized values from initialization
at `sfnt_init_face` time.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1360295
|
|
91a7fae7
|
2022-09-05T15:49:27
|
|
[sfnt] Handle variable `COLR` v1 fonts without delta set index map
Fixes #1178.
* src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Set outer index to
0 and inner index to the delta index when retrieving deltas if the
`COLR` table has no delta set index map.
|
|
6d62076a
|
2022-08-30T15:00:37
|
|
[sfnt] Pointer sanity checks before reading layer info in 'COLR' v0
* src/sfnt/ttcolr.c (tt_face_get_colr_layer): Check that the pointer to
read from is within the 'COLR' table.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50633
|
|
048f2e24
|
2022-09-05T10:43:59
|
|
[autofit] Minor fix.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Avoid
compiler warning.
|
|
a1017e26
|
2022-08-19T19:07:42
|
|
[sfnt] Don't require 'gvar' table to support variation fonts.
Fixes #1172.
* src/sfnt/sfobjs.c (sfnt_load_face): Tag font as Multiple Masters font if
`fvar` is present; do not require other tables to be present.
* src/truetype/ttgxvar.c (tt_set_mm_blend): Allow for a missing 'gvar' table
when setting variation coordinates. However, if a 'gvar' table is actually
present, do perform a sanity check and fail on malformedness.
(TT_Get_MM_Var): Don't assume 'fvar' needs 'gvar' or 'CFF2 tables in all
cases, which is an overly tight check.
|
|
dd91f6e7
|
2022-08-26T22:24:02
|
|
* src/base/ftver.rc: Explicitly use UTF-16.
Fixes #1177 to avoid mistranslation and other problems.
|
|
4797b2ff
|
2022-08-26T12:08:34
|
|
[sfnt] Avoid undefined shifts in `COLR` v1 color line retrieval
* src/sfnt/ttcolr.c (tt_face_get_colorline_stops): Disambiguate shift
behavior by using multiplication using macros from ftcalc.h.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50573
|
|
395da3d7
|
2022-08-19T16:08:26
|
|
CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option.
This option uncomments FreeType configuration macro
`FT_CONFIG_OPTION_ERROR_STRINGS` to make function `FT_Error_String` return
meaningful error strings.
This option is off by default.
|
|
37b718d5
|
2022-08-15T10:44:05
|
|
[base, type1] Better handling of out-of-memory situations.
This follows similar code in `cff_slot_done`.
* src/base/ftobjs.c (ft_glyphslot_done), src/type1/t1objs.c
(T1_GlyphSlot_Done): Check `internal` pointer.
The Type1 problems was reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50057.
|
|
7cd3f19f
|
2022-07-31T12:14:01
|
|
ci: bump windows image and use newer runner and vs2019
The old 1809 runner will be decommissioned at some point.
|
|
90e1e39f
|
2022-08-03T22:54:38
|
|
* src/cache/ftcmanag.c (FTC_Manager_New): Initialize `cur_weight`.
See !192.
|
|
dcb5fc5b
|
2022-08-02T17:10:25
|
|
* src/sfnt/ttload.c: Trace formatting updates.
|
|
d53c1141
|
2022-08-02T12:57:39
|
|
* src/psaux/psobjs.c (ps_table_release): Remove redundant casting.
|
|
480be443
|
2022-08-01T22:59:58
|
|
* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Reduce casting.
|
|
039b9071
|
2022-08-01T20:19:12
|
|
[cache] Remove some casts, clean up tracing.
* src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup):
Clean up tracing types.
* src/cache/ftccache.c (ftc_node_destroy): Ditto.
* src/cache/ftcmanag.c (FTC_Manager_Check): Ditto.
(FTC_Manager_Check, FTC_Node_Unref): Remove a cast.
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
|
|
a18ad83e
|
2022-08-01T13:20:13
|
|
[autofit] Updated to reduce casting (cont'd).
* src/autofit/afmodule.h (AF_ModuleRec): Change `default_script` type.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
Remove casting.
* src/autofit/afmodule.c (af_property_{set,get}): Updated accordingly.
|
|
4f195185
|
2022-08-01T09:52:43
|
|
[autofit] Updated to reduce casting.
* src/autofit/afglobal.h (AF_FaceGlobalsRec): Change `glyph_count` type.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
af_face_globals_get_metrics, af_face_globals_is_digit,
af_face_globals_new): Changed local types and updated accordingly.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Ditto.
|
|
9de432f7
|
2022-07-31T22:13:34
|
|
[psaux] Remove unused structure field.
* include/freetype/internal/psaux.h (PS_TableRec): Remove `num_elems`.
* src/psaux/psobjs.c (ps_table_new): Remoove its initialization.
|
|
919561ca
|
2022-07-30T12:09:21
|
|
[sfnt] Implement VarClipBox.
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Depending on the
format, read `var_index_base`, then retrieve and apply scaled deltas.
|
|
649352ab
|
2022-07-30T12:09:09
|
|
[sfnt] Fix typo in clip box computation.
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Use appropriate
scale factor for `yMin` and `yMax`.
|
|
ee72e285
|
2022-07-29T22:55:28
|
|
[autofit] Use unsigned accounting for hints.
* src/autofit/afhints.h (AF_AxisHintsRec): Use unsigned types.
* src/autofit/afhints.c (af_axis_hints_new_{segment,edge},
af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset):
Updated accordingly.
* src/autofit/aflatin.c (af_cjk_hints_compute_edges): Ditto.
* src/autofit/afcjk.c (af_cjk_hints_compute_edges): Ditto.
|
|
fd02c369
|
2022-07-29T22:54:38
|
|
* src/autofit/afhints.h: Remove dead code.
|
|
2af6903b
|
2022-07-29T22:42:22
|
|
* src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error.
|
|
a3749a64
|
2022-07-29T21:49:51
|
|
Fix compilation if `TT_CONFIG_OPTION_GX_VAR_SUPPORT` is not set.
* src/sfnt/ttcolr.c: Protect relevant code with
`TT_CONFIG_OPTION_GX_VAR_SUPPORT`.
|
|
38dc768a
|
2022-07-29T21:17:06
|
|
Fix clang14 compiler warnings.
* include/freetype/internal/ftstream.h (FT_GET_SHORT_LE, FT_GET_USHORT_LE):
Fix type.
* src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Always return boolean
value.
(tt_face_get_colorline_stops): Fix type of `var_index_base`.
|
|
284956b5
|
2022-07-26T12:23:15
|
|
[pfr] Fortify the kerning code.
Any array index must be strictly less then the array size. Therefore,
we must reject indexes that are equal to the array size. Alternatively,
we should move the bounds check before the index decrement but that
would be confusing.
In addition, it is ok to decrement zero (.notdef) and get UINT_MAX,
which is then automatically rejected in the bounds check.
* src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix the bounds checking.
|
|
182295cb
|
2022-07-26T16:08:00
|
|
[pfr] Add some safety guards.
* src/pfr/pfrload.c (pfr_phy_font_load): Check resolutions and number of
characters.
Fixes #1174.
|
|
1f005c09
|
2022-07-26T16:05:35
|
|
* src/pfr/*.c: Trivial improvements and formatting.
|
|
9a00282e
|
2022-07-24T19:44:24
|
|
* configure: s/egrep/grep -E/
`egrep` is deprecated.
|
|
0417e54b
|
2022-07-22T16:22:19
|
|
[base] Build outlines in amortized constant time.
When resizing the loader's points and contours, resize them to at least 1.5
times their current size. The code currently only reserves as much space as
is currently required, leading to O(n^2) runtime when adding points one at a
time.
This change does not attempt to ever shrink the loader's point and contour
storage since this was not attempted previously either. The 1.5 multiple
was chosen as a trade-off between potentially unused space and the runtime.
* src/base/ftgloader.c (FT_GlyphLoader_CheckPoints): Implement it.
Fixes #1173.
|
|
275b116b
|
2022-07-05T15:16:31
|
|
[sfnt] Support variable 'COLR' v1 `PaintVarSkew*`.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW`,
`FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER`, and
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW_CENTER`.
(read_paint): Handle new enumeration values.
|
|
44fd524e
|
2022-07-05T15:09:28
|
|
[sfnt] Support variable 'COLR' v1 `PaintVarRotate*`.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE` and
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER`.
(read_paint): Handle new enumeration values.
|
|
603fef28
|
2022-07-05T14:56:22
|
|
[sfnt] Support 'COLR' v1 variable `PaintVarScale*`.
* src/sfnt/ttcolr.c: (FT_PaintFormatInternal): New enumeration values
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE`,
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER`,
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM`, and
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER`.
(read_paint): Handle new enumeration values.
|
|
d134b9e3
|
2022-07-05T14:51:48
|
|
[sfnt] Support for 'COLR' v1 variable translate.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE`.
(read_paint): Handle new enumeration value.
|
|
8ec531c2
|
2022-07-05T14:47:57
|
|
[sfnt] Support for 'COLR' v1 variable transforms.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM`.
(read_paint): Handle new enumeration value.
|
|
9c4ad2a9
|
2022-07-05T14:43:10
|
|
[sfnt] Deltas for 'COLR' v1 gradient coordinates.
* src/sfnt/ttcolr.c (read_paint) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Read and
apply deltas to radial, linear, and sweep gradient coordinates such as 'p0',
'p1', 'p2', 'center', 'radii', and 'angles'.
|
|
3414fef7
|
2022-07-04T16:29:31
|
|
[sfnt] Support variable 'COLR' v1 color lines.
* include/freetype/ftcolor.h (FT_ColorStopIterator): Add field
`read_variable` to indicate whether a variation index base should be read.
* src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT`
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`.
(read_color_line): New parameter `read_variable`; update callers.
(read_paint): Handle new enumerations.
|
|
7c151abb
|
2022-07-04T12:44:06
|
|
[sfnt] Apply variation deltas to `PaintVarSolid`.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal_): New enumeration
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`.
(get_deltas_for_var_index_base) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New
function to retrieve an array of delta values, which will be used for most
of 'COLR' v1 variation formats (in follow-up commits).
(read_paint): Add `face` parameter; update caller.
Handle `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`.
|
|
8a9192f6
|
2022-07-07T13:02:10
|
|
[sfnt] Check safety of cast to `TT_Driver` before accessing member.
* src/sfnt/ttcolr.c (VARIABLE_COLRV1_ENABLED): Access
`enable_variable_colrv1` only if driver class matches.
|
|
d5d048bb
|
2022-07-03T20:26:31
|
|
doc: Clarify description of `FT_Stream_IoFunc`.
The existing documentation comments on `FT_Stream_IoFunc` hinted at the dual
seek/read behavior required for custom stream implementations to work, but
it didn't explicitly explain it. Without looking at the internals of
FreeType, it was easy for someone to assume their implementation should
handle both seek and read operations all the time. If this is done, you get
a variety of errors, but mostly just `Unknown_File_Format` (error code
0x02).
|
|
31b14fd4
|
2022-06-29T16:01:13
|
|
[sfnt] Load variation store for 'COLR' v1.
* src/sfnt/ttcolr.c: Include `ttobjs.h` temporarily.
(VARIABLE_COLRV1_ENABLED): New temporary macro to detect whether variable
COLRv1 is enabled.
(Colr): New fields `var_store` and `delta_set_idx_map`.
(tt_face_load_colr, tt_face_free_colr) [VARIABLE_COLRV1_ENABLED]: Load and
free variation store data using the functions from the Multiple Masters
service.
|
|
1a242558
|
2022-06-30T09:25:14
|
|
[base] Improve error handling in `FT_GlyphLoader_CheckPoints`.
If `FT_GlyphLoader_CreateExtra` returns an error (and a couple of other
places), `FT_GlyphLoader_CheckPoints` would propagate the error immediately,
rather than cleaning up the partially set up `FT_GlyphLoader`. As a
consequence, a subsequent attempt to create a glyph could result in a crash.
* src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Ensure all the error
conditions exits are consistent, eventually calling `FT_GlyphLoader_Reset`.
|
|
55a97b0c
|
2022-06-23T08:51:50
|
|
CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets.
FreeType can be located by consuming projects that use
`find_package(Freetype)` either via the old `MODULE` path (which uses
`FindFreetype.cmake` supplied by CMake), or via the new `CONFIG` path (which
uses `freetype-config.cmake` as supplied by this project). Up to this point
the CMake module has supplied the target `Freetype::Freetype` and the config
file provided by this project the target `freetype`. Now we supply both
`freetype` and `Freetype::Freetype` so that consuming projects can always
use the target `Freetype::Freetype` regardless of what path was taken by
`find_package(Freetype)`.
Fixes #1165.
|
|
31005d98
|
2022-07-02T09:34:13
|
|
include/freetype/ftmm.h: Improve documentation.
|
|
bec4ef41
|
2022-07-01T12:04:28
|
|
[base] Round values in `FT_MulAdd_Fix`.
This avoids regressing Blink layout tests and makes `FT_MulAdd_Fix` delta
retrieval implementation consistent with the previous implementation, which
used `FT_fixedToInt` and included rounding.
* src/base/ftcalc.c (FT_MulAdd_Fix): Implement it.
Also fix remaining `temp` initialization compilation issue.
Fixes #1169.
|
|
de27955c
|
2022-07-01T06:33:50
|
|
Minor formatting.
|
|
0607e0e9
|
2022-06-30T10:55:50
|
|
Fix initialisation of temp variable in new FT_MulAddFix
src/truetype/ttgxvar.c (FT_MulAddFix): Initialise `temp`.
|
|
dece9535
|
2022-06-29T11:48:53
|
|
[truetype] Perform variation store delta computation with 64-bit precision.
* include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Make type
explicitly 32-bit.
* include/freetype/internal/services/svmm.h
(FT_Var_Get_Item_Delta_Func): Change return type to `FT_ItemVarDelta`
* truetype/ttgxvar.h (tt_var_get_item_delta): Change return type to
`FT_ItemVarDelta`.
* truetype/ttgxvar.c (tt_var_get_item_delta): Store scalars and deltas
to intermediate array, perform computation using new method
`FT_MulAddFix`.
|
|
15fef219
|
2022-06-29T11:48:10
|
|
New function `FT_MulAddFix` to compute the sum of fixed-point products.
This function, based on the code of `FT_MulFix`, uses 64-bit precision
internally for intermediate computations.
* include/freetype/internal/ftcalc.h, base/ftcalc.c (FT_MulAddFix):
Implement it.
|
|
2db58e06
|
2022-06-22T12:13:27
|
|
CMakeLists.txt: Move inclusion of `FindPkgConfig` down.
It must come after `CMAKE_TOOLCHAIN_FILE`.
Fixes #1167.
|
|
117df36b
|
2022-06-22T09:33:20
|
|
[sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14
|
|
5e48c88d
|
2022-06-21T17:34:29
|
|
* docs/CHANGES: Announce impending Infinality removal.
|
|
9006ff7d
|
2022-06-21T17:10:56
|
|
* ttgload.c (TT_Process_Composite_Glyph): Fix a signedness warning.
|
|
2848378b
|
2022-06-21T17:08:04
|
|
s/fixed point/fixed-point/
|
|
40c6f973
|
2022-06-21T14:45:42
|
|
.gitlab-ci.yml: Correctly upgrade `meson`.
|
|
4b6f92e6
|
2022-06-01T13:24:09
|
|
Proposal: Feature control for variable COLRv1
* include/freetype/ftdriver.h (variable-color-v1 property): Add documentation
for variable-colr-v1 property.
* src/truetype/ttdriver.c (tt_property_set): Ingest variable-control property
when called, set to enable_variable_colrv1 driver flag.
* src/truetype/ttobjs.h (TT_DriverRec): Add enable_variable_colrv1 flag.
|
|
b861b241
|
2022-05-27T11:26:30
|
|
[meson] Disable FreeType in HarfBuzz fallback.
This avoids cyclic subproject configuration when the 'harfbuzz' feature is
enabled, or `--wrap-mode=forcefallback` is used, but HarfBuzz is built as a
subproject. HarfBuzz does the same and disables HarfBuzz support when
configuring FreeType as a subproject.
* meson.build (harfbuzz_dep): Implement it.
* subprojects/harfbuzz.wrap: New file.
* .gitlab-ci.yml [windows meson]: Use latest version of the meson 0.59
series, which has a necessary bug fix to make CI work.
|
|
47103b2f
|
2022-06-18T23:09:17
|
|
[truetype] Clean up phantom point accounting.
This formalizes that the phantom points appended in the outline
do not increase its point count, nor are they tagged or included
in any additional contours. Only their coordinates are stored.
They are counted in the glyph zone, however.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Infer `n_points`
from the outline size plus four phantom points.
* src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Remove this
argument.
* src/truetype/ttgload.c (tt_prepare_zone): Add phantom four.
(TT_Process_Simple_Glyph, load_truetype_glyph): Update all callers.
|
|
705f4161
|
2022-06-18T23:02:26
|
|
[truetype/GX] Clean up phantom point adjustment.
This moves phantom point and advance variation adjustment next to
calculations. The logic stays the same, HVAR and VVAR take priority.
* src/truetype/ttgload.c (load_truetype_glyph): Move it from here...
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here
and check for HVAR and VVAR presence outside the main loop.
|
|
f7daf9d2
|
2022-06-17T12:37:02
|
|
[stream] Fix reading s32 when long is s64
`FT_READ_LONG`, `FT_GET_LONG`, and related macros did not return
negative values when `long` is more than 32 bits. `FT_Stream_ReadULong`
would read four bytes into the LSB of an `FT_ULong` and return that.
Since this can never set the MSb of the `FT_ULong` when `FT_ULong` is
more than 32 bits the cast to `FT_Long` never resulted in a negative
value.
Fix this by modifying `FT_Stream_Read*` to return a type of the same
size as the bytes it is reading and changing the `FT_READ_*` and
`FT_GET_*` macros to cast to the same type returned by `FT_Stream_Read*`
but with the correctly signed type (instead of casting to what is
assumed to be the type of `var` which will happen automatically anyway).
There exist a few cases like with the `OFF3` variants where there isn't
generally a type with the correct size. `FT_PEEK_OFF3` works around this
loading the bytes into the three most significant bits and then doing a
signed shift down. `FT_NEXT_OFF3` also already worked correctly by
casting this signed value to another signed type. `FT_Stream_GetUOffset`
works correctly but one must be careful not to attempt to cast the
returned value to a signed type. Fortunately there is only
`FT_GET_UOFF3` and no `FT_GET_OFF3`.
All of these cases are handled correctly when reading values through
`FT_Stream_ReadFields` since it generically computes the signed value
through an `FT_Int32`. This change is essentially doing the same for
these macros.
* include/freetype/internal/ftstream.h (FT_NEXT_*, FT_GET_*, FT_READ*):
Update macros and return types to use fixed size types for fixed size
values.
* src/base/ftstream.c (FT_StreamGet*, FT_StreamRead*): Dito.
Issue: #1161
|
|
d9b8a69e
|
2022-06-16T22:13:25
|
|
[truetype/GX] Fix an old typo.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Vertical
advance is measured along y-coordinate.
|
|
9c706dcc
|
2022-06-16T16:11:51
|
|
[truetype/GX] Clean up advance adjustment (Brrr).
* src/truetype/ttgload.c (load_truetype_glyph): Remove remaining code.
|
|
90795210
|
2022-06-15T16:07:22
|
|
[type1] Directly search for eexec in private dict
This code originally just searched for `eexec`. This was later modified
to check that the `eexec` found is valid (not in a string or comment).
This was done by searching for `eexec` as before and then, for each
`eexec` found, searching from the beginning using the correct parsing to
see if the `eexec` was still found. If the private dictionary is large
and contains many copies of `eexec` which are not valid, the initial
part of the private dictionary is scanned once for each, potentially
leading to n^2 parsing time.
Instead of finding an initial `eexec` and then re-parsing to discover if
it is valid, drop the initial search for `eexec` and just parse to find
a valid `eexec`. This is strictly faster since the validation must
happen anyway and avoids restarting from the beginning each time an
`eexec` is found in the data.
* src/type1/t1parse.c (T1_Get_Private_Dict): avoid n^2 parsing
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1328883
|
|
d6fc8c6b
|
2022-06-15T18:28:50
|
|
[truetype/GX] Clean up advance adjustment.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph):
Move the advance adjustment from here...
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here and
simplify arguments.
* src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Update prototype
with fewer arguments.
|
|
8bb7722a
|
2022-06-13T15:09:36
|
|
[gzip] Handle inflate returning Z_NEED_DICT
When `inflate` returns `Z_NEED_DICT` this is currently not reported as
an error and callers may assume that the decompression succeeded when it
did not. In particular, a compressed table in a woff file may not
actually be decompressed and written as expected, leaving the backing
memory for the expanded table uninitialized.
* src/gzlip/ftgzip.c (FT_Gzip_Uncompress): treat `Z_NEED_DICT` as
indicating invalid data since there is no means to provide a dictionary.
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1335712
|
|
58395dd2
|
2022-06-13T15:28:00
|
|
[woff] Don't allocate table entries until needed
* src/sfnt/sfwoff.c (woff_open_font): delay allocating space for the
table entries until they are actually written out with the data.
|
|
8b6bcc92
|
2022-06-12T09:04:13
|
|
* src/sfnt/sfwoff2.c (woff2_open_font): Partial revert.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47981.
|
|
e7482ff4
|
2022-06-11T23:47:19
|
|
* src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Cosmetic macro change.
|
|
73631b95
|
2022-06-11T16:10:40
|
|
[woff, woff2] Avoid buffer zeroing.
* src/sfnt/sfwoff.c (woff_open_font): Use Q-macros.
* src/sfnt/sfwoff2.c: Ditto.
(reconstruct_font): Allocate table_entry on stack.
|
|
4fef1fce
|
2022-06-10T11:34:56
|
|
[smooth] Fix GCC LTO crashes on Windows.
Fixes #1164 by using a volatile variable around `setjmp`. It is hard to
say how this fixes crashes related to certain link-time optimizations.
This does not decrease the rendering performance.
* src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`.
|
|
9acefc4f
|
2022-06-09T10:51:07
|
|
* src/smooth/ftgrays.c [FT_STATIC_RASTER]: Fix compilation.
|
|
b11074cf
|
2022-06-06T15:59:56
|
|
[svg] Set linear advances when loading SVG glyphs
* include/freetype/freetype.h (FT_GlyphSlotRec_): update doc
* src/cff/cffgload.c (cff_slot_load): do it
* src/truetype/ttgload.c (TT_Load_Glyph): do it
Fixes: #1156
|
|
c26872ed
|
2022-05-26T20:27:53
|
|
[svg] Clear correct flags for doc ownership
This issue was discovered with an SVG based font with some documents
compressed and other uncompressed. After loading the first compressed
document the ownership flag on the glyph slot was set to true but never
set to false. As a result after loading a compressed document a glyph
from an uncompressed document would load fine, but when this glyph slot
was cleared it would try to free its document resulting in a wild free.
* src/base/ftobjs.c (ft_glyphslot_clear): clear correct flags
Fixes: #1162
|
|
d6857981
|
2022-05-31T22:40:55
|
|
[docs] Correct favicon.
|
|
8addad60
|
2022-05-31T22:38:24
|
|
[docs] Use hinted favicon.
|
|
c26f0d0d
|
2022-05-26T23:48:26
|
|
[docs] Update favicon.
|
|
b98dd169
|
2022-05-25T14:49:37
|
|
* src/sfnt/ttmtx.c (tt_face_get_metrics): Apply variations unconditionally.
This causes a speed-up of approx. 20% for getting advance widths.
|
|
7838c78f
|
2022-05-20T17:22:25
|
|
[truetype] Support reading 32bit/16bit VarStore deltas
* include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Define type
to be used for delta arrays, upgrade to FT_long.
* src/truetype/ttgxvar.c: Adhere to long_words bit and read either
Short/Byte pairs or Long/Short pairs, as defined by spec. For better
readability, define macro for repetitive read code.
|