Werner Lemberg
f686ad46a3
Update copyright years.
2019-01-22 20:31:44 +01:00
John Tytgat
f61f49fef7
[sfnt] Handle TT fonts having two PostScript font names ( #55471 ).
...
* src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
other language found for PostScript font names.
2019-01-18 13:25:23 +01:00
Chris Liddell
b75abeb5e6
[psaux] Fix closepath ( #55414 ).
...
All of the Type 1 path building is done with code common to the
revised CFF engine, with the exception of closepath, which was still
calling ps_builder_close_contour(), thus previously cached segments
were not always written to the path, and glyph corruption, or even
invalid outlines were possible.
* src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
Switch to calling `cf2_glyphpath_closeOpenPath'.
2019-01-08 20:51:39 -05:00
Werner Lemberg
b89166cc4d
* src/autofit/aflatin2.c: Some fixes from `aflatin.c' ( #55310 ).
2018-12-29 08:55:01 +01:00
Werner Lemberg
afa043de9c
Fix links (mostly http -> https).
2018-12-25 22:44:05 +01:00
Werner Lemberg
5e02965905
* src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
2018-12-25 19:24:06 +01:00
Werner Lemberg
ec439711b1
[gxvalid] Fix compiler warnings.
...
* src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
2018-12-12 19:59:42 +01:00
Werner Lemberg
3e8a2283f5
* src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
...
`control_len' only gets its value from `n_ins' (and vice versa),
which is always read as `unsigned short' and thus can't be larger
than 0xFFFF.
2018-12-11 23:54:17 +01:00
Werner Lemberg
f1b6183f36
[bdf] Ignore data after `ENDFONT'.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
* src/bdf/bdflib.c (_bdf_parse_end): New function.
(_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
been encountered.
2018-12-04 11:51:15 +01:00
Alexei Podtelezhnikov
456e9c8fce
* builds/windows/visualc/freetype.dsp: Dust off.
2018-12-02 23:40:55 -05:00
Alexei Podtelezhnikov
3dd4e76b19
* builds/windows/vc2010/freetype.vcxproj: Simplify.
2018-11-27 23:22:52 -05:00
Chris Liddell
78a1e69517
[type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
...
For multiple master fonts, common usage (in Postscript) is to modify
the WeightVector of an existing font instance, this addition
supports that use.
* include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
FT_Get_MM_WeightVector): New API functions.
* include/freetype/internalservices/svmm.h
(FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
function types.
(MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
members.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
* src/cffcffdrivr.c (cff_set_mm_weightvector,
cff_get_mm_weightvector): New functions.
(cff_service_multi_masters): Register them.
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
This driver doesn't use the new interface.
* src/type1/t1load.c (T1_Set_MM_WeightVector,
T1_Get_MM_WeightVector): New functions.
* src/type1/t1driver.c (t1_service_multi_masters): Register them.
* src/type1/t1load.h: Updated.
2018-11-27 22:24:06 +01:00
Ben Wagner
1fc6937f7f
[cff] Fix compiler warning ( #55105 ).
...
* src/cff/cffparse.c (cff_parser_run): Guard label only used if
CFF_CONFIG_OPTION_OLD_ENGINE is active.
2018-11-27 18:02:44 +01:00
Ben Wagner
74cdd75f6f
[truetype] Fix numeric overflow ( #55103 ).
...
* src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
2018-11-27 17:56:25 +01:00
Alexei Podtelezhnikov
1c4004bb34
[builds] Belated DLL support with vc2002-vc2008.
...
The solution and project files should be automatically upgraded for
the approriate Visual C++ version.
* builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
* builds/windows/visualc/index.html: Document the change.
* builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
2018-11-25 23:19:39 -05:00
Armin Hasitzka
55b35cd611
* src/cff/cffparse.c: Please the compiler.
2018-11-22 11:43:48 +00:00
Armin Hasitzka
642bc7590c
[cff] Fix memory overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
* src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
evaluated T2 charstrings in separately allocated memory.
2018-11-22 10:29:35 +00:00
Alexei Podtelezhnikov
81f43a9d36
* builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
2018-11-18 14:47:32 -05:00
Alexei Podtelezhnikov
78db9eecff
[smooth] Placeholder only for library-enabled LCD filtering.
...
* src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
`FT_Library_SetLcdFilter' call.
2018-11-10 15:39:19 -05:00
Werner Lemberg
58e48e9287
[psaux] Add safety guard ( #54985 ).
...
* src/psaux/psobjs.c (cff_builder_close_contour): Do it.
2018-11-09 12:14:35 +01:00
Alexei Podtelezhnikov
3b6e65f7bf
* builds/unix/configure.raw: Require `windows.h' for windres.
2018-11-08 23:36:37 -05:00
Alexei Podtelezhnikov
181033d396
[ftstroke] Fix unpredictable failures ( #54986 ).
...
* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
2018-11-08 21:04:56 -05:00
Alexei Podtelezhnikov
81c31f62cb
[ftstroke] Fix unpredictable failures ( #54976 ).
...
* src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
2018-11-08 07:54:47 -05:00
Ben Wagner
fb0d66d04c
[truetype] Fix VF check from 2018-09-12 ( #54973 ).
...
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
offsets for estimates.
2018-11-07 00:47:44 +01:00
Werner Lemberg
fbd2452346
[pshinter] Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
* src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
2018-11-06 11:15:31 +01:00
Werner Lemberg
5b86f53dd6
[psaux] Fix timeout in old CFF engine.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
<cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
loop.
2018-11-06 11:08:41 +01:00
Alexei Podtelezhnikov
1f43affc09
* src/truetype/ttgxvar.c: Use enum definitions.
2018-11-04 13:11:16 -05:00
Alexei Podtelezhnikov
d95a12b88d
* src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
2018-11-03 23:02:58 -04:00
Alexei Podtelezhnikov
547f82f20e
* src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
2018-11-03 23:00:36 -04:00
Alexei Podtelezhnikov
dfa86d65e5
Revert "[truetype] Speed up variation IUP."
...
This reverts commit 1e4496c54c
.
2018-11-03 22:36:52 -04:00
Alexei Podtelezhnikov
61d50756b6
* src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
...
Reported and tested by Behdad.
2018-11-02 20:42:25 -04:00
Shailesh Mistry
339c451ad0
[autofit] Prevent SEGV.
...
See
https://bugs.ghostscript.com/show_bug.cgi?id=697545
for more details on how the bug was found.
* src/autofit/afloader.c (af_loader_load_glyph): Propagate error
code.
2018-11-02 10:10:10 +01:00
Alexei Podtelezhnikov
1e4496c54c
[truetype] Speed up variation IUP.
...
* src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
snapping to the same position from true interpolation.
2018-10-31 23:17:33 -04:00
Alexei Podtelezhnikov
ba03310b5a
* src/type1/t1load.c (t1_set_mm_blend): Optimized.
2018-10-31 22:01:36 -04:00
Alexei Podtelezhnikov
300da33d61
* src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
2018-10-31 21:55:40 -04:00
Werner Lemberg
c13635ee4b
[base] Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
2018-10-29 21:25:10 +01:00
Werner Lemberg
ba62f9d8f5
[cff] Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
* src/cff/cffparse.c (cff_parser_run)
[CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
2018-10-29 21:11:36 +01:00
Alexei Podtelezhnikov
3e8ec291ff
[sfnt] Make `head' timestamps unsigned.
...
It's been more than 2^31 seconds since 1904.
* include/freetype/tttables.h (TT_Header): Change field types.
* src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
2018-10-26 23:23:48 -04:00
Alexei Podtelezhnikov
d71f2bc159
Revert "Align FreeType with standard C memory management."
...
This reverts commit 877aa1b2cc
.
2018-10-26 22:52:25 -04:00
Werner Lemberg
bfe5329475
[psaux] Fix numeric overflow.
...
Triggered by
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
[CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
2018-10-27 00:07:53 +02:00
Werner Lemberg
f56830ed40
Avoid endless loop while tracing ( #54858 ).
...
* src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
FT_DEBUG_LEVEL_TRACE.
2018-10-20 07:27:47 +02:00
Werner Lemberg
0c4feb72cf
* CMakeLists.txt: Specify `RUNTIME DESTINATION'.
...
This is needed for DLL builds.
2018-10-17 11:25:32 +02:00
Werner Lemberg
912e174c66
A missing Unicode cmap is not a fatal error.
...
This is a follow-up to the previous commit.
* src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
(sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
src/type42/t42objs.c (T42_Face_Init): Implement it.
2018-10-07 09:28:52 +02:00
Werner Lemberg
885f5b0b4e
Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST ( #54794 ).
...
* src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
(t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
Check `unicodes_init' field.
2018-10-07 09:03:05 +02:00
Werner Lemberg
9817571cc9
[ftgrays] Fix typo in stand-alone mode ( #54771 ).
...
* src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
2018-10-03 08:04:55 +02:00
Werner Lemberg
d280ae1e8c
[psaux] Fix segfault.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
<cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
argument.
2018-10-02 20:45:16 +02:00
Werner Lemberg
6b660f1215
[psaux] Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
[CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
2018-10-02 16:48:59 +02:00
Werner Lemberg
83fc524dfc
[pshinter] Handle numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
* src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
overflow.
2018-10-02 16:36:49 +02:00
Alexei Podtelezhnikov
877aa1b2cc
Align FreeType with standard C memory management.
...
* include/freetype/ftsystem.h: Include FT_TYPES_H.
(*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
* src/raster/ftmisc.h: Ditto.
* builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
* builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
Use size_t for the size arguments.
* src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
FT_Offset, aka size_t, for the size arguments.
2018-09-27 21:17:36 -04:00
Werner Lemberg
efe7f64898
Typo.
2018-09-25 09:16:45 +02:00