changeset 20874:b6d87b58754f

Partial fix for semitransparent glyph outlines. This fix removes semitransparent area (less then pixel width) between glyph and it's outline. Instead, it makes them overlap a little. It usually looks much better this way. Complete fix seems impossible with the current output format (single color alpha bitmaps). The right way is to blend both glyph and outline into one bitmap so that 2 pixels with 50% transparency produce a fully solid one. This requires RGBA bitmap output from libass.
author eugeni
date Mon, 13 Nov 2006 16:35:15 +0000
parents 8f0c616d7425
children ced1aa7b9e3d
files libass/ass_bitmap.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_bitmap.c	Mon Nov 13 16:18:05 2006 +0000
+++ b/libass/ass_bitmap.c	Mon Nov 13 16:35:15 2006 +0000
@@ -219,7 +219,7 @@
 			unsigned char c_g, c_o;
 			c_g = g[x];
 			c_o = o[x];
-			o[x] = (c_o > c_g) ? c_o - c_g : 0;
+			o[x] = (c_o > c_g) ? c_o : 0;
 			s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF;
 		}
 		g += bm_g->w;