[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master d7bdcb1 1/2: [sfnt] 'COLR' v1 PaintTranslate and Pain
From: |
Werner Lemberg |
Subject: |
[freetype2] master d7bdcb1 1/2: [sfnt] 'COLR' v1 PaintTranslate and PaintScale precision |
Date: |
Thu, 29 Jul 2021 02:00:38 -0400 (EDT) |
branch: master
commit d7bdcb1bb513ac1db99be7461e63f538f9c62293
Author: Dominik Röttsches <drott@chromium.org>
Commit: Werner Lemberg <wl@gnu.org>
[sfnt] 'COLR' v1 PaintTranslate and PaintScale precision
* src/sfnt/ttcolr.c (read_paint): Implement spec changes in
PaintTranslate and PaintScale and friends. Update parsing to read
new shorter values.
---
src/sfnt/ttcolr.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index bd478ab..ad305ac 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -566,8 +566,8 @@
apaint->u.translate.paint.p = child_table_p;
apaint->u.translate.paint.insert_root_transform = 0;
- apaint->u.translate.dx = FT_NEXT_LONG( p );
- apaint->u.translate.dy = FT_NEXT_LONG( p );
+ apaint->u.translate.dx = FT_NEXT_SHORT( p ) << 16;
+ apaint->u.translate.dy = FT_NEXT_SHORT( p ) << 16;
return 1;
}
@@ -585,14 +585,14 @@
apaint->u.scale.paint.insert_root_transform = 0;
/* All scale paints get at least one scale value. */
- apaint->u.scale.scale_x = FT_NEXT_LONG( p );
+ apaint->u.scale.scale_x = FT_NEXT_SHORT( p ) << 2;
/* Non-uniform ones read an extra y value. */
if ( apaint->format ==
FT_COLR_PAINTFORMAT_SCALE ||
(FT_PaintFormat_Internal)apaint->format ==
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_CENTER )
- apaint->u.scale.scale_y = FT_NEXT_LONG( p );
+ apaint->u.scale.scale_y = FT_NEXT_SHORT( p ) << 2;
else
apaint->u.scale.scale_y = apaint->u.scale.scale_x;
@@ -603,8 +603,8 @@
(FT_PaintFormat_Internal)apaint->format ==
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM_CENTER )
{
- apaint->u.scale.center_x = FT_NEXT_LONG ( p );
- apaint->u.scale.center_y = FT_NEXT_LONG ( p );
+ apaint->u.scale.center_x = FT_NEXT_SHORT ( p ) << 16;
+ apaint->u.scale.center_y = FT_NEXT_SHORT ( p ) << 16;
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master d7bdcb1 1/2: [sfnt] 'COLR' v1 PaintTranslate and PaintScale precision,
Werner Lemberg <=