>> OK.  How would an API look like?
> 
> FT_Library_SetGamma would initialize two 256-byte lookup tables in
> FT_LibraryRec so that instead of power functions we could do
> library->gamma[red].

I guess this not necessarily a public API, right?

> FT_Blend_Glyph( FT_Bitmap    target,
>                 FT_GyphSlot  source,
>                 FT_Color     color,
>                 FT_Vector    topleft )
> 
> target must be FT_PIXEL_MODE_BGRA

OK, thanks.  I'll start moving the current code to such a new
function.  Let's first set up everything so that I can finally see
colored glyph layers in `ftview' :-) We can then improve the code,
also adjusting the API if necessary.

> source must be FT_GLYPH_FORMAT_BITMAP

Why?  I don't see a necessity for this restriction.  As mentioned in
my last e-mail, BGRA bitmaps should be handled the same, so I think we
should allow bitmap objects also.

> If topleft is not rounded, we can try to blend with a subpixel
> shift.  You can start from any target but you need to blend layers
> sequentially.

OK.


    Werner

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to