diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 60e9b1592..ace6e2b70 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 a3fa0b663..12db4b0b3 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 e5389efc8..87e4b25b3 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 c6b7e21d4..d8e335183 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;