[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The COLRv1 hook code (Re: FT_Bitmap and FT_BitmapGlyph life cycles)
From: |
Hin-Tak Leung |
Subject: |
The COLRv1 hook code (Re: FT_Bitmap and FT_BitmapGlyph life cycles) |
Date: |
Thu, 20 Jul 2023 04:52:36 +0000 (UTC) |
Perhaps it is easier just to show you what I have - this is already functional and I can even switch COLRv1 palettes in ftgrid (screenshots the usual place). Basically it works the same ways as svg hooks: the preset slot hook calculates the bound boxes, while the render hook actually draws to the bitmap.
In this case, I have a FT_Load_Glyph_Extended() which calls FT_Load_Glyph(), but also call FT_Get_Color_Glyph_ClipBox_Extended(), which is a skia routine which does FT_Get_Color_Glyph_ClipBox() but also if that fails, tries to union all the layers to calculate a skia bound box. I should convert back to override the FT_Load_Glyph() bound values but haven't (yet).
Then I have a "FT_Glyph_To_Bitmap_Extended()" which also calls "FT_Glyph_To_Bitmap()", but then overwrite and draws to its bitmap with skia before returning. I'd like to not call "FT_Glyph_To_Bitmap()" but just do 'FT_New_Glyph()' on my own, but that always crashes. why?
'...' and '...' are deleted parts too ugly that will hurt your eyes if you see them :-).
skia-colrv1-stub.cpp
Description: Text Data
- Re: COLRv1 to gray/alpha question (& color-blindness question), (continued)
FT_Bitmap and FT_BitmapGlyph life cycles (Re: COLRv1 to gray/alpha question (& color-blindness question), Hin-Tak Leung, 2023/07/19
Re: [MPEG-OTSPEC] COLRv1 to gray/alpha question (& color-blindness question), Laurence Penney, 2023/07/19
Re: COLRv1 to gray/alpha question (& color-blindness question), Alexei Podtelezhnikov, 2023/07/19