Commit Graph

3109 Commits

Author SHA1 Message Date
Werner Lemberg e22dd0b80f * Version 2.3.8 released.
=========================


Tag sources with `VER-2-3-8'.

* docs/VERSION.DLL: Update documentation and bump version number to
2.3.8.

* README, Jamfile (RefDoc), builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualce/index.html,
builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.

* builds/unix/configure.raw (version_info): Set to 9:19:3.

* docs/release: Updated.
2009-01-14 06:52:18 +00:00
Werner Lemberg fb4ddb2791 builds/toplevel.mk (dist): Compress better. 2009-01-14 05:30:56 +00:00
Werner Lemberg 9bf73ec407 Fix C++ compilation.
* src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation
with C++.
2009-01-13 17:42:00 +00:00
Werner Lemberg 24d72a1b0b Don't use stdlib.h and friends directly.
Reported by Mickey Gabel <mickey@monfort.co.il>.

* src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.

* src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.

* src/autofit/aftypes.h, src/autofit/afhints.c,
src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/

* src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
2009-01-13 17:34:48 +00:00
Werner Lemberg f47acf2b5f Avoid compiler warnings.
* */*: s/do ; while ( 0 )/do { } while ( 0 )/.
Reported by Sean McBride <sean@rogue-research.com>.
2009-01-12 20:11:14 +00:00
Werner Lemberg e85baf4f8e 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/.
2009-01-12 20:01:10 +00:00
Werner Lemberg 214ca056f5 * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve documentation. 2009-01-11 11:45:54 +00:00
Werner Lemberg fc6d12a1f7 * docs/formats.txt: Add link to PCF specification. 2009-01-11 10:55:45 +00:00
Suzuki, Toshiya (鈴木俊哉) 759c07d149 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_Int32 to match the flags of FT_Load_Glyph() 2009-01-09 11:11:53 +00:00
Suzuki, Toshiya (鈴木俊哉) 68e16e0105 * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong length check, Savannah patch #6682. 2009-01-09 08:01:15 +00:00
Werner Lemberg 9d83d29028 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>.
2009-01-09 07:58:08 +00:00
Suzuki, Toshiya (鈴木俊哉) a7c00b79e0 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_UInt32 for 16-bit platforms 2009-01-09 07:21:16 +00:00
Werner Lemberg 9b1da084c2 tab -> space 2009-01-09 06:21:04 +00:00
Suzuki, Toshiya (鈴木俊哉) 2dc1079494 * src/base/ftobjs.c (FT_Done_Library): Issue an error when FT_Done_Face() is failed and retried 2009-01-09 05:07:15 +00:00
Werner Lemberg a79de11b22 * docs/CHANGES: Document new key `a' in ftdiff. 2009-01-07 08:27:37 +00:00
Werner Lemberg c32637222f Don't rely on GNU sed.
* autogen.sh: Don't use GNUisms while calling sed.  Problem reported
by Sean McBride.
2009-01-06 21:00:47 +00:00
Werner Lemberg 5758688e87 Typo. 2009-01-06 09:40:22 +00:00
Werner Lemberg a86f1b96b5 FT_Bitmap_Convert: Support missing pixel modes.
* src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
and FT_PIXEL_MODE_LCD_V.  Problem reported by Chi Nguyen
<chint@necsv.com>.
2009-01-06 09:07:22 +00:00
Werner Lemberg c679115f0d Fix AC_CANONICAL_XXX issue.
* builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
AC_CANONICAL_TARGET and use $host_os only.  A nice explanation for
this change can be found at
http://blog.flameeyes.eu/s/canonical-target.

From Savannah patch #6712.
2009-01-06 07:07:39 +00:00
Werner Lemberg f2e33c1111 Minor fixes.
* src/base/ftdbgmem.c (_debug_mem_dummy): Make it static.

* src/base/ftmac.c: Remove some #undefs.
2009-01-06 06:59:36 +00:00
Werner Lemberg 1ad384d881 Set `face_index' field in FT_Face for all font formats.
* cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
sfnt/sfobjs.c (sfnt_init_face): Do it.

* docs/CHANGES: Document it.
2008-12-25 23:52:00 +00:00
Werner Lemberg 66043b1c4f * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
Patch from Savannah bug #25151.
2008-12-22 18:09:48 +00:00
Werner Lemberg 3c5ad95166 * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
s/_Err_Bad_Argument/_Err_Invalid_Argument/.  The former is for
errors in the bytecode interpreter only.
2008-12-21 17:51:12 +00:00
Werner Lemberg 478cca14a5 * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
arguments.
Fix return value for non-PFR fonts.  Both problems reported by Chi
Nguyen <chint@necsv.com>.
2008-12-21 17:38:23 +00:00
Werner Lemberg ce33a312da 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.
2008-12-21 10:29:30 +00:00
Werner Lemberg b6fa845146 * src/autofit/aflatin.c (af_latin_hint_edges),
src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
(af_cjk_hint_edges): Protect against division by zero.
2008-12-21 09:46:31 +00:00
Werner Lemberg 05bf6877a4 * docs/CHANGES: Updated.
Provide API for accessing embedding and subsetting restriction
information.

* include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
macros.
(FT_Get_FSType_Flags): New function declaration.

* src/base/ftobjs.c (FT_Get_FSType_Flags): New function.

* src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
(t42_keywords): Handle `FSType'.

