freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] bug + fix pcf driver


From: Francesco Zappa Nardelli
Subject: [Devel] bug + fix pcf driver
Date: 08 May 2001 12:23:51 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.3

Hello.

I have fixed an annoying bug in the pcf driver.  The bitmap width was
incorrectly calculated, resulting in occasional bitmap corruption.
The bitmap corruption can be observed dealing with pcf font file
compiled under SunOs: they are ``one byte padded'', while Linux one
are ``four bytes padded''.  (OT: Could somebody tell me the correct
english expression for ``one byte padded''?)

Suggested ChangeLog:

FIX: pcf driver: the bitmap width was incorrectly calculated.

$ diff -u pcfdriver.c pcfdriverNew.c 
--- pcfdriver.c Tue May  8 12:09:52 2001
+++ pcfdriverNew.c      Tue May  8 12:05:35 2001
@@ -158,7 +158,7 @@
     metric = face->metrics + glyph_index;
   
     bitmap->rows       = metric->ascent + metric->descent;
-    bitmap->width      = metric->characterWidth;
+    bitmap->width      = metric->rightSideBearing - metric->leftSideBearing;
     bitmap->num_grays  = 1;
     bitmap->pixel_mode = ft_pixel_mode_mono;

The patch is attached.

Regards,
-francesco

Attachment: pcffix.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]