|
d0cfb4e1
|
2022-01-11T10:54:10
|
|
Update all copyright notices.
|
|
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
|
|
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.
|
|
c5cd2a3d
|
2021-11-10T08:46:26
|
|
* src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization.
|
|
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.
|
|
d1c20005
|
2021-08-28T07:29:05
|
|
[truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
* src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function
conditionally.
(tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code.
Fixes #1091.
|
|
d3dc2da9
|
2021-06-30T18:22:29
|
|
* src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`.
It is undefined behavior to pass `NULL` to `memcpy`. `coords' is
passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design`
explictly call `tt_set_mm_blend` with `coords` as `NULL`. In
addition, `TT_Set_MM_Blend` has a similar possible issue.
|
|
2149b51f
|
2021-03-13T19:08:09
|
|
Handle various VC++ compiler warnings.
Fixes #1039.
* src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside):
Initialize `sigma`.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if
function arguments are invalid.
* src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast.
* src/sfnt/sfwoff2.c (woff2_decompress)
[!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`.
|
|
d924a66a
|
2021-02-04T07:44:06
|
|
* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
This is a continuation of a similar patch from 2020-12-02, which
missed some locations.
|
|
b6e8a712
|
2021-01-17T07:18:48
|
|
Update all copyright notices.
|
|
272ae5ee
|
2020-12-07T10:29:24
|
|
* src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`.
|
|
a6adb256
|
2020-12-02T14:15:07
|
|
* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
|
|
804e625d
|
2020-10-28T13:34:52
|
|
[truetype] Minor update to forthcoming OpenType 1.8.4 standard.
* src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit
size of `regionCount`.
|
|
8cfc41ae
|
2020-07-25T12:23:22
|
|
Fix `-Wformat' compiler warnings.
Problem reported by Priyesh kumar <priyeshkkumar@gmail.com>
* src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments
to tracing macro.
* src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property):
Ditto.
* src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto.
Reformulate message.
* src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto.
* src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
Trace table offset, too.
* src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto.
|
|
e1339133
|
2020-06-08T13:31:55
|
|
Make macros for header file names optional.
We no longer have to take care of the 8.3 file name limit; this
allows us (a) to introduce longer, meaningful file names, and (b) to
avoid macro names in `#include' lines altogether since some
compilers (most notably Visual C++) doesn't support this properly.
*/*: Replace
#include FOO_H
with
#include <freetype/foo.h>
or something similar. Also update the documentation.
|
|
11975fe9
|
2020-02-29T20:18:00
|
|
Fix state of `FT_Face' for buggy `gvar' tables (#57923).
By resetting the blend as implemented with this commit fonts with
invalid `gvar' tables may keep calling into `ft_var_load_gvar' from
`tt_set_mm_blend' and failing, but the font was invalid anyway and
we want to keep seeing the failure in `tt_set_mm_blend'.
* src/truetype/ttgxvar.c (ft_var_load_gvar): Calculate length of
offset array once.
Allocate arrays after `FT_FRAME_ENTER' (extra check before
allocating and avoid needing to free array later if error entering
frame).
Always call `FT_FRAME_EXIT'.
Consistently set counts immediately after array initialized.
Reset the blend (particularly `blend->glyphoffsets') on failure.
|
|
216e0776
|
2020-02-28T07:43:00
|
|
[truetype] Add better checks for loading `gvar' table (#57905).
* src/truetype/ttgxvar.c (ft_var_load_gvar): Delay settings of any
`blend->xxxcount' values until the corresponding data has been
checked.
Also do some sanitizing to avoid a too early exit.
(TT_Vary_Apply_Glyph_Deltas): Improve tracing message.
|
|
e5038be7
|
2020-01-19T17:05:19
|
|
Update all copyright notices.
|
|
59415658
|
2019-08-27T14:07:14
|
|
[truetype] Prevent crash in `TT_Set_Named_Instance' (#56813).
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Fix error
handling.
|
|
7d1d3b9a
|
2019-08-26T09:08:56
|
|
[type1] Fix `FT_Get_Var_Axis_Flags' (#56804).
* src/type1/t1load.c (T1_Get_MM_Var): Allocate space for axis flags.
Also remove redundant assignment.
|
|
49079ce2
|
2019-05-29T08:08:53
|
|
[truetype] Fix 32bit builds (#56404).
Patch suggested by Ben Wagner <bungeman@google.com>.
* src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
harmful cast to unsigned type.
|
|
306d2f6c
|
2019-05-23T14:41:57
|
|
[truetype] Draw glyphs without deltas in variation font (#56374).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
`unrounded' array.
|
|
b0522701
|
2019-05-16T12:52:57
|
|
[truetype] Actually scale varied CVT values.
Up to now, only the unscaled CVT values were varied; in other words,
the `CVAR' data was never used for bytecode hinting.
* src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
function.
(tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
|
|
37580053
|
2019-05-16T12:15:54
|
|
[truetype] Use 26.6 format for storing unscaled CVT values.
If `CVAR' data is applied to variation fonts, fractional values are
possible.
* include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
`cvt' from `FT_Short' to `FT_Int32'.
* src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
(tt_face_vary_cvt): Use it to update code to 26.6 format.
* src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
format.
* src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
format.
|
|
94ebc248
|
2019-05-12T21:05:36
|
|
[truetype] Doh. Fix last commit to make it work.
Very embarassing :-)
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
* src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
argument; update all callers.
(TT_Process_Simple_Glyph): Use it. The `unrounded' array is active
for variation fonts only, thus also enclose related code with
`#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where
necessary.
Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
but allocate a temporary array.
Speed up the scaling of the `unrounded' array.
* src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
conversions and rounding. The unsigned type must have more or equal
bits to the signed type.
|
|
1178227b
|
2019-05-11T09:29:19
|
|
[truetype] Increase precision of font variation (#54371).
This patch make FreeType use font units in 26.6 format internally
instead of integers.
* src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
(TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
coordinates.
* src/truetype/ttgxvar.h: Updated.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
`extra_points2' array to temporarily hold unrounded point
coordinates; use them to compute scaled coordinates and linear
advance width and height.
(load_truetype_code): Adjust similarly.
|
|
dc39f76c
|
2019-05-07T10:09:55
|
|
* src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
|
|
7b841047
|
2019-05-04T08:13:22
|
|
Various clang 8.0 static analyzer fixes.
Reported by Sender Ghost <lightside@gmx.com>.
* src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
case where `edge->first' could be NULL.
* src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
`size'.
* src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
`draw_right' might be NULL.
* src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
`aadvance'.
Ensure `abearing' always hold a meaningful result.
* src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
not NULL before accessing it.
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
test of `namedstyle'.
* src/type42/t42parse.c (t42_parser_done): Ensure
`parser->root.funcs.done' is not NULL before accessing it.
|
|
af400438
|
2019-04-22T07:41:35
|
|
Fix return value of `FT_Set_Named_Instance' (#56186).
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
internal return value -1 of `TT_Set_Var_Design'.
|
|
75859970
|
2019-02-23T10:07:09
|
|
Update all copyright notices.
|
|
b66d6a91
|
2019-02-06T07:38:25
|
|
CHANGES: Document recent metrics change from Nikolaus.
|
|
a6feefdf
|
2019-02-02T15:50:57
|
|
[truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
Instead of setting typo or win metrics as the new FT_Face metrics
indiscriminately, apply only typo deltas to the currently active FT_Face
metrics. This prevents line height differences when e.g. the default
outlines were used as the regular face and instances for everything else.
* src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
|
|
f686ad46
|
2019-01-22T20:31:44
|
|
Update copyright years.
|
|
fb0d66d0
|
2018-11-07T00:47:44
|
|
[truetype] Fix VF check from 2018-09-12 (#54973).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
offsets for estimates.
|
|
cc288e38
|
2018-11-04T22:09:16
|
|
Minor.
|
|
1f43affc
|
2018-11-04T13:11:16
|
|
* src/truetype/ttgxvar.c: Use enum definitions.
|
|
d95a12b8
|
2018-11-03T23:02:58
|
|
* src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
|
|
547f82f2
|
2018-11-03T23:00:36
|
|
* src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
|
|
ce3feb0b
|
2018-11-03T22:43:21
|
|
Revert due to specs: [truetype] Speed up variation IUP.
This reverts commit 1e4496c54c010843c1bac56e5d344115d1a49620.
|
|
dfa86d65
|
2018-11-03T22:36:52
|
|
Revert "[truetype] Speed up variation IUP."
This reverts commit 1e4496c54c010843c1bac56e5d344115d1a49620.
|
|
61d50756
|
2018-11-02T20:42:25
|
|
* src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
Reported and tested by Behdad.
|
|
1e4496c5
|
2018-10-31T23:17:33
|
|
[truetype] Speed up variation IUP.
* src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
snapping to the same position from true interpolation.
|
|
300da33d
|
2018-10-31T21:55:40
|
|
* src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
|
|
10e54d04
|
2018-09-13T21:47:35
|
|
[truetype] Some fixes for VF checks.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
* src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
frame if we have invalid glyph variation data offsets.
(tt_face_vary_cvt): Protect against missing `tuplecoords' array.
Fix typo.
|
|
65681e6d
|
2018-09-12T07:40:49
|
|
[truetype] Improve VF check.
Triggered by
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
* src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
for `tupleCount'.
|
|
53c5e4bd
|
2018-09-12T07:27:30
|
|
* src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
|
|
a0dd16fb
|
2018-08-15T18:13:17
|
|
Don't use `trace_' prefix for FT_COMPONENT arguments.
* include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
(FT_TRACE): Use `FT_TRACE_COMP'.
*/* (FT_COMPONENT): Updated.
|
|
c9edca8e
|
2018-07-27T10:44:01
|
|
[truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
* src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
`face->doblend' if the current call to the function yields the same
blend coordinates as the previous call.
|
|
839cb404
|
2018-07-16T05:45:45
|
|
* src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
|
|
6ceeb87f
|
2018-07-05T22:31:10
|
|
Fix more 32bit issues (#54208)
* src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
run-time error.
* src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
numeric overflow.
|
|
207ca38f
|
2018-06-25T18:50:00
|
|
[truetype] Fix memory leak.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
Fix typo in `goto' destination.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
|
|
589d1f08
|
2018-06-25T18:38:04
|
|
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
|
|
a632fb54
|
2018-06-24T15:22:10
|
|
[truetype] Increase precision while applying VF deltas.
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.
|
|
9ac9060d
|
2018-06-03T09:01:17
|
|
[GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts
`docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.
No change in functionality, of course.
I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
|
|
597cb3b4
|
2018-03-30T13:46:03
|
|
[truetype] Fix memory leak (only if tracing is on).
* src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix
it.
|
|
036bdc0c
|
2018-01-28T00:05:46
|
|
[truetype] Minor typo.
|
|
68dddcdc
|
2018-01-27T23:59:30
|
|
[truetype] Better protection against invalid VF data.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739
Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7.
* src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize
`normalizedcoords'.
|
|
f438e069
|
2018-01-27T14:39:15
|
|
* src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
|
|
ef486530
|
2018-01-27T11:16:22
|
|
[truetype] Better trace VF instances.
* src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number
of coordinates.
(TT_Get_MM_Var): Trace instance indices names.
(TT_Set_Var_Design): Updated.
|
|
50f693a7
|
2018-01-27T09:33:17
|
|
[truetype] Beautify tracing of VF axis records.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a
table-like manner.
|
|
994eb2b3
|
2018-01-26T23:17:43
|
|
[truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Set
`face->blend->num_axis' in case we have to initialize the
`face->blend'.
|
|
55d6abea
|
2018-01-03T19:01:15
|
|
* src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
This is a better fix than the previous commit, which is now
reverted.
|
|
ecfdfd44
|
2018-01-03T00:20:11
|
|
[truetype] Make blend/design coordinate round-tripping work.
Behdad reported that setting blend coordinates, then getting design
coordinates did incorrectly return the default instance's
coordinates.
* src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
|
|
0a0c2256
|
2018-01-02T09:33:57
|
|
Update copyright year.
|
|
08cd62de
|
2017-12-20T22:06:19
|
|
Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
We exit early if the current design or blend coordinates are
identical to the new ones.
* src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
Implement it, returning internal error code -1 if there will be no
variation change.
* src/type1/t1load.c (t1_set_mm_blend): Ditto.
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
|
|
0579d545
|
2017-12-18T23:45:58
|
|
Update incorrect ChangeLog entry.
|
|
bdab6578
|
2017-12-18T20:45:17
|
|
[truetype] Minor code beautification.
* src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
design coordinates.
Simplify code.
|
|
2fe272ac
|
2017-12-18T19:40:07
|
|
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
|
|
e7935f29
|
2017-12-18T07:29:57
|
|
[truetype] Don't apply HVAR and VVAR deltas twice (#52683).
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
`pp1' to `pp4', except if we have an HVAR and/or VVAR table.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle
alternative code branch identically w.r.t. presence of an HVAR
and/or VVAR table.
|
|
361af72e
|
2017-12-17T15:07:02
|
|
[truetype] Correctly handle variation font phantom points (#52683).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
point indices.
|
|
71fecc53
|
2017-12-05T12:06:29
|
|
Improve tracing messages by using singular and plural forms.
* src/*/*.c: Implement it.
|
|
337e49cf
|
2017-12-04T12:36:07
|
|
[truetype] Allow shared points in `cvar' table (#52532).
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
and adjusting the corresponding code from
`TT_Vary_Apply_Glyph_Deltas'.
|
|
f89c67f0
|
2017-10-07T13:10:53
|
|
[cff, truetype] Adjust behaviour of named instances.
This commit completely separates the interaction between named
instances and variation functions. In particular, resetting the
variation returns to the current named instance (if set) and not to
the base font.
As a side effect, variation functions no longer change the named
instance index.
* src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
function.
Also apply `MVAR' table to named instances.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast.
(tt_set_mm_blend): No longer check whether requested variation
coincides with a named instance.
(TT_Set_Var_Design): Use current named instance for default
coordinates.
* src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'.
|
|
e9ef538a
|
2017-10-07T12:57:11
|
|
Make `FT_Set_Named_Instance' work.
* src/cff/cffdrivr.c (cff_set_instance): New function.
(cff_service_multi_masters): Register it.
* src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function.
* src/truetype/ttgxvar.h: Updated.
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register
it.
* src/type1/t1load.c (T1_Reset_MM_Blend): New function.
* src/type1/t1load.h: Updated.
* src/type1/t1driver.c (t1_service_multi_masters): Register it.
|
|
8c92f762
|
2017-10-07T12:12:49
|
|
Make `FT_FACE_FLAG_VARIATION' work.
* include/freetype/internal/tttypes.h (TT_Face): Remove
`is_default_instance'; this can be replaced with a combination of
`FT_IS_VARIATION' and `FT_IS_INSTANCE'.
* src/cff/cffdrivr.c (cff_get_advances): Updated.
* src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
(sfnt_init_face): Updated.
* src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c
(TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE),
src/truetype/ttgxvar.c (tt_set_mm_blend): Updated.
* src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
Handle `FT_FACE_FLAG_VARIATION'.
* src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
`FT_FACE_FLAG_VARIATION'.
|
|
b19cdc9c
|
2017-09-21T11:02:35
|
|
[truetype] Fix `mmvar' array pointers, part 2.
The previous commit was incomplete.
* src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
`master' also.
|
|
3b3cb32d
|
2017-09-21T09:03:20
|
|
[truetype] Fix `mmvar' array pointers.
Without this change, clang's AddressSanitizer reports many runtime
errors due to misaligned addresses.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
size for sub-array offsets into `mmvar'.
|
|
f43b3094
|
2017-08-05T18:22:17
|
|
[base, truetype] New function `FT_Get_Var_Axis_Flags'.
The reserved `flags' field got a value in OpenType version 1.8.2;
unfortunately, the public `FT_Var_Axis' structure misses the
corresponding element. Since we can't add a new field, we add an
access function.
* src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
* include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
Updated.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
of `mmvar' to hold axis flags.
Fill the axis flags array.
* docs/CHANGES: Updated.
|
|
7e508242
|
2017-08-01T12:44:35
|
|
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
|
|
55bbb98f
|
2017-08-01T09:17:02
|
|
[truetype] Fix loading of named instances.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position
while loading the `avar' table.
|
|
4261e497
|
2017-07-05T23:00:23
|
|
* src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395).
|
|
1c85479d
|
2017-07-04T08:08:54
|
|
[truetype] Prevent address overflow (#51365).
* src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard.
|
|
5f2a72cb
|
2017-06-10T11:29:24
|
|
[truetype] Fix TT_Set_Var_Design.
Reported by Nikolaus Waxweiler <madigens@gmail.com>.
* src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
case where we have less input coordinates than axes.
|
|
a9331c0f
|
2017-05-27T15:50:25
|
|
[truetype] Fix handling of design coordinates (#51127).
* src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design
coordinates if we have to create the `blends->coord' array.
(TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance
coordinates if no instance is selected yet.
|
|
60bf264e
|
2017-05-02T14:38:54
|
|
[truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
When points are not touched by gvar interpolation deltas, FreeType
gave a slightly different result than Apple's CoreText.
The OpenType working group will update the specification to document
the following behaviour: If the two points with deltas to the `left'
and `right' of the untouched point have the same coordinate, then
the inferred delta for the untouched point should be zero.
* src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
behaviour.
|
|
da38be83
|
2017-03-30T13:24:03
|
|
[truetype] Fix HVAR and VVAR handling (#50678).
* src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle
glyph indices larger than `mapCount' as described in the
specification.
|
|
1ede3674
|
2017-03-30T00:26:31
|
|
[truetype] Fix thinko related to PS name of default named instance.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are
name ID values, not indices into the array of name entries.
|
|
9931175d
|
2017-03-18T07:06:49
|
|
Improve `make multi'.
* src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
* src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
* src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
* src/sfnt/pngshim.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
* src/sfnt/ttbdf.c: Avoid empty source file.
* src/sfnt/ttpost.c: Guard file with
TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
* src/sfnt/ttsbit.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
* src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
source file.
* src/truetype/ttsubpix.c: Guard file with
TT_USE_BYTECODE_INTERPRETER also.
* src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
* src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
entries.
|
|
d9ff6f20
|
2017-03-16T20:20:51
|
|
* src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
|
|
981c23b7
|
2017-03-15T11:35:26
|
|
Remove clang compiler warnings (#50548).
* include/freetype/internal/tttypes.h (TT_FaceRec): Make
`var_postscript_prefix_len' unsigned.
* src/autofit/afwarp.c (af_warper_compute_line_best): Remove
redundant assignment.
* src/cff/cffload.c (cff_subfont_load): Add casts.
* src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment.
* src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static'
keyword.
Add casts.
(fixed2float): Add cast.
(sfnt_get_var_ps_name): Make `p' always initialized.
Add casts.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
|
|
34010f7c
|
2017-03-14T21:50:22
|
|
[sfnt] Implement PS names for font instances [3/3].
Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
* include/freetype/internal/tttypes.h (TT_FaceRec): New fields
`var_postscript_prefix' and `var_postscript_prefix_len'.
* src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
(sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
(get_win_string, get_apple_string): Remove `const' from return
value.
(MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
(hexdigits): New array.
(sfnt_get_var_ps_name): New function, implementing Adobe TechNote
5902 to construct a PS name for a variation font instance.
(sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
* src/sfnt/sfobjs.c (sfnt_done_face): Updated.
* src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
`face->postscript_name' to trigger recalculation for new instance
parameters.
|
|
447a0b62
|
2017-03-13T07:42:34
|
|
[truetype] Ignore invalid MVAR tags.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838
* src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit
warning for invalid tags.
(tt_apply_mvar): Ignore invalid tags.
|
|
5eb0fd5e
|
2017-03-12T20:46:56
|
|
[truetype] Store and use design coordinates also.
* include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
Add `normalizedcoords' argument.
* src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
the design coordinates of the current instance.
Updated.
* src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
(tt_set_mm_blend): ... New function.
Convert data in `normalizedcoords' array to `coords' array on
demand.
(TT_Set_Var_Design): Store argument data in `coords' array.
(TT_Get_Var_Design): Get data from `coords' array.
(tt_get_var_blend): Updated.
(tt_done_blend): Updated.
* src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
* src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
* src/cff/cffobjs.c (cff_face_init): Updated.
|
|
4a62922b
|
2017-03-12T10:19:53
|
|
src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
|
|
27fee7f8
|
2017-03-06T20:45:44
|
|
[sfnt, truetype] Always provide default instance.
As documented in the OpenType specification, an entry for the
default instance may be omitted in the named instance table. In
particular this means that even if there is no named instance table
in the font we actually do have a named instance, namely the default
instance.
For consistency, we always want the default instance in our list of
named instances. If it is missing, we try to synthesize it.
* src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default
instance is in the table of named instances. Otherwise adjust
number of instances.
* src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H.
(TT_Get_MM_Var): Use `face->root.style_flags' as the number of named
instances.
Sythesize a named instance entry if necessary.
(tt_done_blend): Free `normalized_stylecoords'.
|
|
588e38e0
|
2017-03-04T11:04:24
|
|
[truetype] Make `TT_Set_MM_Blend' set named instance index.
* src/truetype/ttgxvar.h (GX_Blend): New array
`normalized_stylecoords'.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill
`normalized_stylecoords'.
(TT_Set_MM_Blend): Check instance tuple and adjust `face_index'
accordingly.
|