Changes

Jump to navigation Jump to search
679 bytes added ,  11:32, 23 December 2009
Issue with true type kerning
Line 383: Line 383:  
</language>
 
</language>
 
</source>
 
</source>
 +
 +
== Issue with true type kerning ==
 +
I've watched at your code to see any way to support True Type fonts with GRRLib... I've found an issue in your BlitGlyph function: if kerning is active every character may partially overlap with previous one, so writing transparents bits may delete part of previous character. Colored bits, instead, should never overlap, so it is better to just add an if:
 +
if (bitmap->buffer[ column + sywidth ]) {
 +
  p[ dstloc + 2 ] = (color & 0xFF);
 +
  p[ dstloc + 1 ] = ((color >> 8) & 0xFF);
 +
  p[ dstloc + 0 ] = ((color >> 16) & 0xFF);
 +
  p[ dstloc + 3 ] = (bitmap->buffer[ column + sywidth ]);
 +
}
 +
--[[User:Ciccio|Ciccio]] 09:32, 23 December 2009 (UTC)
94

edits

Navigation menu