[sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/. * include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat, FT_COLR_Paint): Do it to make it harmonize with other names such as 'PaintTranslate'. * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto.
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 173 174 175 176 177 178 179 180
diff --git a/ChangeLog b/ChangeLog
index e230a02..aa82579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2021-07-22 Dominik Röttsches <drott@chromium.org>
+ [sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/.
+
+ * include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat,
+ FT_COLR_Paint): Do it to make it harmonize with other names such as
+ 'PaintTranslate'.
+
+ * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto.
+
+2021-07-22 Dominik Röttsches <drott@chromium.org>
+
Move 'COLR' API to `ftcolor.h`.
* include/freetype/freetype.h: Cut section layer managament
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
index 676d6ce..0a7be46 100644
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -496,7 +496,7 @@ FT_BEGIN_HEADER
FT_COLR_PAINTFORMAT_SWEEP_GRADIENT = 8,
FT_COLR_PAINTFORMAT_GLYPH = 10,
FT_COLR_PAINTFORMAT_COLR_GLYPH = 11,
- FT_COLR_PAINTFORMAT_TRANSFORMED = 12,
+ FT_COLR_PAINTFORMAT_TRANSFORM = 12,
FT_COLR_PAINTFORMAT_TRANSLATE = 14,
FT_COLR_PAINTFORMAT_ROTATE = 16,
FT_COLR_PAINTFORMAT_SKEW = 18,
@@ -762,7 +762,7 @@ FT_BEGIN_HEADER
* A structure representing an offset to a `Paint` value stored in any
* of the paint tables of a 'COLR' v1 font. Compare Offset<24> there.
* When 'COLR' v1 paint tables represented by FreeType objects such as
- * @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransformed
+ * @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransform
* reference downstream nested paint tables, we do not immediately
* retrieve them but encapsulate their location in this type. Use
* @FT_Get_Paint to retrieve the actual @FT_COLR_Paint object that
@@ -1041,10 +1041,10 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @struct:
- * FT_PaintTransformed
+ * FT_PaintTransform
*
* @description:
- * A structure representing a 'COLR' v1 `PaintTransformed` paint table.
+ * A structure representing a 'COLR' v1 `PaintTransform` paint table.
*
* @fields:
* paint ::
@@ -1058,12 +1058,12 @@ FT_BEGIN_HEADER
* without retaining backward-compatibility of both the API and ABI.
*
*/
- typedef struct FT_PaintTransformed_
+ typedef struct FT_PaintTransform_
{
FT_OpaquePaint paint;
FT_Affine23 affine;
- } FT_PaintTransformed;
+ } FT_PaintTransform;
/**************************************************************************
@@ -1251,7 +1251,7 @@ FT_BEGIN_HEADER
* * @FT_PaintLinearGradient
* * @FT_PaintRadialGradient
* * @FT_PaintSweepGradient
- * * @FT_PaintTransformed
+ * * @FT_PaintTransform
* * @FT_PaintTranslate
* * @FT_PaintRotate
* * @FT_PaintSkew
@@ -1275,7 +1275,7 @@ FT_BEGIN_HEADER
FT_PaintLinearGradient linear_gradient;
FT_PaintRadialGradient radial_gradient;
FT_PaintSweepGradient sweep_gradient;
- FT_PaintTransformed transformed;
+ FT_PaintTransform transform;
FT_PaintTranslate translate;
FT_PaintRotate rotate;
FT_PaintSkew skew;
@@ -1367,7 +1367,7 @@ FT_BEGIN_HEADER
*
* root_transform ::
* Specifies whether an initially computed root is returned by the
- * @FT_PaintTransformed operation to account for the activated size
+ * @FT_PaintTransform operation to account for the activated size
* (see @FT_Activate_Size) and the configured transform and translate
* (see @FT_Set_Transform).
*
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index d672bb5..8db774c 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -507,17 +507,17 @@
return 1;
}
- else if ( apaint->format == FT_COLR_PAINTFORMAT_TRANSFORMED )
+ else if ( apaint->format == FT_COLR_PAINTFORMAT_TRANSFORM )
{
- apaint->u.transformed.paint.p = child_table_p;
- apaint->u.transformed.paint.insert_root_transform = 0;
+ apaint->u.transform.paint.p = child_table_p;
+ apaint->u.transform.paint.insert_root_transform = 0;
- apaint->u.transformed.affine.xx = FT_NEXT_LONG( p );
- apaint->u.transformed.affine.yx = FT_NEXT_LONG( p );
- apaint->u.transformed.affine.xy = FT_NEXT_LONG( p );
- apaint->u.transformed.affine.yy = FT_NEXT_LONG( p );
- apaint->u.transformed.affine.dx = FT_NEXT_LONG( p );
- apaint->u.transformed.affine.dy = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.xx = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.yx = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.xy = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.yy = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.dx = FT_NEXT_LONG( p );
+ apaint->u.transform.affine.dy = FT_NEXT_LONG( p );
return 1;
}
@@ -809,11 +809,11 @@
* drawing operations for subsequenct paints. Prepare this initial
* transform here.
*/
- paint->format = FT_COLR_PAINTFORMAT_TRANSFORMED;
+ paint->format = FT_COLR_PAINTFORMAT_TRANSFORM;
next_paint.p = opaque_paint.p;
next_paint.insert_root_transform = 0;
- paint->u.transformed.paint = next_paint;
+ paint->u.transform.paint = next_paint;
/* `x_scale` and `y_scale` are in 26.6 format, representing the scale
* factor to get from font units to requested size. However, expected
@@ -828,28 +828,28 @@
FT_Matrix_Multiply( &face->root.internal->transform_matrix,
&ft_root_scale );
- paint->u.transformed.affine.xx = ft_root_scale.xx;
- paint->u.transformed.affine.xy = ft_root_scale.xy;
- paint->u.transformed.affine.yx = ft_root_scale.yx;
- paint->u.transformed.affine.yy = ft_root_scale.yy;
+ paint->u.transform.affine.xx = ft_root_scale.xx;
+ paint->u.transform.affine.xy = ft_root_scale.xy;
+ paint->u.transform.affine.yx = ft_root_scale.yx;
+ paint->u.transform.affine.yy = ft_root_scale.yy;
/* The translation is specified in 26.6 format and, according to the
* documentation of `FT_Set_Translate`, is performed on the character
* size given in the last call to `FT_Set_Char_Size`. The
- * 'PaintTransformed' paint table's `FT_Affine23` format expects
+ * 'PaintTransform' paint table's `FT_Affine23` format expects
* values in 16.16 format, thus we need to shift by 10 bits.
*/
if ( face->root.internal->transform_flags & 2 )
{
- paint->u.transformed.affine.dx =
+ paint->u.transform.affine.dx =
face->root.internal->transform_delta.x << 10;
- paint->u.transformed.affine.dy =
+ paint->u.transform.affine.dy =
face->root.internal->transform_delta.y << 10;
}
else
{
- paint->u.transformed.affine.dx = 0;
- paint->u.transformed.affine.dy = 0;
+ paint->u.transform.affine.dx = 0;
+ paint->u.transform.affine.dy = 0;
}
return 1;