Evas fonts: Fix minor deviation in RLE font render
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 6 Jan 2015 10:15:07 +0000 (19:15 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 6 Jan 2015 10:41:10 +0000 (19:41 +0900)
commita90876c337422d2da918152b048a0dc0965295d5
treeccc4b57fe08defa719f165e0d19df8857781115c
parentc57fa54fc80f99cb36c1e1d3e4bf16c22ec2a969
Evas fonts: Fix minor deviation in RLE font render

So I've discovered some weird output values after drawing
some text. The destination alpha would become 0xFE even
when the back buffer had a background with 0xFF alpha.

Example:
Dest is 0xff00ff00 (green).
Color is 0xffffffff (white).
Current font alpha is 170 (0xaa).
--> Output was 0xFEaaFEaa instead of 0xFFaaFFaa.

This is because of some slightly invalid calculation
when doing the font masking (mtab[v] = 0x55 above).

Indeed, MUL_256 takes alpha values in the range [1-256]
and not [0-256] as was assumed.
src/lib/evas/common/evas_font_compress.c