Re: Rendering Pango fonts with DirectFB only



On 01/07/2010 10:08 AM, Some Guy wrote:
This is what I ended up doing.  I see oddities with it in that the fonts
being drawn are quite large compared to those being drawn when using
directfb's drawString method.  I'm definitely loading the correct font
family.

The way I draw the text currently is by just rendering to a directfb
scratch surface and then blitting that to my primary display surface.  I

If you transform the bitmap, that would degrades the quality.

do the text rendering all within local space, so theres no transform
matrix or anything I need to apply - its when I blit tot he primary
surface that I apply transforms, but that code behaves as if I'm
blitting an image with some transform.

Any thoughts on why my fonts might be larger than expected?

Sure.  Pango font sizes are in points, not pixels.  Use:

  pango_cairo_context_set_resolution (context, 72.);

behdad

Thanks,

sb

On Wed, Jan 6, 2010 at 6:48 PM, Behdad Esfahbod <behdad behdad org
<mailto:behdad behdad org>> wrote:

    On 01/06/2010 11:24 AM, Some Guy wrote:

        Hello,

        I was wondering if there is a package out there that allows pango
        layouts to render to a DFB Surface without the use of GTK or
        Cairo.  DFB
        already knows how to draw FT2 fonts, but the user API is lacking and
        only has a DrawString method.

        Does anybody know of a library that pulls in Pango for the font
        layout
        but uses DFB as the renderer?  I saw there's some package out there
        called pango-directfb, but I don't see anything about it on the
        pango
        site or in the git tree.


    If you can get cairo-directfb working, you can then simply use
    pangocairo.

    behdad

        Thanks,

        sb




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