summaryrefslogtreecommitdiffstats
path: root/include/freetype/ftstroke.h
diff options
context:
space:
mode:
authorArne Coucheron <arco68@gmail.com>2011-08-24 05:32:14 +0200
committerArne Coucheron <arco68@gmail.com>2011-08-24 05:32:14 +0200
commit6a26dd05f335a4ebab267657ae31bb7ee7114625 (patch)
treef5a0d98f1d887b8063987f5e9b58a4ed2931833e /include/freetype/ftstroke.h
parent1db8a080668ca5428a7f000f668ebf8bec20ad08 (diff)
downloadandroid_external_freetype-6a26dd05f335a4ebab267657ae31bb7ee7114625.tar.gz
android_external_freetype-6a26dd05f335a4ebab267657ae31bb7ee7114625.tar.bz2
android_external_freetype-6a26dd05f335a4ebab267657ae31bb7ee7114625.zip
CHANGES BETWEEN 2.4.5 and 2.4.6 I. IMPORTANT BUG FIXES - For TrueType based fonts, the ascender and descender values were incorrect sometimes (off by a pixel if the ppem value was not a multiple of 5). Depending on the use you might now experience a different layout; the change should result in better, more consistent line spacing. - Fix CVE-2011-0226 which causes a vulnerability while handling Type 1 fonts. - BDF fonts containing glyphs with negative values for ENCODING were incorrectly rejected. This bug has been introduced in FreeType version 2.2.0. - David Bevan contributed a major revision of the FreeType stroker code: . The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected. . A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been introduced to support PostScript and PDF miter joins. . FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an alias for FT_STROKER_LINEJOIN_MITER. . Various stroking glitches has been fixed. II. MISCELLANEOUS - SFNT bitmap fonts which contain an outline glyph for `.notdef' only no longer set the FT_FACE_FLAG_SCALABLE flag. CHANGES BETWEEN 2.4.4 and 2.4.5 I. IMPORTANT BUG FIXES - A rendering regression for second-order Bézier curves has been fixed, introduced in 2.4.3. II. IMPORTANT CHANGES - If autohinting is not explicitly disabled, FreeType now uses the autohinter if a TrueType based font doesn't contain native hints. - The load flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH has been made redundant and is simply ignored; this means that FreeType now ignores the global advance width value in TrueType fonts. III. MISCELLANEOUS - `FT_Sfnt_Table_Info' can now return the number of SFNT tables of a font. - Support for PCF files compressed with bzip2 has been contributed by Joel Klinghed. To make this work, the OS must provide a bzip2 library. - Bradley Grainger contributed project and solution files in Visual Studio 2010 format. - Again some fixes to better handle broken fonts. - Some improvements to the B/W rasterizer. - Fixes to the cache module to improve robustness. - Just Fill Bugs contributed (experimental) code to compute blue zones for CJK Ideographs, improving the alignment of horizontal stems at the top or bottom edges. - The `ftgrid' demo program can now display autohinter segments, to be toggled on and off with key `s'. CHANGES BETWEEN 2.4.3 and 2.4.4 I. IMPORTANT BUG FIXES - UVS support (TrueType/OpenType cmap format 14) support is fixed. This regression has been introduced in version 2.4.0. II. MISCELLANEOUS - Detect tricky fonts (e.g. MingLiU) by the lengths and checksums of Type42-persistent subtables (`cvt ', `fpgm', and `prep') when a TrueType font without family name is given. The previous fix, introduced in 2.4.3, was too rigorous, causing many subsetted fonts (mainly from PDF files) displayed badly because FreeType forced rendering with the TrueType bytecode engine instead of the autohinter. - Better support for 64bit platforms. - More fixes to improve handling of broken fonts. CHANGES BETWEEN 2.4.2 and 2.4.3 I. IMPORTANT BUG FIXES - Fix rendering of certain cubic, S-shaped arcs. This regression has been introduced in version 2.4.0. II. MISCELLANEOUS - To fix the above mentioned rendering issue, a new spline flattening algorithm has been introduced which speeds up both conic and cubic arcs. - Handling of broken fonts has been further improved. Change-Id: Ie06b74b29738a34d686ab1132e9fa44d5d258d1c
Diffstat (limited to 'include/freetype/ftstroke.h')
-rw-r--r--include/freetype/ftstroke.h49
1 files changed, 37 insertions, 12 deletions
diff --git a/include/freetype/ftstroke.h b/include/freetype/ftstroke.h
index 3afb87d..dbda6d2 100644
--- a/include/freetype/ftstroke.h
+++ b/include/freetype/ftstroke.h
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (specification). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2002-2006, 2008, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,20 +75,44 @@ FT_BEGIN_HEADER
* to join two lines smoothly.
*
* FT_STROKER_LINEJOIN_BEVEL ::
- * Used to render beveled line joins; i.e., the two joining lines
- * are extended until they intersect.
- *
+ * Used to render beveled line joins. The outer corner of
+ * the joined lines is filled by enclosing the triangular
+ * region of the corner with a straight line between the
+ * outer corners of each stroke.
+ *
+ * FT_STROKER_LINEJOIN_MITER_FIXED ::
+ * Used to render mitered line joins, with fixed bevels if the
+ * miter limit is exceeded. The outer edges of the strokes
+ * for the two segments are extended until they meet at an
+ * angle. If the segments meet at too sharp an angle (such
+ * that the miter would extend from the intersection of the
+ * segments a distance greater than the product of the miter
+ * limit value and the border radius), then a bevel join (see
+ * above) is used instead. This prevents long spikes being
+ * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter
+ * line join as used in PostScript and PDF.
+ *
+ * FT_STROKER_LINEJOIN_MITER_VARIABLE ::
* FT_STROKER_LINEJOIN_MITER ::
- * Same as beveled rendering, except that an additional line
- * break is added if the angle between the two joining lines
- * is too closed (this is useful to avoid unpleasant spikes
- * in beveled rendering).
+ * Used to render mitered line joins, with variable bevels if
+ * the miter limit is exceeded. The intersection of the
+ * strokes is clipped at a line perpendicular to the bisector
+ * of the angle between the strokes, at the distance from the
+ * intersection of the segments equal to the product of the
+ * miter limit value and the border radius. This prevents
+ * long spikes being created.
+ * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
+ * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
+ * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
+ * backwards compatibility.
*/
typedef enum FT_Stroker_LineJoin_
{
- FT_STROKER_LINEJOIN_ROUND = 0,
- FT_STROKER_LINEJOIN_BEVEL,
- FT_STROKER_LINEJOIN_MITER
+ FT_STROKER_LINEJOIN_ROUND = 0,
+ FT_STROKER_LINEJOIN_BEVEL = 1,
+ FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,
+ FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE,
+ FT_STROKER_LINEJOIN_MITER_FIXED = 3
} FT_Stroker_LineJoin;
@@ -245,7 +269,8 @@ FT_BEGIN_HEADER
* The line join style.
*
* miter_limit ::
- * The miter limit for the FT_STROKER_LINEJOIN_MITER style,
+ * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
+ * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,
* expressed as 16.16 fixed point value.
*
* @note: