changes:
-Some subglyphs in TrueType fonts were handled incorrectly due to
a missing graphics state reinitialization.
-Large .Z files (as distributed with some X11 packages) weren't
handled correctly, making FreeType increase the heap stack in an
endless loop.
-A large number of bugs have been fixed to avoid crashes and
endless loops with invalid fonts.
-API extensions for caching, TT handling
-autohinter improvement for non-Latin scripts
-Support for Windows FON files in PE format
* src/bdf/bdflib.c (setsbit, sbitset): Handle values >= 128
gracefully.
(_bdf_set_default_spacing): Increase `name' buffer size to 256 and
issue an error for longer names.
(_bdf_parse_glyphs): Limit allowed number of glyphs in font to the
number of code points in Unicode.
This fixes CVE-2007-1351.
This switches to the new stable branch. There are too many API additions
and other changes to list here -- see the changelog.
Some notes:
-There is an unpatented hinter built in per default. The "truetype"
pkgsrc option does still enable another one -- the documentation here
is inconsistent, so I've left this alone for now. I couldn't find
a visible effect with my fonts on my display.
-New pkgsrc option "subpixel". Enables subpixel rendering for LCDs.
Not default because there are patent issues.
-There is sone strange effect of the CONFIG_SHELL environment valiable
on the "configure" script. Worked around this by overriding the
env var in the pkg Makefile. Someone understanding shell quoting might
be able to locate the underlying problem.
pkg-config file.
This fixes problem where non-pkgsrc software builds using this info
can also find the ft2build.h header. (Not noticed in pkgsrc itself
because that include file is already known.)
This is also done in upstream version in the 2.2 release candidates.
The commit log message upstream is:
builds/unix/freetype2.in (CFlags): Add missing directory.
Bump PKGREVISION.
I. IMPORTANT BUG FIXES
- The size comparison for BDF and PCF files could fail sometimes.
- Some CFF files were still not loaded correctly. Patch from
Derek Noonburg.
- The stroker still had some serious bugs.
- FreeType didn't properly parse empty Type 1 glyphs.
- An unbound dynamic buffer growth was fixed in the PFR loader.
- Several bugs have been fixed in the cache sub-system.
- The auto-hinter didn't work properly for fonts without a Unicode
charmap -- it even refused to load the glyphs.
II. IMPORTANT CHANGES
- Many fixes have been applied to drastically reduce the amount of
heap memory used by FreeType, especially when using
memory-mapped font files (which is the default on Unix systems
which support them).
- The auto-hinter has been replaced with a new module, called the
`auto-fitter'. It consumes less memory than its predecessor,
and it is prepared to support non-latin scripts better in next
releases.
- George Williams contributed code to read kerning data from PFM
files.
III. MISCELLANEOUS
- The BDF driver no longer converts all returned bitmaps with a
depth of 2bpp or 4bpp to a depth of 8bpp.
- A new option `--ftversion' has been added to freetype-config to
return the FreeType version.
- The memory debugger has been updated to dump allocation
statistics on all allocation sources in the library.
Unfortunately, configure doesn't always manage to correctly pick up these
values from GREP and EGREP, so we pass them in as cached values. This way,
configure still doesn't always print them correctly, but they end up in
config.status, which is the end goal.
This solves the problem where on Solaris, configure detects the wrong grep
and worse still, fails to detect a suitable egrep at all.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
into the bsd.options.mk framework. Instead of appending to
${PKG_OPTIONS_VAR}, it appends to PKG_DEFAULT_OPTIONS. This causes
the default options to be the union of PKG_DEFAULT_OPTIONS and any
old USE_* and FOO_USE_* settings.
This fixes PR pkg/26590.
I. IMPORTANT BUG FIXES
- The function `FT_Get_CharMap_Index' was only declared, without
any real code. For consistency, it has been renamed to
`FT_Get_Charmap_Index'. (This function is needed to implement
cmap caches.)
- `FT_Outline_Get_BBox' sometimes returned incorrect values for
conic outlines (e.g., for TrueType fonts).
- Handling of `bhed' table has been fixed.
- The TrueType driver with enabled byte code interpreter sometimes
returned artifacts due to incorrect rounding. This bug has been
introduced after version 2.1.4.
- The BDF driver dropped the last glyph in the font.
- The BDF driver now uses the DEFAULT_CHAR property (if available)
to select a glyph shape for the undefined glyph.
II. IMPORTANT CHANGES
- George Williams contributed code to handle Apple's font
distortion technology found in GX fonts (`avar', `cvar', `fvar',
and `gvar' tables; the Multiple Masters API has been slightly
extended to cope with the new functionality).
- The `FT_GlyphSlotRec' structure has been extended: The elements
`lsb_delta' and `rsb_delta' give the difference between hinted
and unhinted left and right side bearings if autohinting is
active. Using those values can improve the inter-letter spacing
considerably. See the documentation of `FT_GlyphSlotRec' and
the `ftstring' demo program how to use it.
III. MISCELLANEOUS
- A new documentation file `formats.txt' describes various font
formats supported (and not supported) by FreeType.
* bug fixes
* Both PCF and BDF drivers now handle the SETWIDTH_NAME and
ADD_STYLE_NAME properties. Values are appended to
face->style_name; example: `Bold SemiCondensed'.
* The PCF driver now handles bitmap fonts compressed with the LZW
algorithm (extension .pcf.Z, compressed with `compress').
* A new API function `FT_Get_CMap_Language_ID' (declared in
`tttables.h') is available to get the language ID of a
TrueType/SFNT cmap.
* The hexadecimal format of data after the `StartData' command in
CID-keyed Type 1 fonts is now supported. While this can't occur
in file-based fonts, it can happen in document-embedded
resources of PostScript documents.
* Embedded bitmaps in SFNT-based CFF fonts are now supported.
* A simple API is now available to control FreeType's tracing
mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file
`ftdebug.h' for more details.
* YAMATO Masatake contributed improved handling of MacOS resource
forks on non-MacOS platforms (for example, Linux can mount MacOS
file systems).
* Support for MacOS has been improved; there is now a new function
`FT_New_Face_From_FSSpec' similar to `FT_New_Face' except that
it accepts an FSSpec instead of a path.
* The cache sub-system has been rewritten.
- Updated to newest libtool version, fixing build problems on
various platforms.
- On Unix platforms, `make install' didn't copy the correct
`ftconfig.h' file.
CHANGES BETWEEN 2.1.6 and 2.1.5:
- The PFR font driver didn't load kerning tables correctly, and
the functions in FT_PFR_H didn't work at all.
- Type 1 font files in binary format (PFB) with an end-of-file
indicator weren't accepted by the FreeType engine.
- Fonts which contain /PaintType and /StrokeWidth no longer cause
a segfault. This bug has been introduced in version 2.1.5.
- Fonts loaded with FT_LOAD_RENDER no longer cause strange
results. This bug has been introduced in version 2.1.5.
- Some Windows (bitmap) FNT/FON files couldn't be handled
correctly.
- The internal module API has been heavily changed in favor of
massive simplifications within the font engine.
- The PostScript parser has been enhanced to handle comments and
strings correctly. Additionally, more syntax forms are
recognized.
- Added the optional unpatented hinting system for TrueType.
- There is now a guard in the public header files to protect
against inclusion of freetype.h from FreeType 1.
- Direct inclusion of freetype.h and other public header files no
longer works. You have to use the documented scheme
#include <ft2build.h>
#include FT_FREETYPE_H
to load freetype.h with a symbolic name. This protects against
renaming of public header files (which shouldn't happen but
actually has, avoiding two public header files with the same
name).
I. IMPORTANT BUG FIXES
- Parsing the /CIDFontName field now removes the leading slash to
be in sync with other font drivers.
- gzip support was buggy. Some fonts could not be read.
- Fonts which have nested subglyphs more than one level deep no
longer cause a segfault.
- Creation of synthetic cmaps for fonts in CFF format was broken
partially.
- Numeric font dictionary entries for synthetic fonts are no longer
overwritten.
- The font matrix wasn't applied to the advance width for Type1, CID,
and CFF fonts. This caused problem when loading certain synthetic
Type 1 fonts like "Helvetica Narrow"
- The test for the charset registry in BDF and PCF fonts is now
case-insensitive.
- FT_Vector_Rotate rotating sometimes returned strange values due to
rounding errors.
- The PCF driver now returns the correct number of glyphs (including
an artificial `notdef' glyph at index 0).
- FreeType now supports buggy CMaps which are contained in many CJK
fonts from Dynalab.
- Opening an invalid font on a Mac caused a segfault due to
double-freeing memory.
- BDF fonts with more than 32768 glyphs weren't supported properly.
II. IMPORTANT CHANGES
- Accessing bitmap font formats has been synchronized. To do that
the FT_Bitmap_Size structure has been extended to contain new
fields `size', `x_ppem', and `y_ppem'.
- The FNT driver now returns multiple faces, not multiple strikes.
- The `psnames' module has been updated to the Adobe Glyph List
version 2.0.
- The `psnames' module now understands `uXXXX[X[X]]' glyph names.
- The algorithm for guessing the font style has been improved.
- For fonts in sfnt format, root->height is no longer increased if
the line gap is zero. There exist fonts (containing e.g. form
drawing characters) which intentionally have a zero line gap value.
- ft_glyph_bbox_xxx flags are now deprecated in favour of
FT_GLYPH_BBOX_XXX.
- ft_module_xxx flags are now deprecated in favour of FT_MODULE_XXX.
- FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now deprecated
in favour of FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those
encodings are not specific to Microsoft.
III. MISCELLANEOUS
- The autohinter has been further improved; for example, `m' glyphs
now retain its vertical symmetry.
- Partial support of Mac fonts on non-Mac platforms.
- `make refdoc' (after first `make') builds the HTML documentation.
You need Python for this.
- The make build system should now work more reliably on DOS-like
platforms.
- Support for EMX gcc and Watson C/C++ compilers on MS-DOS has been
added.
- Better VMS build support.
- Support for the pkg-config package by providing a `freetype.pc'
file.
- New configure option --with-old-mac-fonts for Darwin.
- Some source files have been renamed (mainly to fit into the 8.3
naming scheme).
Extract of changes:
- a fix in the Gzip stream reader, it couldn't read certain .gz files
properly due to a small typo. In certain cases, FreeType could also
loop endlessly when trying to load tiny gzipped files.
- certain fonts couldn't be loaded by 2.1.3 because they lacked a
Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously rejected
them.
- the CFF loader was modified to accept fonts which only
contain a subset of their reference charset. This prevented the
correct use of PDF-embedded fonts.
- the logic to detect Unicode charmaps has been modified. this is required
to support fonts which include both 16-bit and 32-bit charmaps (like
very recent asian ones) using the new 10 and 12 SFNT formats.
- the TrueType loader now limits the depth of composite glyphs. This is
necessary to prevent broken fonts to break the engine by blowing the
stack with recursive glyph definitions.
- the CMap cache is now capable of managing UCS-4 character codes that
are mapped through extended charmaps in recent TrueType/OpenType fonts
- the cache sub-system now properly manages out-of-memory conditions,
instead of blindly reporting them to the caller. This means that it
will try to empty the cache before restarting its allocations to see
if that can help.
- the PFR driver didn't return the list of available embedded bitmaps
properly.
- David Chester contributed some enhancements to the auto-hinter that
significantly increase the quality of its output. The Postscript hinter
was also improved in several ways..
- the FT_RENDER_MODE_LIGHT render mode was implemented
- a new API, called FT_Get_BDF_Property has been added to FT_BDF_H to
retrieve BDF properties from BDF _and_ PCF font files. THIS IS STILL
EXPERIMENTAL, since it hasn't been properly tested yet.
- a Windows FNT specific API has been added, mostly to access font
headers. This is used by Wine
- TrueType tables without a "hmtx" table are now tolerated when an
incremental interface is used. This happens for certain Type42 fonts
passed from Ghostscript to FreeType.
- the PFR font driver is now capable of returning the font family and
style names when they're available (instead of the sole "FontID"). This
is performed by parsing an *undocumented* portion of the font file !!
of pkgsrc:
- place -I${LOCALBASE}/freetype2 before -I${LOCALBASE}, since
otherwise freetype 1 headers might be used
- add -Wl,${RPATH_FLAG}
bump pkgrevision