* include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
2008-12-18 06:32:10 +00:00
Werner Lemberg cfc514ea7e * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal
macros so that copying the source code into an application works
out of the box.
2008-12-17 11:03:26 +00:00
Werner Lemberg c8c4cc837c * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move
FT_GlyphSlot_Own_Bitmap to...
* include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files.

* docs/CHANGES: Document it.
2008-12-17 10:50:31 +00:00
Werner Lemberg 00bcd34ae6 Improve documentation of FT_Outline_Embolden. 2008-12-17 10:15:43 +00:00
Werner Lemberg 5914cb621a Minor doc fixes. 2008-12-16 13:12:18 +00:00
Werner Lemberg b972a2a294 Generalize the concept of `tricky' fonts by introducing
FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
engine is necessary for correct rendering.

At the same time, slightly modify the behaviour of tricky fonts:
FT_LOAD_NO_HINTING is now ignored.  To really force raw loading
of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
FT_LOAD_NO_AUTOHINT must be used.

Finally, tricky TrueType fonts always use the bytecode interpreter
even if the patented code is used.

* include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
New macros.

* src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
semantics as described above.

* src/truetype/ttobjs.c (tt_check_trickyness): New function, using
code of ...
(tt_face_init): This function, now simplified and updated to new
semantics.

* src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
fonts.

* docs/CHANGES: Document it.
2008-12-11 08:55:48 +00:00
Werner Lemberg 1474f439b5 Really fix Savannah bug #25010: An SFNT font with neither outlines
nor bitmaps can be considered as containing space `glyphs' only.

* src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
a `glyf' table is missing.

* src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
`glyf' table but a non-zero `loca' entry.
(tt_loader_init): Handle missing `glyf' table.

* src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.

* src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
nor bitmaps is scalable.
2008-12-09 06:51:56 +00:00
Werner Lemberg e3b083c65b * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
fixes Savannah bug #21190 which also provides a basic patch.
2008-12-05 22:50:40 +00:00
Werner Lemberg 76fffcd898 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
0x100 instead of 0x10000; the latter value is already occupied by
FT_LOAD_TARGET_LIGHT.  Bug reported by James Cloos.


Handle SFNT with neither outlines nor bitmaps.  This fixes Savannah
bug #25010.

* src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
outlines nor bitmaps.

* src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
is no table with glyphs.


* src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
message.


Other minor cosmetics.
2008-12-05 18:37:44 +00:00
Werner Lemberg afe6016030 GDEF tables need `glyph_count' too for validation. Problem reported
by Chi Nguyen <chint@necsv.com>.

* src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h
(otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass
`glyph_count'.
2008-12-01 12:53:00 +00:00
Werner Lemberg 1a5d561dce * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
(Atari PureC).
2008-11-29 22:50:24 +00:00
Werner Lemberg 8f9b7f50a5 * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix
it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values
in the /BlendDesignMap space).
2008-11-29 17:35:58 +00:00
Werner Lemberg b2cb6ce6c4 * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*,
whereas `design_points' is FT_Long*.  Therefore, return blend rather
than design points.
2008-11-29 09:32:12 +00:00
Werner Lemberg 02197280b4 Formatting. 2008-11-29 09:31:44 +00:00
Werner Lemberg c7597edb6a * src/cff/cffparse.c (cff_parse_real): Handle more than nine
significant digits correctly.  This fixes Savannah bug #24953.
2008-11-27 21:55:20 +00:00
Werner Lemberg 0a263a8b31 * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
before the NULL check.  From Savannah patch #6681.
2008-11-25 05:44:41 +00:00
Werner Lemberg 52cd0fc8b9 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'.
2008-11-24 08:15:05 +00:00
Werner Lemberg 105721a5a6 * src/truetype/ttinterp.c (tt_default_graphics_state): The default
value for `scan_type' is zero, as confirmed by Greg Hitchcock from
Microsoft.  Problem reported by Michal Nowakowski
<miszka@limes.com.pl>.
2008-11-15 10:35:51 +00:00
Werner Lemberg 312043f41b * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
This fixes Savannah bug #24819.

Document `format' field of TT_CMapInfo.
2008-11-12 06:29:41 +00:00
Werner Lemberg e7aad0254c * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
since OpenType version 1.5 has been released.

* include/ttnameid.h (TT_NAME_ID_WWS_FAMILY,
TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5.
(TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE,
TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN,
TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE,
TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI,
TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC,
TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA,
TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING,
TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE,
TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI,
TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS,
TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New
macros for OpenType 1.5.
2008-11-08 22:00:55 +00:00
Werner Lemberg b6192827a3 * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against
slot->internal == NULL.  Reported by Graham Asher.
2008-11-08 07:28:39 +00:00
Werner Lemberg 9512092859 * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error
code so that memory allocation problems can be distinguished from
missing table entries.  Reported by Graham Asher.
(GET_NAME): New macro.
(sfnt_load_face): Use it.
2008-11-08 07:20:25 +00:00
Werner Lemberg c321b9b063 * devel/ftoption.h, include/freetype/config/ftoption.h
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
TT_CONFIG_OPTION_UNPATENTED_HINTING.  This fixes the return value of
`FT_Get_TrueType_Engine_Type' (and makes it work as documented).
Reported in bug #441638 of bugzilla.novell.com.

* docs/CHANGES: Document it.

Other minor documentation improvements.
2008-11-05 14:34:29 +00:00
Werner Lemberg e0ed07d767 * 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>.
2008-11-04 10:37:30 +00:00