shithub: freetype+ttf2subf

Download patch

ref: 0589f6e6ee6e9bfe0c7139374fc8812e849e7bf7
parent: db7c4060840c1e6b657e8a0fd8b449ba0968d0a3
author: Werner Lemberg <[email protected]>
date: Wed May 30 20:34:38 EDT 2018

[sfnt] Get colors from `CPAL' table in right order (#54015).

* src/sfnt/ttcolr.c (tt_face_find_color): Fix it.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-05-31  Werner Lemberg  <[email protected]>
+
+	[sfnt] Get colors from `CPAL' table in right order (#54015).
+
+	* src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
+
 2018-05-30  Werner Lemberg  <[email protected]>
 
 	ftcolor.h: Improve API design, fix typos (#54011, #54014).
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -384,9 +384,9 @@
 
     p = cpal->colors + color_offset + COLOR_SIZE * color_index;
 
-    *red   = FT_NEXT_BYTE( p );
-    *green = FT_NEXT_BYTE( p );
     *blue  = FT_NEXT_BYTE( p );
+    *green = FT_NEXT_BYTE( p );
+    *red   = FT_NEXT_BYTE( p );
     *alpha = FT_NEXT_BYTE( p );
 
     return 1;