> > On Tuesday 15 August 2006 16:35, anthony prieur wrote:
> > > Is there a way to enable the user to set the style of the font to
> > > Italic or Bold with DirectFB font rendering support ?
> > >
> > > Regards,
> > >
> > > Anthony Prieur
> > >
> > > _______________________________________________
> > >
> > >
> > hi athony,
> >
> > at first if the user decides to use a e.g. italic font or uses a bold font,
> > directfb does a correct rendering of those.
> >
> > is this what you wanted to know? or, do you ask how to set a
> > "normal" font to italic/bold or a combination of?
> >
> > regards
> > marcel
> >
>
> It seems to me that the only way to get Bold or Italic font in
> DirectFB is to use precompiled form.
> Would it be "an easy" way to implement it algorithmicly hardware
> accelerated in DirectFB ?
>
> For exemple here is a sample code (SDL TTF) for Bold style:
>
> for( row = dst->rows - 1; row >= 0; --row ) {
>    pixmap = (Uint8*) dst->buffer + row * dst->pitch;
>    for( offset=1; offset <= font->glyph_overhang; ++offset ) {
>     for( col = dst->width - 1; col > 0; --col ) {
>      pixel = (pixmap[col] + pixmap[col-1]);
>      if( pixel > NUM_GRAYS - 1 ) {
>       pixel = NUM_GRAYS - 1;
>      }
>      pixmap[col] = (Uint8) pixel;
>     }
>    }
>   }
>
>
> Regards,
>
> Anthony Prieur
>

Anyway the code used by SDL TTF is said to be : """a fake stretching
of the font that doesn't look good on many font type""" ...

Do efficient (and suitable for hardware implementation) algorithms for
Italic and Bold exist ?

Regards,

Anthony Prieur

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to