Minor formatting and documentation fixes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 60e9b15..ace6e2b 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -407,11 +407,10 @@ FT_BEGIN_HEADER
* It also embeds a memory manager (see @FT_Memory), as well as a
* scan-line converter object (see @FT_Raster).
*
- * In multi-threaded applications it is easiest to use one
- * `FT_Library' object per thread. In case this is too cumbersome,
- * a single `FT_Library' object across threads is possible also
- * (since FreeType version 2.5.6), as long as a mutex lock is used
- * around @FT_New_Face and @FT_Done_Face.
+ * [Since 2.5.6] In multi-threaded applications it is easiest to use one
+ * `FT_Library' object per thread. In case this is too cumbersome, a
+ * single `FT_Library' object across threads is possible also, as long
+ * as a mutex lock is used around @FT_New_Face and @FT_Done_Face.
*
* @note:
* Library objects are normally created by @FT_Init_FreeType, and
@@ -1775,8 +1774,8 @@ FT_BEGIN_HEADER
* using its `next' field.
*
* glyph_index ::
- * The glyph index passed as an argument to @FT_Load_Glyph while
- * initializing the glyph slot (since FreeType version 2.10).
+ * [Since 2.10] The glyph index passed as an argument to
+ * @FT_Load_Glyph while initializing the glyph slot.
*
* generic ::
* A typeless pointer unused by the FreeType
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index a3fa0b6..12db4b0 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -378,7 +378,7 @@ FT_BEGIN_HEADER
* FT_OUTLINE_XXX
*
* @description:
- * A list of bit-field constants use for the flags in an outline's
+ * A list of bit-field constants used for the flags in an outline's
* `flags' field.
*
* @values:
@@ -468,20 +468,25 @@ FT_BEGIN_HEADER
/* */
-#define FT_CURVE_TAG( flag ) ( flag & 3 )
+#define FT_CURVE_TAG( flag ) ( flag & 0x03 )
-#define FT_CURVE_TAG_ON 1
-#define FT_CURVE_TAG_CONIC 0
-#define FT_CURVE_TAG_CUBIC 2
+ /* see the `tags' field in `FT_Outline' for a description of the values */
+#define FT_CURVE_TAG_ON 0x01
+#define FT_CURVE_TAG_CONIC 0x00
+#define FT_CURVE_TAG_CUBIC 0x02
-#define FT_CURVE_TAG_HAS_SCANMODE 4
+#define FT_CURVE_TAG_HAS_SCANMODE 0x04
-#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
-#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_X 0x08 /* reserved for TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_Y 0x10 /* reserved for TrueType hinter */
#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
FT_CURVE_TAG_TOUCH_Y )
+ /* values 0x20, 0x40, and 0x80 are reserved */
+
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_CURVE_TAG_XXX' values instead */
#define FT_Curve_Tag_On FT_CURVE_TAG_ON
#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index e5389ef..87e4b25 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -852,7 +852,7 @@
/* only the new Adobe engine (for both CFF and Type 1) is `light'; */
/* we use `strstr' to catch both `Type 1' and `CID Type 1' */
is_light_type1 =
- ft_strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL &&
+ ft_strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL &&
((PS_Driver)driver)->hinting_engine == FT_HINTING_ADOBE;
/* the check for `num_locations' assures that we actually */
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index c6b7e21..d8e3351 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -264,27 +264,33 @@
/* Render 3 separate monochrome bitmaps, shifting the outline. */
width /= 3;
- FT_Outline_Translate( outline, -sub[0].x, -sub[0].y );
+ FT_Outline_Translate( outline,
+ -sub[0].x,
+ -sub[0].y );
error = render->raster_render( render->raster, ¶ms );
if ( error )
goto Exit;
bitmap->buffer += width;
- FT_Outline_Translate( outline, sub[0].x - sub[1].x, sub[0].y - sub[1].y );
+ FT_Outline_Translate( outline,
+ sub[0].x - sub[1].x,
+ sub[0].y - sub[1].y );
error = render->raster_render( render->raster, ¶ms );
bitmap->buffer -= width;
if ( error )
goto Exit;
bitmap->buffer += 2 * width;
- FT_Outline_Translate( outline, sub[1].x - sub[2].x, sub[1].y - sub[2].y );
+ FT_Outline_Translate( outline,
+ sub[1].x - sub[2].x,
+ sub[1].y - sub[2].y );
error = render->raster_render( render->raster, ¶ms );
bitmap->buffer -= 2 * width;
if ( error )
goto Exit;
- x_shift -= sub[2].x;
- y_shift -= sub[2].y;
+ x_shift -= sub[2].x;
+ y_shift -= sub[2].y;
/* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
/* XXX: It is more efficient to render every third byte above. */
@@ -319,27 +325,33 @@
bitmap->pitch *= 3;
bitmap->rows /= 3;
- FT_Outline_Translate( outline, -sub[0].y, sub[0].x );
+ FT_Outline_Translate( outline,
+ -sub[0].y,
+ sub[0].x );
error = render->raster_render( render->raster, ¶ms );
if ( error )
goto Exit;
bitmap->buffer += pitch;
- FT_Outline_Translate( outline, sub[0].y - sub[1].y, sub[1].x - sub[0].x );
+ FT_Outline_Translate( outline,
+ sub[0].y - sub[1].y,
+ sub[1].x - sub[0].x );
error = render->raster_render( render->raster, ¶ms );
bitmap->buffer -= pitch;
if ( error )
goto Exit;
bitmap->buffer += 2 * pitch;
- FT_Outline_Translate( outline, sub[1].y - sub[2].y, sub[2].x - sub[1].x );
+ FT_Outline_Translate( outline,
+ sub[1].y - sub[2].y,
+ sub[2].x - sub[1].x );
error = render->raster_render( render->raster, ¶ms );
bitmap->buffer -= 2 * pitch;
if ( error )
goto Exit;
- x_shift -= sub[2].y;
- y_shift += sub[2].x;
+ x_shift -= sub[2].y;
+ y_shift += sub[2].x;
bitmap->pitch /= 3;
bitmap->rows *= 3;