From 117df36b4c3a5f7850a3789e92ce54d9341673ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= Date: Wed, 22 Jun 2022 09:33:20 +0000 Subject: [PATCH] [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14 --- include/freetype/ftcolor.h | 5 ++--- src/sfnt/ttcolr.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git b/include/freetype/ftcolor.h a/include/freetype/ftcolor.h index 13285683f..3edaee4ec 100644 --- b/include/freetype/ftcolor.h +++ a/include/freetype/ftcolor.h @@ -592,8 +592,7 @@ FT_BEGIN_HEADER * * @fields: * stop_offset :: - * The stop offset along the gradient, expressed as a 16.16 fixed-point - * coordinate. + * The stop offset between 0 and 1 along the gradient. * * color :: * The color information for this stop, see @FT_ColorIndex. @@ -605,7 +604,7 @@ FT_BEGIN_HEADER */ typedef struct FT_ColorStop_ { - FT_Fixed stop_offset; + FT_F2Dot14 stop_offset; FT_ColorIndex color; } FT_ColorStop; diff --git b/src/sfnt/ttcolr.c a/src/sfnt/ttcolr.c index e02dd060e..d54231fd6 100644 --- b/src/sfnt/ttcolr.c +++ a/src/sfnt/ttcolr.c @@ -1054,7 +1054,7 @@ /* Iterator points at first `ColorStop` of `ColorLine`. */ p = iterator->p; - color_stop->stop_offset = F2DOT14_TO_FIXED( FT_NEXT_SHORT( p ) ); + color_stop->stop_offset = FT_NEXT_SHORT( p ); color_stop->color.palette_index = FT_NEXT_USHORT( p ); -- 2.39.1