summaryrefslogtreecommitdiff
path: root/freetype/include/freetype/ftimage.h
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2018-04-03 15:49:48 +0100
committerChris Liddell <chris.liddell@artifex.com>2018-05-18 13:17:15 +0100
commit9cb169b6b260f650aac2c3c7ed7af0f345ee0707 (patch)
tree9b4d2ee77a0dbe43cb0364da2444686ed7302646 /freetype/include/freetype/ftimage.h
parentddace435eb99ea1c8a517f4ec94307cfe0743bce (diff)
downloadghostpdl-9cb169b6b260f650aac2c3c7ed7af0f345ee0707.tar.gz
Work around a behaviour change in freetype > 2.8
Freetype will throw an error when we try to retrieve the glyph if the x/y advance values are too big to fit in a 16.16 fixed point value. Since we have no need of those values, set them to zero, and avoid the error. Bring freetype up to 2.9.1 Plus the gs makefile changes to support the new version. Reapply "Work around a change in the zlib API for 1.2.11" for Freetype commit: 08482c582115a1396d0fd9186011008f889a61c5
Diffstat (limited to 'freetype/include/freetype/ftimage.h')
-rw-r--r--freetype/include/freetype/ftimage.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/freetype/include/freetype/ftimage.h b/freetype/include/freetype/ftimage.h
index 4f86c560f..79ede1959 100644
--- a/freetype/include/freetype/ftimage.h
+++ b/freetype/include/freetype/ftimage.h
@@ -5,7 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,13 +169,13 @@ FT_BEGIN_HEADER
/* @FT_RENDER_MODE_LCD_V. */
/* */
/* FT_PIXEL_MODE_BGRA :: */
- /* An image with four 8-bit channels per pixel, representing a */
- /* color image (such as emoticons) with alpha channel. For each */
- /* pixel, the format is BGRA, which means, the blue channel comes */
- /* first in memory. The color channels are pre-multiplied and in */
- /* the sRGB colorspace. For example, full red at half-translucent */
- /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */
- /* See also @FT_LOAD_COLOR. */
+ /* [Since 2.5] An image with four 8-bit channels per pixel, */
+ /* representing a color image (such as emoticons) with alpha */
+ /* channel. For each pixel, the format is BGRA, which means, the */
+ /* blue channel comes first in memory. The color channels are */
+ /* pre-multiplied and in the sRGB colorspace. For example, full */
+ /* red at half-translucent opacity will be represented as */
+ /* `00,00,80,80', not `00,00,FF,80'. See also @FT_LOAD_COLOR. */
/* */
typedef enum FT_Pixel_Mode_
{
@@ -301,11 +301,11 @@ FT_BEGIN_HEADER
/* each outline point's type. */
/* */
/* If bit~0 is unset, the point is `off' the curve, */
- /* i.e., a Bézier control point, while it is `on' if */
+ /* i.e., a Bezier control point, while it is `on' if */
/* set. */
/* */
/* Bit~1 is meaningful for `off' points only. If set, */
- /* it indicates a third-order Bézier arc control point; */
+ /* it indicates a third-order Bezier arc control point; */
/* and a second-order control point if unset. */
/* */
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
@@ -532,7 +532,7 @@ FT_BEGIN_HEADER
/* A function pointer type used to describe the signature of a `conic */
/* to' function during outline walking or decomposition. */
/* */
- /* A `conic to' is emitted to indicate a second-order Bézier arc in */
+ /* A `conic to' is emitted to indicate a second-order Bezier arc in */
/* the outline. */
/* */
/* <Input> */
@@ -564,12 +564,12 @@ FT_BEGIN_HEADER
/* A function pointer type used to describe the signature of a `cubic */
/* to' function during outline walking or decomposition. */
/* */
- /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
+ /* A `cubic to' is emitted to indicate a third-order Bezier arc. */
/* */
/* <Input> */
- /* control1 :: A pointer to the first Bézier control point. */
+ /* control1 :: A pointer to the first Bezier control point. */
/* */
- /* control2 :: A pointer to the second Bézier control point. */
+ /* control2 :: A pointer to the second Bezier control point. */
/* */
/* to :: A pointer to the target end point. */
/* */
@@ -595,16 +595,16 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A structure to hold various function pointers used during outline */
- /* decomposition in order to emit segments, conic, and cubic Béziers. */
+ /* decomposition in order to emit segments, conic, and cubic Beziers. */
/* */
/* <Fields> */
/* move_to :: The `move to' emitter. */
/* */
/* line_to :: The segment emitter. */
/* */
- /* conic_to :: The second-order Bézier arc emitter. */
+ /* conic_to :: The second-order Bezier arc emitter. */
/* */
- /* cubic_to :: The third-order Bézier arc emitter. */
+ /* cubic_to :: The third-order Bezier arc emitter. */
/* */
/* shift :: The shift that is applied to coordinates before they */
/* are sent to the emitter. */
@@ -619,7 +619,7 @@ FT_BEGIN_HEADER
/* */
/* { */
/* x' = (x << shift) - delta */
- /* y' = (x << shift) - delta */
+ /* y' = (y << shift) - delta */
/* } */
/* */
/* Set the values of `shift' and `delta' to~0 to get the original */
@@ -701,7 +701,7 @@ FT_BEGIN_HEADER
/* */
/* FT_GLYPH_FORMAT_OUTLINE :: */
/* The glyph image is a vectorial outline made of line segments */
- /* and Bézier arcs; it can be described as an @FT_Outline; you */
+ /* and Bezier arcs; it can be described as an @FT_Outline; you */
/* generally want to access the `outline' field of the */
/* @FT_GlyphSlotRec structure to read it. */
/* */
@@ -1064,24 +1064,24 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* FreeType used to provide an area of memory called the `render */
- /* pool' available to all registered rasters. This was not thread */
- /* safe however and now FreeType never allocates this pool. NULL */
- /* is always passed in as pool_base. */
+ /* pool' available to all registered rasterizers. This was not */
+ /* thread safe, however, and now FreeType never allocates this pool. */
/* */
- /* This function is called each time the render pool changes, or just */
- /* after a new raster object is created. */
+ /* This function is called after a new raster object is created. */
/* */
/* <Input> */
/* raster :: A handle to the new raster object. */
/* */
- /* pool_base :: The address in memory of the render pool. */
+ /* pool_base :: Previously, the address in memory of the render pool. */
+ /* Set this to NULL. */
/* */
- /* pool_size :: The size in bytes of the render pool. */
+ /* pool_size :: Previously, the size in bytes of the render pool. */
+ /* Set this to 0. */
/* */
/* <Note> */
- /* Rasters should ignore the render pool and rely on dynamic or stack */
- /* allocation if they want to (a handle to the memory allocator is */
- /* passed to the raster constructor). */
+ /* Rasterizers should rely on dynamic or stack allocation if they */
+ /* want to (a handle to the memory allocator is passed to the */
+ /* rasterizer constructor). */
/* */
typedef void
(*FT_Raster_ResetFunc)( FT_Raster raster,
@@ -1180,6 +1180,7 @@ FT_BEGIN_HEADER
typedef struct FT_Raster_Funcs_
{
FT_Glyph_Format glyph_format;
+
FT_Raster_NewFunc raster_new;
FT_Raster_ResetFunc raster_reset;
FT_Raster_SetModeFunc raster_set_mode;