|
c529885b
|
2017-01-12T08:42:55
|
|
* src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
|
|
563ae780
|
2017-01-04T20:16:34
|
|
Update copyright year.
|
|
24be60b5
|
2017-01-01T08:20:38
|
|
*/*: Use hex numbers for errors in tracing messages.
|
|
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.
|
|
57a6733d
|
2016-12-21T06:52:23
|
|
[base] Improve sanity check for Mac resources (#49888).
* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
positive.
|
|
b5573032
|
2016-12-20T23:22:06
|
|
ftobjs.c: Formatting.
|
|
d5fe8da7
|
2016-12-20T22:03:40
|
|
Spelling.
|
|
5743df77
|
2016-12-18T21:01:03
|
|
[base] Fix invalid mac font recursion.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
* src/base/ftobjs.c (FT_Open_Face): Code moved to...
(ft_open_face_internal): ... this function.
Add a parameter to control whether we try special Mac font handling
in case of failure.
(FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
open_face_from_buffer): Use `ft_open_face_internal'.
|
|
5d664b6d
|
2016-12-17T20:47:42
|
|
Use FT_SET_ERROR where useful. Other minor code formatting.
|
|
3b125e95
|
2016-12-17T10:02:19
|
|
Improve tracing of `FT_Open_Face'.
* src/base/ftobjs.c (FT_Open_Face): Return info on number of
available faces and numbered instances, or the indices of the
requested face and numbered instance.
* src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
|
|
a7dc0c35
|
2016-12-14T18:54:21
|
|
Extend functionality of `ft_module_get_service'.
It can now differentiate between local and global searches.
* src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
(FT_Get_TrueType_Engine_Type): Updated.
* src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
* include/freetype/internal/ftobjs.h: Updated.
* include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
Updated.
|
|
e1ee5476
|
2016-11-06T12:39:05
|
|
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
|
|
37e193e9
|
2016-11-06T12:32:51
|
|
Introduce a way of quickly retrieving (embedded) bitmap metrics.
`FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
until the user calls `FT_Render_Glyph'. However, it always
allocates memory for bitmaps and copies or decodes the contents of a
bitmap glyph, which can be quite slow for PNG data.
* include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
macro.
* src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
FT_LOAD_BITMAP_METRICS_ONLY is used.
* src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
tt_sbit_decoder_load_bitmap): Add argument to control allocation of
the glyph slot.
(tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
tt_face_load_sbit_image): Updated.
* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
`FT_LOAD_BITMAP_METRICS_ONLY' is set.
* src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
argument to control allocation of the glyph slot.
* src/pfr/pfrobjs (pfr_slot_load): Updated.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
* docs/CHANGES: Updated.
|
|
d609b7c1
|
2016-09-09T22:11:07
|
|
[sfnt] Don't provide (completely) broken strike data.
FreeType tries to sanitize strike header data; we now reject
completely broken ones.
* include/freetype/internal/tttypes.h (TT_FaceRec): New
`sbit_strike_map' array pointer.
* src/base/ftobjs.c (FT_Match_Size): Reject matches where either
width or height would be zero.
Add tracing message in case of error.
* src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
only using (more or less) valid strike header data for
FT_Face's `available_sizes' array.
(sfnt_done_face): Updated.
* src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
`sbit_strike_map'.
(tt_face_load_strike_metrics): Improve tracing.
* src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
|
|
b98dfda3
|
2016-09-03T08:20:31
|
|
[base] Avoid negative bitmap stroke dimensions (#48985).
* src/base/ftobjs.c (FT_Open_Face): Check whether negation was
actually successful. For example, this can fail for value
-32768 if the type is `signed short'. If there are problems,
disable the stroke.
|
|
605946af
|
2016-07-11T16:14:36
|
|
Conditionally compile environment support.
* include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
necessary.
|
|
c3beb30a
|
2016-07-10T07:11:45
|
|
Add function `ft_property_string_set'.
This is a preparation for handling an `FREETYPE_PROPERTIES'
environment variable to control (some) driver properties.
No change in functionality.
* src/base/ftobjs.c (ft_property_do): Add `value_is_string'
parameter.
(ft_property_string_set): New function.
(FT_Property_Set, FT_Property_Get): Updated.
* include/freetype/internal/ftobjs.h: Updated.
* include/freetype/internal/services/svprop.h
(FT_Properties_SetFunc): Add `value_is_string' parameter.
* src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
(cff_property_set), src/truetype/ttdriver.c (tt_property_set):
Updated, emitting an error currently if `value_is_string' is set.
|
|
5485a34c
|
2016-06-04T06:57:32
|
|
[truetype] Fix missed test for named instances (#48122).
* src/truetype/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
|
|
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.
|
|
bebac3cf
|
2016-05-16T20:16:35
|
|
[base] Reject invalid sfnt Mac resource (#47891).
* src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
of `CID ' and `TYPE1' table offset and length.
|
|
e8542260
|
2016-04-08T23:21:34
|
|
Typos.
|
|
0d053bac
|
2016-02-07T19:25:56
|
|
Fix runtime errors found by clang's sanitizer (#47082).
* src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
(FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
Properly handle empty input buffer.
|
|
1d8d0b4e
|
2016-01-28T14:11:14
|
|
Remove unpatented hinter (3/3).
* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
`ignore_unpatented_hinter' field.
Update users.
(FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
Update users.
* include/freetype/internal/tttypes.h (TT_FaceRec): Remove
`unpatented_hinting' field.
Update users.
* src/base/ftpatent.c (_tt_check_patents_in_range,
_tt_check_patents_in_table, _tt_face_check_patents): Remove.
(FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
Replace code with dummies.
* src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
* src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
field.
|
|
9adeab64
|
2016-01-13T11:54:10
|
|
Update copyright year.
|
|
4099281f
|
2015-12-14T07:51:25
|
|
[base] Fix calls to `FT_Stream_Seek'.
* src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
`error'.
|
|
f0cc1738
|
2015-12-14T07:00:41
|
|
[base] Check error when seeking to data supplied offset (#46635).
* src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
`ft_lookup_PS_in_sfnt_stream' returns offset and and length from
user supplied data. Use of this these values must be checked.
|
|
ccd3188a
|
2015-11-10T22:33:45
|
|
Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
Both the native CFF hinter and the auto-hinter now have a very
similar rendering style.
* include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
longer implies FT_LOAD_FORCE_AUTOHINT.
* include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
macro.
* include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
macro.
* src/cff/cffdrivr.c (cff_driver_class): Use it.
* src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
logic.
|
|
e03214e1
|
2015-10-15T16:58:13
|
|
[base] Compute MD5 checksums only if explicitly requested.
This improves profiling accuracy.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
|
|
2a20c92c
|
2015-10-14T15:23:15
|
|
[base] Use `FT_' namespace for MD5 functions (#42366).
* src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
Undefine HAVE_OPENSSL.
|
|
fb5268cf
|
2015-09-28T02:01:43
|
|
[base] Fix a leak by broken sfnt-PS or resource fork (#46028).
open_face_from_buffer() frees passed buffer if valid font
is not found. But if copying to the buffer is failed,
the allocated buffer should be freed within the caller.
* src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
the buffer `sfnt_ps' if an error caused before calling
open_face_from_buffer().
(Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
an error caused before calling open_face_from_buffer();
|
|
d57f2271
|
2015-09-26T08:44:26
|
|
* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
|
|
c409eb18
|
2015-09-24T12:39:38
|
|
[base, sfnt] Better checks for invalid cmaps (1/2).
* src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
glyph indices.
(FT_Get_First_Char): Updated.
* src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
codes greater than 0xFFFF.
(tt_cmap8_char_index): Avoid integer overflow in computation of
glyph index.
(tt_cmap8_char_next): Avoid integer overflows in computation of
both next character code and glyph index.
(tt_cmap10_char_index): Fix unsigned integer logic.
(tt_cmap10_char_next): Avoid integer overflow in computation of
next character code.
(tt_cmap12_next): Avoid integer overflows in computation of both
next character code and glyph index.
(tt_cmap12_char_map_binary): Ditto.
(tt_cmap12_char_next): Simplify.
(tt_cmap13_char_map_binary): Avoid integer overflow in computation
of next character code.
(tt_cmap13_char_next): Simplify.
|
|
e982f5b7
|
2015-09-21T23:07:22
|
|
[base] Check too long POST and sfnt resource (#45919).
* src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length
of the resource fork for Mac OS. The resource fork larger
than 16 MB can be written but could not be handled
correctly, at least in Carbon routine.
See https://support.microsoft.com/en-us/kb/130437
* src/base/ftobjs.c (Mac_Read_POST_Resource): No need `0x'
for `%p' formatter.
* src/base/ftbase.c (Mac_Read_POST_Resource): Check the
fragment and total size of the concatenated POST resource
before buffer allocation.
(Mac_Read_sfnt_Resource): Check the declared size of
sfnt resource before buffer allocation.
* src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT):
Check the total resource size before buffer allocation.
|
|
19b82cfb
|
2015-09-11T20:25:32
|
|
[base] Avoid crash while tracing `load_mac_face'.
Reported in Savannah bug #45919.
* src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
tracing.
|
|
78b01403
|
2015-08-25T07:23:01
|
|
[base] Improve kerning tracing and documentation.
* src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
scaled-down kerning values differ.
|
|
14d6b5d7
|
2015-08-13T15:22:17
|
|
[truetype] Introduce named instance access to GX fonts.
For functions querying a face, bits 16-30 of the face index can hold
the named instance index if we have a GX font. The indices start
with value 1; value 0 indicates font access without GX variation
data.
* include/freetype/freetype.h (FT_FaceRec): Update documentation.
* include/freetype/internal/sfnt.h: Ditto.
* src/sfnt/sfobjs.c (sfnt_init_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
do argument checks.
(sfnt_load_face): Updated.
* src/truetype/ttobjs.c (tt_face_init)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
the style name.
* src/base/ftobjs.c (open_face_from_buffer,
open_face_PS_from_sfnt_stream): Updated.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
* src/cff/cffload.c (cff_font_load): Updated.
* src/cff/cffobjs.c (cff_face_init): Make function exit early for
pure CFF fonts if `font_index < 0'.
Updated.
* src/cid/cidobjs.c (cid_face_init): Updated.
* src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
* src/pfr/pfrobjs.c (pfr_face_init): Updated.
* src/type1/t1objs.c (T1_Face_Init): Updated.
* src/type42/t42objs.c (T42_Face_Init): Updated.
* src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
Updated.
* docs/CHANGES: Updated.
|
|
eb22ef26
|
2015-08-04T06:50:04
|
|
Another left-shift bug (#45681).
* src/base/ftobjs.c (IsMacBinary): Only accept positive values for
`dlen'.
|
|
9de55e03
|
2015-04-10T23:45:11
|
|
[base] NULL.
|
|
eee7d8ba
|
2015-03-10T11:15:15
|
|
[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
* include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
Update all callers.
* docs/CHANGES: Updated.
|
|
82235d04
|
2015-02-16T19:35:16
|
|
Next round of minor compiler warning fixes.
* include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
type to `FT_Long'.
(CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
* include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
* src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Signedess fixes.
|
|
3cfa4d12
|
2015-02-16T17:59:06
|
|
Various minor signedness fixes.
* include/ftadvanc.h, include/internal/ftobjs.h,
src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
|
|
79a5ac60
|
2015-01-18T07:30:04
|
|
* src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
|
|
f57fc59e
|
2015-01-17T20:41:43
|
|
Run `src/tools/update-copyright'.
|
|
603292d7
|
2015-01-14T18:35:56
|
|
[base] Don't initialize unused `driver->glyph_loader'.
* src/base/ftobjs.c (Destroy_Driver): Don't call
`FT_GlyphLoader_Done'.
(FT_Add_Module): Don't call `FT_GlyphLoader_New'.
|
|
51634253
|
2015-01-14T18:30:59
|
|
[base] Don't allocate `library->raster_pool' anymore.
It's unused after the following commits:
[raster] Allocate render pool for mono rasterizer on the stack.
[raster] Remove 5-level gray AA mode from monochrome rasterizer.
The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
serve, which is, to adjust the pool size. But the pool is now
allocated on the stack on demand.
* src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
|
|
6dfdaf4d
|
2015-01-14T18:21:13
|
|
[base] Do not reorder library->renderers upon use.
Instead of keeping `library->renderers' in a MRU order, just leave
it as-is. The MRU machinery wasn't thread-safe.
With this patch, rasterizing glyphs from different faces from
different threads doesn't fail choosing rasterizer
(FT_Err_Cannot_Render_Glyph).
Easiest to see that crash was to add a `printf' (or otherwise let
thread yield in FT_Throw with debugging enabled).
* src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
(FT_Outline_Render): Don't call `FT_Set_Renderer'.
|
|
c9ca6ffc
|
2014-12-11T13:39:39
|
|
* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
Problem reported by Dennis Felsing <dennis@felsin9.de>.
|
|
0098d550
|
2014-12-07T11:03:57
|
|
Uppercase all hex digits for orthogonality.
|
|
3d167cbe
|
2014-11-27T05:19:41
|
|
* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
Introdruced in previous change. Reported by Alexei.
|
|
f34f1925
|
2014-11-26T21:59:21
|
|
* src/*: Add checks for parameters of API functions where missing.
`API functions' are functions tagged with `FT_EXPORT_DEF'.
Besides trivial fixes, the following changes are included, too.
* src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
error code if no service is available.
* src/base/ftinit.c (FT_Done_FreeType): Change return value for
invalid `library' parameter to `Invalid_Library_Handle'.
* src/base/ftobjs.c (FT_New_Size): Change return value for invalid
`asize' parameter to `Invalid_Argument'.
* src/base/ftoutln.c (FT_Outline_Copy): Change return value for
invalid `source' and `target' parameters to `Invalid_Outline'.
(FT_Outline_Done_Internal): Change return value for invalid
`outline' parameter to `Invalid_Outline'.
|
|
cd4a5a26
|
2014-11-27T00:20:48
|
|
* src/base/ftobj.c (Mac_Read_POST_Resource): Additional
overflow check in the summation of POST fragment lengths,
suggested by Mateusz Jurczyk <mjurczyk@google.com>.
|
|
1720e81e
|
2014-11-26T16:39:00
|
|
* src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
and fold too long tracing messages.
|
|
45331679
|
2014-11-26T16:02:17
|
|
* src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
variables to read the lengths in POST fragments. Suggested by
Mateusz Jurczyk <mjurczyk@google.com>.
|
|
35252ae9
|
2014-11-26T15:52:23
|
|
Fix Savannah bug #43539.
* src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
by a broken POST table in resource-fork.
|
|
240c94a1
|
2014-11-26T15:43:29
|
|
Fix Savannah bug #43538.
* src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
by a broken POST table in resource-fork.
|
|
5aff8530
|
2014-11-26T14:36:12
|
|
* src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
by a broken POST table in resource-fork. Return after freeing
the buffered POST table when it is found to be broken.
|
|
02b8e7e8
|
2014-11-25T11:31:51
|
|
*/*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
|
|
04edbbda
|
2014-11-25T10:21:13
|
|
*/*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
|
|
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.
|
|
6889f7b7
|
2014-11-24T17:16:08
|
|
Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
This is no longer used.
* src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
src/sfnt/ttcmap.c: Do it.
|
|
23c093fc
|
2014-11-21T08:41:39
|
|
Minor.
|
|
bbd8313b
|
2014-04-17T01:24:36
|
|
Make `FT_Get_SubGlyph_Info' actually work.
* src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
if there is no error.
|
|
7be2a94a
|
2014-02-08T13:55:38
|
|
Fix clang static analyzer and compiler warnings.
* src/autofit/afhints.c (af_glyph_hints_align_weak_points),
src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
(FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
(cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
(sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
code.
* src/autofit/afmodule.c (af_property_get_face_globals,
af_property_set, af_property_get), src/base/ftbitmap.c
(ft_gray_for_premultiplied_srgb_bgra): Make functions static.
* src/base/ftobjs.c (ft_remove_renderer): Protect against
library == NULL.
(ft_property_do): Make function static.
* src/base/ftrfork.c: Include `ftbase.h'.
* src/sfnt/ttsbit.c (tt_face_load_sbix_image)
[!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
(T1_Compute_Max_Advance): Avoid compiler warning.
* src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
variable.
|
|
aae0f1af
|
2014-01-19T18:27:18
|
|
Minor.
|
|
e2d2b154
|
2013-12-27T16:44:24
|
|
[ftrfork] Fix the face order difference between POSIX and Carbon.
The fragmented resources in Suitcase and .dfont should be reordered
when post resource for Type1 is being restored, but reordering of
sfnt resources induces the different face order. Now the ordering
is restricted to post resource only, to prevent the different order
issue (e.g. the face index in the fontconfig cache generated with
Carbon framework is incompatible with that by FreeType2 without
Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
`sort_by_res_id' to control the fragmented resource ordering.
* include/internal/ftrfork.h: Daclare new switch.
* src/base/ftobjs.c (IsMacResource): Enable the soring for post
resource, and disable the sorting for sfnt resource.
|
|
a44b784b
|
2013-12-02T09:52:38
|
|
Formatting.
|
|
28626869
|
2013-11-20T21:06:18
|
|
[truetype] Don't trust `maxp's `maxSizeOfInstructions'.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
for details.
* src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
tables also for setting `autohint'.
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
`TT_Process_Composite_Glyph' for handling unreliable values of
`maxSizeOfInstructions'.
|
|
604838d5
|
2013-10-22T01:10:10
|
|
* src/base/md5.c, src/base/md5.h: Updated to recent version.
* src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
|
|
d689d1cf
|
2013-08-29T17:53:40
|
|
Implement support for WOFF containers.
We simply synthesize a SFNT from the WOFF, create a memory stream
for the new data, and load the SFNT as usual.
Does NOT add any API to access WOFF metadata or private blocks.
* include/freetype/internal/tttypes.h (WOFF_HeaderRec,
WOFF_TableRec): New structures.
* include/freetype/tttags.h (TTAG_wOFF): New macro.
* src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
`open_face'.
* src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
`FT_GZIP_H'.
(WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
writing to a stream.
(sfnt_stream_close, compare_offsets, woff_open_font): New functions.
(sfnt_open_font): Handle `TTAG_wOFF'.
(sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
* src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
`sfnt->init_face'.
* src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
argument so that a changed stream survives.
Update callers.
|
|
bd3849e7
|
2013-08-27T21:43:38
|
|
FT_Open_Face: Improve external stream handling.
If the font's `clazz->init_face' function wants to swap to new
stream, handling of whether original stream was external could
result to either memory leak or double free. Mark externality into
face flags before calling `init_face' such that the clazz can handle
external streams properly.
* src/base/ftobjs.c (FT_Open_Face): Move code to set
FT_FACE_FLAG_EXTERNAL_STREAM to...
(open_face): This function.
|
|
25b7da53
|
2013-06-19T10:23:36
|
|
* Version 2.5.0 released.
=========================
Tag sources with `VER-2-5-0'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.0.
* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 16:2:10.
* src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
* src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
|
|
67cf7a88
|
2013-06-18T09:35:34
|
|
Fix Savannah bug #39266.
If memory allocations fail at certain points while opening a font,
FreeType can either crash due to a NULL dereference or leak memory.
* include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
FT_LibraryRec): Make `refcount' a signed integer. If, for example,
FT_Open_Face() fails in a memory allocation before the face's
reference count is set to 1, a subsequent `FT_Done_Library' call
would otherwise loop over `FT_Done_Face' 2^32 times before freeing
the face.
* src/base/ftobjs.c (open_face): Initialize `stream' and friends
earlier.
(FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
(FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
|
|
c06889eb
|
2013-06-12T10:58:06
|
|
More compiler warning fixes.
*/*: Use cast to `FT_Bool' (or `Bool') where appropriate.
|
|
a25ecfdd
|
2013-06-10T12:57:16
|
|
[sfnt] Improve embedded bitmap tracing.
* src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
bitmap strike match to...
(FT_Match_Size): This function.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
tt_sbit_decoder_load_image): Decorate with tracing messages.
|
|
3f6e0e0c
|
2013-06-07T18:10:40
|
|
Add and improve pragmas for MSVC compiler.
* include/freetype/internal/ftdebug.h: Remove pragmas.
* include/freetype/internal/ftserv.h: Use push and pop for pragmas.
* include/freetype/internal/ftvalid.h: Handle warning C4324.
* src/base/ftobjs.c: Use push and pop for pragmas.
* src/gzip/ftgzip.c: Handle warning C4244.
|
|
c378249e
|
2013-06-05T19:57:55
|
|
Fix more MSVC Win32 compiler warnings.
* src/base/ftobjs.c: Fix typo in MS pragma.
* src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
`lineno' is only used in debug mode.
* src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
debug mode.
|
|
45392b77
|
2013-06-05T13:43:20
|
|
Fix compiler warnings.
* include/freetype/internal/ftmemory.h: Decorate memory allocation
macros with `FT_Long' where appropriate.
Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
cast.
* src/base/ftobjs.c: Add warning disabling pragma for MSVC while
including `md5.c'.
* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
cast.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
(tt_sbit_decoder_load_bitmap): Beautification.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
variables (earlier).
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
where appropriate.
* src/type1/t1load.c (T1_Get_MM_Var): Ditto.
|
|
8d8508e4
|
2013-06-04T13:09:01
|
|
Missed some cppcheck items.
|
|
d51ac9c7
|
2013-05-12T06:00:27
|
|
Fix Savannah bug #38968.
* include/freetype/ftmodapi.h: Add `FT_EXPORT' to
FT_Property_{Set,Get}.
* src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
FT_Property_{Set,Get}.
|
|
f6aa089f
|
2013-05-10T07:58:47
|
|
*/* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
|
|
2dc26621
|
2013-04-12T20:11:38
|
|
Add output bitmap checksums.
Use `FT2_DEBUG=bitmap:3' for tracing.
* src/base/md5.c, src/base/md5.h: New files, taken from
http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
* include/freetype/internal/fttrace.h: Add `bitmap'.
* src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c'
(FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing,
convert resulting bitmap to a uniform format and compute a checksum.
Use `bitmap' category for the tracing message.
* src/base/rules.mk (BASE_H): Updated.
* docs/LICENSE.TXT: Updated.
|
|
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.
|
|
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.
|
|
6b83a367
|
2013-01-09T00:25:32
|
|
[base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability.
* src/base/ftbbox.c: Updated.
* src/base/ftobjs.c: Updated.
* src/base/fttrigon.c: Updated.
* src/pshinter/pshalgo.c: Updated.
* src/pshinter/pshrec.c: Updated.
|
|
768590a9
|
2012-12-20T06:08:23
|
|
* src/base/ftobjs.c (ft_property_do): Fix compiler warning.
|
|
073a4cef
|
2012-09-15T09:10:06
|
|
Use `FT_Module' instead of `FT_Library' argument in property funcs.
This internal change simplifies access to global module data.
* include/freetype/internal/services/svprop.h
(FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
* src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
(af_property_set, af_property_get): Updated.
|
|
0f8fd88e
|
2012-08-30T23:31:55
|
|
Implement properties to control FreeType modules.
* include/freetype/fterrdef.h (FT_Err_Missing_Property): New error
code.
* include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get):
New API.
* include/freetype/internal/services/svprop.h: New file.
* include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New
macro.
* src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H.
(ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
|
|
d0841ea7
|
2012-08-27T06:57:05
|
|
[autofit] Some macro and variable renamings for orthogonality.
* include/freetype/internal/autohint.h, src/base/ftobjs.c,
src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
|
|
b355b569
|
2012-08-26T14:00:11
|
|
Fix Savannah bug #37178.
* src/base/ftobjs.c (FT_Open_Face): Initialize `error' with
`FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
|
|
68fe6a9a
|
2012-08-26T13:56:56
|
|
Formatting.
|
|
f24d0793
|
2012-02-11T09:37:46
|
|
Clean up `generic' fields.
* include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
Remove `generic' field since users can't access it.
* src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
advertised in the documentation of FT_Generic.
(Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
|
|
c7c4d68b
|
2012-01-17T15:13:50
|
|
[raccess] Modify for PIC build.
Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
are renamed with `ft_' suffixes.
* src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
to `ft_raccess_rule_by_darwin_vfs()'.
* src/base/ftobjs.c: Ditto.
* src/base/ftrfork.c: Declarations of FT_RFork_Rule,
raccess_guess_rec, are moved to...
* include/freetype/internal/ftrfork.h: Here.
* include/freetype/internal/ftrfork.h:
FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
to replace raccess_guess_table[] in both of PIC and non-PIC
modes.
* src/base/ftrfork.c: raccess_guess_table[] array is rewritten
by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
* src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
the function pointer from `ft_raccess_guess_table' storage in
`BasePIC' structure.
* src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
FT_RACCESS_GUESS_TABLE_GET.
(raccess_get_rule_type_from_rule_index): Add `library' as the
first argument to the function, to retrieve the storage of
`ft_raccess_guess_table' from it. Also `raccess_guess_table'
is replaced by FT_RACCESS_GUESS_TABLE_GET.
(ft_raccess_rule_by_darwin_vfs): Ditto.
|
|
714ee56a
|
2011-12-02T21:14:18
|
|
[mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
was a configurable macro to disable Carbon-dependent code. Because
now configure script sets DARWIN_NO_CARBON by default and disables
Darwin & Carbon-dependent codes, these macros can be unified.
FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
(defined by default) is removed, because DARWIN_NO_CARBON violates
FT_XXX naming convention of public macros, and a macro configured by
default is not portable for the building without configure (e.g.
make devel).
* builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
old Mac font support is requested and Carbon is available.
* builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
requested.
* include/freetype/config/ftconfig.in: Ditto.
* builds/vms/ftconfig.h: Ditto.
* src/base/ftbase.h: Remove DARWIN_NO_CARBON.
* src/base/ftbase.c: Ditto.
* src/base/ftobjs.c: Ditto.
* src/base/ftrfork.c: Ditto.
* src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
(same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
* builds/mac/ftmac.c: Ditto.
* builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
* builds/mac/FreeType.m68k_far.make.txt: Ditto.
* builds/mac/FreeType.ppc_classic.make.txt: Ditto.
* builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
|
|
72185cb5
|
2011-10-15T09:33:11
|
|
Fix handling of transformations if no renderer is present.
* src/base/ftobjs.c (FT_Load_Glyph): Thinko.
|
|
298608d1
|
2011-10-15T09:09:59
|
|
Fix conditions for autohinting.
* src/base/ftobjs.c (FT_Load_Glyph): Handle
FT_LOAD_IGNORE_TRANSFORM.
|
|
57b6a614
|
2011-09-09T19:05:54
|
|
Better tracing of metrics.
* src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
FT_TRACE.
|
|
c9a69022
|
2011-08-30T08:09:38
|
|
Typo.
|
|
51ca771f
|
2011-08-30T07:42:19
|
|
Better tracing of metrics.
* src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
Decorate with FT_TRACE.
|
|
3abf617b
|
2011-07-20T06:48:08
|
|
Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
Useful for embedded systems which don't need file stream support.
* src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
it.
|