[sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14

This commit is contained in:
Dominik Röttsches 2022-06-22 09:33:20 +00:00
parent 5e48c88d57
commit 117df36b4c
2 changed files with 4 additions and 3 deletions

View File

@ -592,7 +592,8 @@ FT_BEGIN_HEADER
*
* @fields:
* stop_offset ::
* The stop offset between 0 and 1 along the gradient.
* The stop offset along the gradient, expressed as a 16.16 fixed-point
* coordinate.
*
* color ::
* The color information for this stop, see @FT_ColorIndex.
@ -604,7 +605,7 @@ FT_BEGIN_HEADER
*/
typedef struct FT_ColorStop_
{
FT_F2Dot14 stop_offset;
FT_Fixed stop_offset;
FT_ColorIndex color;
} FT_ColorStop;

View File

@ -1054,7 +1054,7 @@
/* Iterator points at first `ColorStop` of `ColorLine`. */
p = iterator->p;
color_stop->stop_offset = FT_NEXT_SHORT( p );
color_stop->stop_offset = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;
color_stop->color.palette_index = FT_NEXT_USHORT( p );