summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/freetype/config/ftoption.h4
-rw-r--r--include/freetype/freetype.h54
-rw-r--r--include/freetype/ftoutln.h24
-rw-r--r--include/freetype/ftstroke.h12
-rw-r--r--include/freetype/ftsynth.h7
-rw-r--r--include/freetype/internal/ftcalc.h4
-rw-r--r--include/freetype/internal/ftobjs.h4
-rw-r--r--include/freetype/internal/psaux.h6
-rw-r--r--include/freetype/internal/tttypes.h4
-rw-r--r--include/freetype/tttables.h3
10 files changed, 85 insertions, 37 deletions
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index c41f089..4414cb0 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -669,7 +669,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
+ /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */
/* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
/* required. */
/* */
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 63c291a..d6cebbc 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -16,6 +16,10 @@
/***************************************************************************/
+#ifndef __FREETYPE_H__
+#define __FREETYPE_H__
+
+
#ifndef FT_FREETYPE_H
#error "`ft2build.h' hasn't been included yet!"
#error "Please always use macros to include FreeType header files."
@@ -25,10 +29,6 @@
#endif
-#ifndef __FREETYPE_H__
-#define __FREETYPE_H__
-
-
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_ERRORS_H
@@ -237,6 +237,10 @@ FT_BEGIN_HEADER
/* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
/* dimensions of the hinted glyph (in case hinting is applicable). */
/* */
+ /* Stroking a glyph with an outside border does not increase */
+ /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
+ /* values to account for the added width and height. */
+ /* */
typedef struct FT_Glyph_Metrics_
{
FT_Pos width;
@@ -844,8 +848,8 @@ FT_BEGIN_HEADER
/* expressed in font units (see */
/* `units_per_EM'). The box is large enough */
/* to contain any glyph from the font. Thus, */
- /* `bbox.yMax' can be seen as the `maximal */
- /* ascender', and `bbox.yMin' as the `minimal */
+ /* `bbox.yMax' can be seen as the `maximum */
+ /* ascender', and `bbox.yMin' as the `minimum */
/* descender'. Only relevant for scalable */
/* formats. */
/* */
@@ -877,13 +881,13 @@ FT_BEGIN_HEADER
/* positive. Only relevant for scalable */
/* formats. */
/* */
- /* max_advance_width :: The maximal advance width, in font units, */
+ /* max_advance_width :: The maximum advance width, in font units, */
/* for all glyphs in this face. This can be */
/* used to make word wrapping computations */
/* faster. Only relevant for scalable */
/* formats. */
/* */
- /* max_advance_height :: The maximal advance height, in font units, */
+ /* max_advance_height :: The maximum advance height, in font units, */
/* for all glyphs in this face. This is only */
/* relevant for vertical layouts, and is set */
/* to `height' for fonts that do not provide */
@@ -1338,7 +1342,7 @@ FT_BEGIN_HEADER
/* height :: The height in 26.6 fractional pixels. See */
/* @FT_FaceRec for the details. */
/* */
- /* max_advance :: The maximal advance width in 26.6 fractional */
+ /* max_advance :: The maximum advance width in 26.6 fractional */
/* pixels. See @FT_FaceRec for the details. */
/* */
/* <Note> */
@@ -2507,6 +2511,13 @@ FT_BEGIN_HEADER
* Besides deciding which hinter to use, you can also decide which
* hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details.
*
+ * Note that the auto-hinter needs a valid Unicode cmap (either a native
+ * one or synthesized by FreeType) for producing correct results. If a
+ * font provides an incorrect mapping (for example, assigning the
+ * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a
+ * mathematical integral sign), the auto-hinter might produce useless
+ * results.
+ *
*/
#define FT_LOAD_DEFAULT 0x0
#define FT_LOAD_NO_SCALE ( 1L << 0 )
@@ -2580,7 +2591,8 @@ FT_BEGIN_HEADER
*
* If @FT_LOAD_RENDER is also set, the glyph is rendered in the
* corresponding mode (i.e., the mode which matches the used algorithm
- * best) unless @FT_LOAD_MONOCHROME is set.
+ * best). An exeption is FT_LOAD_TARGET_MONO since it implies
+ * @FT_LOAD_MONOCHROME.
*
* You can use a hinting algorithm that doesn't correspond to the same
* rendering mode. As an example, it is possible to use the `light'
@@ -2922,7 +2934,7 @@ FT_BEGIN_HEADER
/* */
/* glyph_index :: The glyph index. */
/* */
- /* buffer_max :: The maximal number of bytes available in the */
+ /* buffer_max :: The maximum number of bytes available in the */
/* buffer. */
/* */
/* <Output> */
@@ -3081,9 +3093,15 @@ FT_BEGIN_HEADER
/* <Note> */
/* If you use FreeType to manipulate the contents of font files */
/* directly, be aware that the glyph index returned by this function */
- /* doesn't always correspond to the internal indices used within */
- /* the file. This is done to ensure that value~0 always corresponds */
- /* to the `missing glyph'. */
+ /* doesn't always correspond to the internal indices used within the */
+ /* file. This is done to ensure that value~0 always corresponds to */
+ /* the `missing glyph'. If the first glyph is not named `.notdef', */
+ /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */
+ /* the glyph ID~0 position, and whatever was there will be moved to */
+ /* the position `.notdef' had. For Type~1 fonts, if there is no */
+ /* `.notdef' glyph at all, then one will be created at index~0 and */
+ /* whatever was there will be moved to the last index -- Type~42 */
+ /* fonts are considered invalid under this condition. */
/* */
FT_EXPORT( FT_UInt )
FT_Get_Char_Index( FT_Face face,
@@ -3614,7 +3632,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation `(a*b)/c' */
- /* with maximal accuracy (it uses a 64-bit intermediate integer */
+ /* with maximum accuracy (it uses a 64-bit intermediate integer */
/* whenever necessary). */
/* */
/* This function isn't necessarily as fast as some processor specific */
@@ -3649,7 +3667,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation */
- /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */
+ /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
/* used to multiply a given value by a 16.16 fixed float factor. */
/* */
/* <Input> */
@@ -3694,7 +3712,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation */
- /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */
+ /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
/* used to divide a given value by a 16.16 fixed float factor. */
/* */
/* <Input> */
@@ -3834,7 +3852,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 4
-#define FREETYPE_PATCH 9
+#define FREETYPE_PATCH 10
/*************************************************************************/
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 1cf3c3f..e733f39 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2003, 2005-2011 by */
+/* Copyright 1996-2003, 2005-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -59,6 +59,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Translate */
/* FT_Outline_Transform */
/* FT_Outline_Embolden */
+ /* FT_Outline_EmboldenXY */
/* FT_Outline_Reverse */
/* FT_Outline_Check */
/* */
@@ -124,9 +125,9 @@ FT_BEGIN_HEADER
/* outline will *not* necessarily be *freed*, when */
/* destroying the library, by @FT_Done_FreeType. */
/* */
- /* numPoints :: The maximal number of points within the outline. */
+ /* numPoints :: The maximum number of points within the outline. */
/* */
- /* numContours :: The maximal number of contours within the outline. */
+ /* numContours :: The maximum number of contours within the outline. */
/* */
/* <Output> */
/* anoutline :: A handle to the new outline. */
@@ -353,6 +354,23 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Outline_EmboldenXY */
+ /* */
+ /* <Description> */
+ /* Embolden an outline. The new outline will be `xstrength' pixels */
+ /* wider and `ystrength' pixels higher. Otherwise, it is similar to */
+ /* @FT_Outline_Embolden, which uses the same strength in both */
+ /* directions. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Outline_EmboldenXY( FT_Outline* outline,
+ FT_Pos xstrength,
+ FT_Pos ystrength );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Outline_Reverse */
/* */
/* <Description> */
diff --git a/include/freetype/ftstroke.h b/include/freetype/ftstroke.h
index 49ae2bc..c3eb85a 100644
--- a/include/freetype/ftstroke.h
+++ b/include/freetype/ftstroke.h
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (specification). */
/* */
-/* Copyright 2002-2006, 2008, 2009, 2011 by */
+/* Copyright 2002-2006, 2008, 2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -682,6 +682,11 @@ FT_BEGIN_HEADER
*
* @note:
* The source glyph is untouched in case of error.
+ *
+ * Adding stroke may yield a significantly wider and taller glyph
+ * depending on how large of a radius was used to stroke the glyph. You
+ * may need to manually adjust horizontal and vertical advance amounts
+ * to account for this added size.
*/
FT_EXPORT( FT_Error )
FT_Glyph_Stroke( FT_Glyph *pglyph,
@@ -719,6 +724,11 @@ FT_BEGIN_HEADER
*
* @note:
* The source glyph is untouched in case of error.
+ *
+ * Adding stroke may yield a significantly wider and taller glyph
+ * depending on how large of a radius was used to stroke the glyph. You
+ * may need to manually adjust horizontal and vertical advance amounts
+ * to account for this added size.
*/
FT_EXPORT( FT_Error )
FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
diff --git a/include/freetype/ftsynth.h b/include/freetype/ftsynth.h
index a068b79..2074503 100644
--- a/include/freetype/ftsynth.h
+++ b/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2006, 2008 by */
+/* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,8 +61,9 @@ FT_BEGIN_HEADER
/* taste). This function is actually a convenience function, providing */
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
/* */
- /* For emboldened outlines the metrics are estimates only; if you need */
- /* precise values you should call @FT_Outline_Get_CBox. */
+ /* For emboldened outlines the height, width, and advance metrics are */
+ /* increased by the strength of the emboldening. You can also call */
+ /* @FT_Outline_Get_CBox to get precise values. */
FT_EXPORT( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index f8b4324..0d8d478 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 1996-2006, 2008, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -87,7 +87,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation `(a*b)/c' */
- /* (without rounding) with maximal accuracy (it uses a 64-bit */
+ /* (without rounding) with maximum accuracy (it uses a 64-bit */
/* intermediate integer whenever necessary). */
/* */
/* This function isn't necessarily as fast as some processor specific */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index fc18275..eee3d24 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -270,13 +270,13 @@ FT_BEGIN_HEADER
/* */
/* <Fields> */
/* max_points :: */
- /* The maximal number of points used to store the vectorial outline */
+ /* The maximum number of points used to store the vectorial outline */
/* of any glyph in this face. If this value cannot be known in */
/* advance, or if the face isn't scalable, this should be set to 0. */
/* Only relevant for scalable formats. */
/* */
/* max_contours :: */
- /* The maximal number of contours used to store the vectorial */
+ /* The maximum number of contours used to store the vectorial */
/* outline of any glyph in this face. If this value cannot be */
/* known in advance, or if the face isn't scalable, this should be */
/* set to 0. Only relevant for scalable formats. */
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index a96e0df..a46cb6a 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -225,7 +225,7 @@ FT_BEGIN_HEADER
T1_Field_ParseFunc reader;
FT_UInt offset; /* offset of field in object */
FT_Byte size; /* size of field in bytes */
- FT_UInt array_max; /* maximal number of elements for */
+ FT_UInt array_max; /* maximum number of elements for */
/* array */
FT_UInt count_offset; /* offset of element count for */
/* arrays; must not be zero if in */
@@ -531,7 +531,7 @@ FT_BEGIN_HEADER
/* */
/* max_points :: maximum points in builder outline */
/* */
- /* max_contours :: Maximal number of contours in builder outline. */
+ /* max_contours :: Maximum number of contours in builder outline. */
/* */
/* pos_x :: The horizontal translation (if composite glyph). */
/* */
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 57b1731..5eee3cd 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2002, 2004-2008, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1443,7 +1443,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* memory :: A handle to the memory manager. */
/* */
- /* max_points :: The maximal size in points of the zone. */
+ /* max_points :: The maximum size in points of the zone. */
/* */
/* max_contours :: Max size in links contours of the zone. */
/* */
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index 02236c2..ec52c06 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -702,7 +702,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * SFNT tables with length zero are treated as missing.
+ * While parsing fonts, FreeType handles SFNT tables with length zero as
+ * missing.
*
*/
FT_EXPORT( FT_Error )