Hi Werner,
I have nearly finished a patch for FontForge which will enable output
of compound bitmaps (EBDT format 8 and 9). When doing some tests
I noticed the support for this format is broken in the current Freetype
version: ftview either crashes on my test fonts or displays a garbage,
while everything works correctly in Windows. The problem is that the
main cycle in blit_sbit () (in ttsbit.c) makes too many iterations:
it actually needs the count of lines in the source bitmap rather than
in the target image.
I am attaching the patch which resolved the problem for me.
--
Regards,
Alexey Kryukov <anagnost at yandex dot ru>
Moscow State University
Historical Faculty
--- ttsbit.orig.c 2009-02-28 19:53:31.000000000 +0300
+++ ttsbit.c 2009-03-01 00:12:20.000000000 +0300
@@ -83,7 +83,8 @@
FT_Int line_bits,
FT_Bool byte_padded,
FT_Int x_offset,
- FT_Int y_offset )
+ FT_Int y_offset,
+ FT_Int source_height )
{
FT_Byte* line_buff;
FT_Int line_incr;
@@ -116,7 +117,7 @@
acc = 0; /* clear accumulator */
loaded = 0; /* no bits were loaded */
- for ( height = target->rows; height > 0; height-- )
+ for ( height = source_height; height > 0; height-- )
{
FT_Byte* cur = line_buff; /* current write cursor */
FT_Int count = line_bits; /* # of bits to extract per line */
@@ -1230,7 +1231,7 @@
/* the sbit blitter doesn't make a difference between pixmap */
/* depths. */
blit_sbit( map, (FT_Byte*)stream->cursor, line_bits, pad_bytes,
- x_offset * pix_bits, y_offset );
+ x_offset * pix_bits, y_offset, metrics->height );
FT_FRAME_EXIT();
}
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype