|
563ae780
|
2017-01-04T20:16:34
|
|
Update copyright year.
|
|
248eaa4f
|
2017-01-03T00:27:07
|
|
Various fixes for clang's undefined behaviour sanitizer.
* src/cff/cffload.c (FT_fdot14ToFixed): Fix casting.
(cff_blend_doBlend): Don't left-shift negative numbers.
Handle 5-byte numbers byte by byte to avoid alignment issues.
* src/cff/cffparse.c (cff_parse): Handle 5-byte numbers byte by byte
to avoid alignment issues.
* src/cid/cidload (cid_read_subrs): Do nothing if we don't have any
subrs.
* src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing.
* src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around
definition of `ft_get_adobe_glyph_index'.
* src/psnames/pstables.h: Regenerated.
* src/psnames/psmodule.c: Inlude `pstables.h' twice to get both
declaration and definition.
* src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix
casting.
|
|
f80c4473
|
2016-12-26T23:57:45
|
|
Replace `++foo' and `--foo' with `foo++' and `foo--', resp.
|
|
4441f7b2
|
2016-12-26T17:08:17
|
|
Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp.
Other minor formatting.
|
|
37c72f66
|
2016-12-25T22:55:25
|
|
Minor formatting.
|
|
5d664b6d
|
2016-12-17T20:47:42
|
|
Use FT_SET_ERROR where useful. Other minor code formatting.
|
|
9c54d124
|
2016-10-11T08:57:55
|
|
[psaux] Fix handling of invalid flex subrs.
Problem reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Set `flex_state' after error checking.
|
|
45cad2e5
|
2016-09-28T19:10:52
|
|
More FT_ZERO usage.
* src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
s/ft_memset/FT_MEM_ZERO/.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
s/ft_memset/FT_ARRAY_ZERO/.
* src/raster/ftraster.c (FT_ZERO): Define.
(ft_black_new): Use it.
* src/raster/ftrend1.c (ft_raster1_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
* src/smooth/ftgrays.c (FT_ZERO): Define.
(gray_raster_new): Use it.
* src/smooth/ftsmooth.c (ft_smooth_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
|
|
2ecf89b4
|
2016-09-28T19:06:21
|
|
*/*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
|
|
c95b7652
|
2016-09-17T17:12:50
|
|
s/0/NULL/ for function pointers; comments, formatting.
|
|
d583561e
|
2016-05-21T11:20:42
|
|
Minor clang++ fixes.
* src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
(ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
initializer.
* src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
conversion from NULL to boolean.
|
|
9adeab64
|
2016-01-13T11:54:10
|
|
Update copyright year.
|
|
37412ff9
|
2016-01-12T21:37:13
|
|
Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.
*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
|
|
bd4b8976
|
2015-12-20T19:36:04
|
|
[type1, psaux] Handle large values of num_subrs correctly (#46692).
We now use a hash to map from subr indices to array elements holding
the subroutines, if necessary.
* include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
(T1_FontRec): Add `subrs_hash' field.
* include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
(T1_DecoderRec): Add `subrs_hash' field.
* src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
* src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
(t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
* src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
(parse_subrs): Use hash for subr indices that exceed the allocated
number of subr slots.
(t1_init_loader): Remove unnecessary code.
(t1_done_loader, T1_Open_Face): Updated.
* src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
T1_Load_Glyph): Updated.
* src/type1/t1objs.c (T1_Face_Done): Updated.
* src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
(t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
necessary.
* src/cid/cidgload.c (cid_load_glyph): Updated.
|
|
24cee3a8
|
2015-10-19T23:00:28
|
|
[psaux] Fix tracing of negative numbers.
Due to incorrect casting negative numbers were shown as very large
(positive) integers on 64bit systems.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
Use division instead of shift.
|
|
8edfcbed
|
2015-10-17T08:11:16
|
|
[psaux] Fix heap buffer overflow (#46221).
* src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
Fix limit check.
|
|
4942c2bb
|
2015-09-17T17:56:53
|
|
[psaux] Fix memory leak (#45986).
* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
Free `temp' in case of error.
|
|
7d364b7e
|
2015-09-17T16:31:58
|
|
[psaux] Improve tracing message.
* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
Handle plural correctly.
|
|
db5a4a9a
|
2015-09-12T08:32:55
|
|
[psaux] Fix potential buffer overflow (#45922).
* src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
enclosed in balanced expressions, ensure that the cursor position
doesn't get larger than the current limit.
|
|
31d97df9
|
2015-06-21T19:12:12
|
|
Make Jam support work again.
This is just very basic stuff and just a little bit tested on
GNU/Linux only. I won't delve into this since I'm not a Jam user.
* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
(DEFINES): Replace with...
(CCFLAGS): ... this.
* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
already handled in the top-level Jamfile.
* src/autofit/Jamfile (DEFINES): Replace with...
(CCFLAGS): ... this.
(_sources): Add missing files.
* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
longer contains macro header definitions.
* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
src/truetype/Jamfile (_sources): Add missing files.
|
|
eabc8d72
|
2015-04-12T23:16:48
|
|
[psaux,psnames,type1,type42] NULL.
|
|
851e8151
|
2015-03-01T19:27:09
|
|
Various compiler warning fixes for `make multi'.
* src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
af_latin_hint_edges), src/autofit/aflatin2.c
(af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
as `static'.
* src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
Removed. Unused.
* src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
* src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
* src/cff/cf2intrp.c: Include `cf2intrp.h'.
* src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
* src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
* src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
* src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
Removed. Unused.
* src/raster/ftraster.c (Render_Glyph): Declare as `static'.
* src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
* src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
* src/truetype/ttsubpix.c (is_member_of_family_class,
is_member_of_style_class): Declare as `static'.
* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
as `static'.
* src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
`static'.
(T1_FIELD_COUNT): Removed. Unused.
* src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
* src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
|
|
04c22370
|
2015-02-25T11:20:20
|
|
[psaux] Signedness fixes.
* include/internal/psaux.h, src/psaux/afmparse.c,
src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
|
|
3b5f332c
|
2015-02-18T11:45:22
|
|
[type1] Fix signedness issues.
* include/internal/psaux.h, include/internal/t1types.h,
src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
|
|
272e3cd0
|
2015-02-18T11:38:46
|
|
[psaux, type1] Fix minor AFM issues.
* include/internal/t1types.h (AFM_KernPairRec): Make indices
unsigned.
Update users.
(AFM_FontInfoRec): Make element counters unsigned.
Update users.
* src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
int.
* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
Reject negative values for number of kerning elements.
* src/type1/t1afm.c, src/tools/test_afm.c: Updated.
|
|
6bd7d28f
|
2015-02-18T09:22:06
|
|
Don't use `FT_PtrDist' for lengths.
Use FT_UInt instead.
* include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
T1_DecoderRec): Do it.
* include/internal/t1types.h (T1_FontRec): Ditto.
* src/cid/cidload.c (cid_parse_dict): Updated.
* src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
* src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
* src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
parse_chharstrings, parse_dict): Ditto.
* src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
t42_parse_dict): Ditto.
|
|
f57fc59e
|
2015-01-17T20:41:43
|
|
Run `src/tools/update-copyright'.
|
|
36d03c9f
|
2015-01-12T11:26:30
|
|
Fix Savannah bug #43976.
Assure that FreeType's internal include directories are found before
`CPPFLAGS' (which might be set by the user in the environment), and
`CPPFLAGS' before `CFLAGS'.
* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
(FT_COMPILE): Make this a special variable for compiling only the
files handled in `freetype.mk'.
(.c.$O): Removed, unused.
* src/*/rules.mk (*_COMPILE): Fix order of include directories.
|
|
0098d550
|
2014-12-07T11:03:57
|
|
Uppercase all hex digits for orthogonality.
|
|
6689a009
|
2014-11-25T08:53:09
|
|
[Savannah bug #43682] Properly handle missing return errors.
The functions in this patch *do* return non-trivial errors that must
be taken care of.
* src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
(FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
(t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
(load_truetype_glyph <subglyph loop>, tt_loader_init,
TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
|
|
96341dc3
|
2014-11-24T09:53:07
|
|
[cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
Don't cast cmap init function pointers to an incompatible type.
Without this patch, the number of parameters between declaration and
the real signature differs. Calling such a function results in
undefined behavior.
ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
6.5.2.2 Function calls
9 If the function is defined with a type that is not
compatible with the type (of the expression) pointed to by
the expression that denotes the called function, the
behavior is undefined.
On certain platforms (c -> js with emscripten) this causes
termination of execution or invalid calls because in the emscripten
implementation, function pointers of different types are stored in
different pointer arrays. Incorrect pointer type here results in
indexing of an incorrect array.
* src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
signature.
|
|
bc12d9e9
|
2014-09-08T21:27:43
|
|
Fix Savannah bug #43153.
* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
overflow in `divider'.
|
|
8b281f83
|
2014-01-23T08:14:53
|
|
Fix Savannah bug #41309.
* src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
of `T1_ToFixedArray'.
* src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
`t1_parse_font_matrix'.
* src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
`t1_parse_font_matrix'.
(t42_parse_encoding): Synchronize with `t1_parse_encoding'.
* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
<T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
|
|
badf3178
|
2013-06-06T09:16:38
|
|
Next round of compiler fixes.
* builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
Add proper cast.
* include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
cast.
* include/freetype/internal/ftstream.h: Decorate stream and frame
macros with `FT_Long' and `FT_ULong' as appropriate.
* src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
raccess_guess_darwin_newvfs): Use cast.
* src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
* src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
* src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
* src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
* src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
* src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
* src/cid/cidparse.c (cid_parser_new): Use cast.
* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
* src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
* src/raster/ftraster.c (ft_black_reset): Use cast.
* src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
(ALL_POINTS): Fix cast.
* src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
* src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
|
|
dc624ca4
|
2013-06-04T10:30:48
|
|
Apply fixes for cppcheck nitpicks.
http://cppcheck.sourceforge.net/
Note that the current version heavily chokes on FreeType, delivering
even wrong results. I will report those issues to the cppcheck team
so that a newer version gives improved results hopefully.
*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.
* src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable):
Remove unused variable.
* src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
Remove functionless code.
* src/tools/ftrandom.c (main): Fix memory leak.
|
|
e6e83627
|
2013-05-04T18:57:56
|
|
Fix clang fixes.
* src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use
correct types.
* src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force
unsigned for computations.
* src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto.
* src/cff/cffparse.c (cff_parse_integer): Ditto.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
|
|
94152819
|
2013-05-04T16:40:12
|
|
More fixes for clang's `sanitize' feature.
* src/base/ftcalc.c (FT_DivFix): Use unsigned values for
computations which use the left shift operator and convert to signed
as the last step.
* src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate,
FT_Vector_Length, FT_Vector_Polarize): Ditto.
* src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify.
* src/cff/cffload.c (cff_subfont_load): Fix constant.
* src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed,
cff_parse_fixed_dynamic): Use unsigned values for computations which
use the left shift operator and convert to signed as the last step.
* src/cid/cidload.c (cid_get_offset): Ditto.
* src/psaux/psconv.c (PS_Conv_ToFixed): Ditto.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
* src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto.
|
|
89f50647
|
2013-03-14T17:50:49
|
|
*/*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
FT_Err_XXX and friends are no longer directly used in the source
code.
|
|
e3c93015
|
2013-03-14T11:21:17
|
|
*/*: Use FT_Err_Ok only.
This is a purely mechanical conversion.
|
|
059bc335
|
2013-03-14T10:27:35
|
|
*/*: Use `FT_THROW'.
This is essentially a mechanical conversion, adding inclusion of
`FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
stand-alone compiling modes of the rasterizer modules.
To convert the remaining occurrences of FT_Err_XXX and friends it is
necessary to rewrite the code. Note, however, that it doesn't harm
if some cases are not handled since FT_THROW is a no-op.
|
|
2ef0a198
|
2012-12-23T21:14:37
|
|
[type1] Fix handling of /FontBBox in MM fonts.
Problem reported by Del Merritt <del@alum.mit.edu>
If we have
/FontBBox { { 11 12 13 14 15 16 17 18 }
{ 21 22 23 24 25 26 27 28 }
{ 31 32 33 34 35 36 37 38 }
{ 41 42 43 44 45 46 47 48 } }
in the /Blend dictionary, then the first BBox is { 11 21 31 41 },
the second { 12 22 32 42 }, etc.
* include/freetype/internal/psaux.h (T1_FieldType): Add
`T1_FIELD_TYPE_MM_BBOX' (for temporary use).
* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
Implement it.
|
|
8e82a961
|
2012-10-21T11:02:50
|
|
[psaux] Improve parsing of invalid numbers.
* src/psaux/psconv.c (PS_Conv_Strtol): Always parse complete number,
even in case of overflow.
(PS_Conv_ToInt): Only increase cursor if parsing was successful.
(PS_Conv_ToFixed): Ditto.
Trace underflow and data error.
|
|
eaf0afb4
|
2012-10-20T11:27:25
|
|
[psaux] Fix some value overflows and improve tracing.
* src/psaux/psconv.c: Include FT_INTERNAL_DEBUG_H.
(FT_COMPONENT): Define.
(PS_Conv_Strtol): Return FT_Long.
Handle bad data and overflow.
Emit some tracing messages in case of error.
(PS_Conv_ToInt): Return FT_Long.
(PS_Conv_ToFixed): Updated.
* src/psaux/psconv.h: Updated.
* include/freetype/internal/fttrace.h: Add `psconv'.
|
|
0708b23e
|
2012-10-17T21:38:19
|
|
[psaux] Fix some value overflows.
* src/psaux/psconv.c (PS_Conv_ToFixed): Implement it.
|
|
6b440425
|
2012-07-18T10:39:18
|
|
Fix Savannah bug #36833.
* src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
operator if we want metrics only.
|
|
26dfeb6d
|
2012-03-08T06:04:03
|
|
Prepare source code for amalgamation.
* src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c,
src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h,
src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c,
src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h,
src\psaux\psauxerr.h, src\pshinter\pshnterr.h,
src\psnames\psnamerr.h, src\raster\rasterrs.h, src\sfnt\sferrors.h,
src\smooth\ftsmerrs.h, src\truetype\tterrors.h,
src\type1\t1errors.h, src\type42\t42error.h, src\winfonts\fnterrs.h:
Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
|
|
ceed93e3
|
2012-03-03T07:03:08
|
|
[psaux] Fix handling of track kerning.
* src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
for `min_kern'. It is indeed quite common that track kerning
*increases* spacing for very small sizes.
|
|
292144b4
|
2012-03-01T14:54:47
|
|
[psaux] Fix Savannah bug #35657.
If in function `skip_spaces' the routine `skip_comment' comes to the
end of buffer, `cur' is still increased by one, so we need to check
for `p >= limit' and not `p == limit'.
* src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
|
|
22fff253
|
2012-02-26T08:47:20
|
|
Whitespace.
|
|
58cbc465
|
2012-02-26T05:26:56
|
|
[type1] Fix Savannah bug #35606.
* src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
* src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
only if cur < limit.
|
|
6b5b6f39
|
2012-02-24T12:26:25
|
|
Prepare source code for amalgamation (6/6).
* src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
* src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
s/t1_init_loader/cid_init_loader/.
s/t1_done_loader/cid_done_loader/.
* src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
* src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
* src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
|
|
1749d8bc
|
2012-01-17T02:00:24
|
|
Remove trailing spaces.
|
|
c52f44d4
|
2011-11-30T10:46:53
|
|
Whitespace.
|
|
9c98fbf6
|
2011-10-01T09:25:55
|
|
Handle some border cases.
* include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
* src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
value of `target->rows'.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
flex start.
* src/raster/ftrend1.c (ft_raster1_render): Check `width' and
`height'.
* src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
invalid values in `localpoints' array.
|
|
b03c4a0a
|
2011-07-22T05:24:11
|
|
[psaux, type1] Fix null pointer dereferences.
Found with font fuzzying.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
`decoder->buildchar'.
* src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
|
|
143799d4
|
2011-07-14T07:35:51
|
|
[psaux] Fix potential sign extension problems.
When shifting right a signed value, it is not defined by the
C standard whether one gets a sign extension or not. Use a macro to
do an explicit cast from a signed short (assuming that this is
16bit) to an int.
* src/psaux/t1decode.c (Fix2Int): New macro.
Use it where appropriate.
|
|
60f83713
|
2011-07-14T07:34:12
|
|
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Better handling of subroutine index 0.
From Matthias Drochner <M.Drochner@fz-juelich.de>.
|
|
403559b8
|
2011-07-14T07:21:11
|
|
Sort case in switch statement numerically.
|
|
dc33b4a1
|
2011-07-10T07:08:51
|
|
[psaux] Optimize previous commit.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Move error check down to avoid testing twice for
good cases.
|
|
c46b1e24
|
2011-07-08T13:46:42
|
|
[psaux] Add better argument check for `callothersubr'.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Reject negative arguments.
|
|
9b008750
|
2011-04-13T13:37:37
|
|
Fix Savannah bug #33047.
Patch submitted by anonymous reporter.
* src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
difference.
|
|
ed7d1a59
|
2010-11-23T19:30:38
|
|
* src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
start_point, check_points, add_point, add_point1, close_contour
macros.
Remove add_contour macro.
Return error code from t1_builder_start_point and
t1_builder_check_points when there was one (instead of returning 0).
|
|
c8f5b98b
|
2010-07-12T21:13:22
|
|
Remove C++ warnings.
*/*: Initialize pointers where necessary to make g++ happy.
|
|
90b07bd5
|
2010-06-20T16:27:36
|
|
Fix Savannah bug #30145.
* src/psaux/psobjs.c (t1_builder_add_contour): Protect against
`outline == NULL' which might happen in invalid fonts.
|
|
370aea80
|
2010-06-08T08:37:11
|
|
Formatting.
|
|
30b8480b
|
2010-05-11T00:06:02
|
|
Whitespace.
|
|
88169b10
|
2010-05-11T00:03:33
|
|
Fix Savannah bug #29846.
Previously we discovered fonts which used `setcurrentpoint' to set
the initial point of a contour to 0,0. This caused FreeType to
raise an error, because the `setcurrentpoint' operator is only
supposed to be used with the results from an OtherSubr subroutine.
This was fixed by simply ignoring the error and carrying on.
Now we have found a font which uses setcurrentpoint to actually
establish a non-zero point for a contour during the course of a
glyph program. FWIW, these files may be produced by an application
called `Intaglio' on the Mac, when converting TrueType fonts to
Type 1.
The fix allows the new invalid behaviour, the old invalid behaviour
and real proper usage of the operator to work the same way as Adobe
interpreters apparently do.
(t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
two elements of the stack to establish unconditionally the current x
and y coordinates.
Make the `flex' subroutine handling (OtherSubr 0) put the current
x,y coordinates onto the stack, instead of two dummy uninitialised
values.
|
|
54e63755
|
2010-04-14T23:38:35
|
|
Fix Savannah bug #29444.
* src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
`lineto' immediately after `hsbw', in accordance with Acrobat, GS,
and others.
|
|
8ea31415
|
2010-01-08T18:13:02
|
|
Fix Savannah bug #28521.
Issue #28226 involved a work-around for a font which used the
`setcurrentpoint' operator in an invalid way; this operator is only
supposed to be used with the result of OtherSubrs, and the font used
it directly. The supplied patch removed the block of code which
checked this usage entirely.
This turns out to be a Bad Thing. If `setcurrentpoint' is being
used correctly it should reset the flex flag in the decoder. If we
don't do this then the flag never gets reset and we omit any further
contours from the glyph (at least until we close the path or
similar).
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_setcurrentpoint>: Handle `flex_state' correctly.
|
|
fe6da50d
|
2010-01-05T10:10:15
|
|
Thinkos.
|
|
dbe56223
|
2010-01-05T09:43:01
|
|
Make Type 1 `seac' operator work with incremental interface.
* src/psaux/t1decode.c (t1operator_seac): Don't check `glyph_names'
if incremental interface is used.
|
|
ce412593
|
2009-12-14T22:32:32
|
|
Ignore invalid `setcurrentpoint' operations in Type 1 fonts.
This fixes Savannah bug #28226.
At least two wild PostScript files of unknown provenance contain
Type 1 fonts, apparently converted from TrueType fonts in earlier
PDF versions of the files, which use the `setcurrentpoint' operator
inappropriately.
FreeType currently throws an error in this case, but Ghostscript and
Adobe Distiller both accept the fonts and ignore the problem. This
commit #ifdefs out the check so PostScript interpreters using
FreeType can render these files.
The specification says `setcurrentpoint' should only be used to set
the point after a `Subr' call, but these fonts use it to set the
initial point to (0,0). Unnecessarily so, as they correctly use an
`hsbw' operation which implicitly sets the initial point.
|
|
f2647dda
|
2009-09-26T00:48:37
|
|
[cache, psaux, type1] Fix for multi build.
|
|
0729bc9f
|
2009-09-10T16:09:55
|
|
[Win64] Improve the computation of random seed from stack address.
|
|
03e8b2f7
|
2009-09-01T08:10:24
|
|
Fix custom cmap for empty Type 1 font (Savannah bug #27294).
* include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
comment to reflect revised code_last meaning.
* src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
(T42_Open_Face): Assign max_char as highest character code + 1 and
use this for T1_EncodingRecRec_::code_last.
* src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
T1_EncodingRecRec_::code_last meaning.
|
|
e6d0c1fb
|
2009-08-01T00:37:58
|
|
psaux: Fix a few casts to FT_Int32 value.
|
|
259568cf
|
2009-08-01T00:32:13
|
|
psaux: Handle the string length by FT_Offset variables.
|
|
3f0f2e46
|
2009-08-01T00:32:09
|
|
XXX_cmap_encoding_char_next() return FT_UInt32 values.
|
|
d3ed6d1b
|
2009-08-01T00:30:24
|
|
psaux: Prevent invalid arguments to afm_parser_read_vals().
|
|
d200982d
|
2009-08-01T00:30:17
|
|
psaux: Use size_t variable to pass the buffer size.
|
|
d1ee3785
|
2009-08-01T00:30:16
|
|
type1: Use size_t variable to pass the string length.
|
|
24370d67
|
2009-06-28T02:11:51
|
|
Uff, another thinko.
|
|
e7389a44
|
2009-06-28T01:25:55
|
|
[psaux, cff] Protect against nested `seac' calls.
* include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h
(CFF_Decoder): Add `seac' boolean variable.
* src/cff/cffgload.c (cff_operator_seac,
cff_decoder_parse_charstrings), src/psaux/t1decode.c
(t1operator_seac, t1_decoder_parse_charstrings): Use it.
|
|
6bb34880
|
2009-06-28T00:43:37
|
|
Thinko.
* src/psaux/t1decode.c (t1operator_seac)
[FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental
interface.
|
|
858abbed
|
2009-06-26T06:15:41
|
|
For warning messages, replace FT_ERROR with FT_TRACE0.
FT_ERROR is now used only if a function produces a non-zero `error'
value.
Formatting, improving and harmonizing debug strings.
|
|
e15d9c52
|
2009-06-25T21:31:53
|
|
Formatting etc.
|
|
1e8bf583
|
2009-06-23T15:48:52
|
|
Thinko.
|
|
11cb8c36
|
2009-06-22T16:56:47
|
|
Use 16.16 format while parsing Type 1 charstrings.
This fixes Savannah bug #26867.
Previously, only integers have been used which can lead to serious
rounding errors.
However, fractional values are only used internally; after the
charstrings (of either Type 1 or 2) have been processed, the
resulting coordinates get rounded to integers currently -- before
applying scaling. This should be fixed; at the same time a new load
flag should be introduced, to be used in combination with
FT_LOAD_NO_SCALE, which indicates that font units are returned in
16.16 format. Similarly, the incremental interface should be
extended to allow fractional values for metrics.
* include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift'
field.
* include/freetype/internal/pshints.h (T1_Hints_SetStemFunc,
T1_Hints_SetStem3Func): Use FT_Fixed for coordinates.
* src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H.
(t1_build_add_point): Always convert fixed to integer.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
Use 16.16 format everywhere (except for large integers followed by a
`div').
[CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
code uncoditionally.
Add support for random numbers and update remaining code
accordingly; this should work now.
(t1_operator_seac): Updated.
* src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
(ps_hints_t1stem3, t1_hints_stem): Updated.
* src/cid/cidgload.c: Include FT_INTERNAL_CALC_H.
(cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL],
(cid_face_compute_max_advance, cid_slot_load_glyph): Updated.
* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
[FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph):
Updated.
* src/type1/t1load.c: Include FT_INTERNAL_CALC_H.
* src/type1/t1objs.c (T1_Face_Init): Updated.
|
|
1f540eff
|
2009-06-20T13:24:08
|
|
Remove unused variables.
* include/freetype/internal/psaux.h (T1_BuilderRec),
src/cff/cffgload.h (CFF_Builder): Remove `last'.
Update all users.
|
|
41821f8a
|
2009-06-20T09:31:19
|
|
[psaux] Check large integers while parsing charstrings.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large
integers must be followed by a `div' operator.
|
|
86fa2ebc
|
2009-06-19T14:56:26
|
|
Improve debug messages for Type1 charstrings.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
after instructions.
Prettify output.
|
|
04a7858c
|
2009-04-30T20:32:31
|
|
Make `seac' operator work correctly with incremental interface.
SEAC (Single Encoding Accented Characters) are composed of (basically) two
indices specifying two other glyphs, and a movement to position the accent
properly with respect to the main glyph.
To make it work with the incremental interface we now demand that the caller
handles the encoding by itself.
|
|
1dcd0f23
|
2009-04-05T18:25:14
|
|
Add #error to modules and files that do not support PIC yet.
When FT_CONFIG_OPTION_PIC is defined the following files will
create #error:
* src/bdf/bdfdrivr.h
* src/cache/ftcmanag.c
* src/cid/cidriver.h
* src/gxvalid/gxvmod.h
* src/gzip/ftgzip.c
* src/lzw/ftlzw.c
* src/otvalid/otvmod.h
* src/pcf/pcfdrivr.h
* src/pfr/pfrdrivr.h
* src/psaux/psauxmod.h
* src/type1/t1driver.h
* src/type42/t42drivr.h
* src/winfonts/winfnt.h
|
|
86e041b5
|
2009-03-21T08:51:44
|
|
Remove redundant header inclusions.
This covers many Ghostscript Coverity issues.
* src/*: Do it.
|
|
e85baf4f
|
2009-01-12T20:01:10
|
|
Fix stdlib dependencies.
Problem reported by Mickey Gabel <mickey@monfort.co.il>.
* include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused.
* src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
s/memcpy/ft_memcpy/.
* src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
|
|
9d83d290
|
2009-01-09T07:58:08
|
|
Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2.
* src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle
`count_offset' if it is zero (i.e., unused). Otherwise, the first
element of the structure which holds the data is erroneously
modified. Problem reported by Chi Nguyen <chint@necsv.com>.
|
|
ce33a312
|
2008-12-21T10:29:30
|
|
FT_USE_MODULE declares things as:
extern const FT_Module_Class
(or similar for C++). However, the actual types of the variables
being declared are often different, e.g., FT_Driver_ClassRec or
FT_Renderer_Class. (Some are, indeed, FT_Module_Class.)
This works with most C compilers (since those structs begin with an
FT_Module_Class struct), but technically it's undefined behavior.
To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
paragraph 2:
All declarations that refer to the same object or function shall
have compatible type; otherwise, the behavior is undefined.
(And they are not compatible types.)
Most C compilers don't reject (or even detect!) code which has this
issue, but the GCC LTO development branch compiler does. (It
outputs the types of the objects while generating .o files, along
with a bunch of other information, then compares them when doing the
final link-time code generation pass.)
Patch from Savannah bug #25133.
* src/base/ftinit.c (FT_USE_MODULE): Include variable type.
* builds/amiga/include/freetype/config/ftmodule.h,
include/freetype/config/ftmodule.h, */module.mk: Updated to declare
pass correct types to FT_USE_MODULE.
|
|
52cd0fc8
|
2008-11-24T08:15:05
|
|
Fixes from the gnuwin32 port.
* src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
* src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
* src/psaux/psobjs.c (ps_table_add): Check `length'.
|
|
e0ed07d7
|
2008-11-04T10:37:30
|
|
* src/type1/t1load.c (parse_subrs): Use an endless loop. There are
fonts (like HELVI.PFB version 003.001, used on OS/2) which define
some `subrs' elements more than once. Problem reported by Peter
Weilbacher <mozilla@weilbacher.org>.
|
|
a4cb0d95
|
2008-08-23T19:54:06
|
|
* src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
(afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug
#24119.
|