Thread (8 messages) 8 messages, 3 authors, 2003-01-22
  • fonts · Geert Uytterhoeven <geert@linux-m68k.org> · 2003-01-11
  • Re: fonts · Geert Uytterhoeven <geert@linux-m68k.org> · 2003-01-11
  • Re: fonts · Antonino Daplas <hidden> · 2003-01-12
  • Re: fonts · Geert Uytterhoeven <geert@linux-m68k.org> · 2003-01-12
  • Re: fonts · James Simmons <hidden> · 2003-01-15
  • Re: fonts · Geert Uytterhoeven <geert@linux-m68k.org> · 2003-01-21
  • Re: fonts · Antonino Daplas <hidden> · 2003-01-21
  • Re: fonts · Geert Uytterhoeven <geert@linux-m68k.org> · 2003-01-22

Re: fonts

From: James Simmons <hidden>
Date: 2003-01-15 00:34:59

quoted
The cfb_imageblit() function exhibited the same behavior.  I think we
both made the wrong assumption that all monochrome bitmaps are packed. I
think the rule is:

    The first pixel on the next scanline is always at the next byte from
    the last pixel of the current scanline.  

So a 12x22 font has 16 bits per scanline but only 12 are usable, and the
last 4 are used as padding.  It's worse with a 4x6 fonts where the
4-bits are just duplicated in the other nibble.
Yes.
All the font data should be packed and byte padded at the end of each 
scanline worth of data. Also most accel engines expect the data to byte 
packed.
But that was not my problem. Currently accel_putcs() falls back to individual
character drawing if the fontwidth is not a multiple of 8, and reuses the same
struct fb_image for each call of fb_imageblit(). And since my fb_imageblit()
had a loop like `while (image->height--) { ... }' it failed. Not modifying the
passed struct fb_image fixed the problem. Yes, we need the const there :-)
I guess I need to change that in the next set of changes.



-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help