Re: Rendering Pango fonts with DirectFB only
- From: Some Guy <teknosoul gmail com>
- To: Behdad Esfahbod <behdad behdad org>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Rendering Pango fonts with DirectFB only
- Date: Thu, 7 Jan 2010 11:21:23 -0500
On Thu, Jan 7, 2010 at 10:41 AM, Behdad Esfahbod
<behdad behdad org> wrote:
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.
Yea I know... I'm just doing it right now since in our history, we've found text rendering expensive on the lower end platforms so we cache it when we can. We may pull a few tricks out, but I don't want to be using cairo-dfb for all rendering since we saw performance issues with it and some devs on the cairo chans don't even think it's implemented properly. It's still experimental, so I don't want to rely on it too much.
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.);
Thank you very much - this fixed me up.
sb
behdad
<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]