Re: Pango Perf & Basic QnA
- From: Behdad Esfahbod <behdad behdad org>
- To: Jason Talley <jbtalley98 gmail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Pango Perf & Basic QnA
- Date: Wed, 12 May 2010 14:49:23 -0400
On 04/28/2010 12:14 PM, Jason Talley wrote:
> 1 - Currently, I'm not doing anything w/ a fontmap/font_description.
> Is there something I need to do to load the fonts, cache, etc that
> might help this issue? Thus far, I've not had to do anything beyond
> build/install fontconfig. Maybe thats the sign of a good library,
> but...
Is your fontconfig cache uptodate?
> 2 - Is the expected way to handle things to keep a context around for
> the life of the text? Our old system (non international friendly)
> used FT to simply render each glyph on the fly as needed. A page that
> once rendered in milliseconds now takes tens of seconds when using the
> above function for each block of text.
That doesn't sound right. You are only expected to keep a fontmap around.
That said, I highly recommend switching over to pangocairo. pangoft2 is not
maintained anymore.
> 3 - what is the purpose of the fontmap?
It abstracts and caches the fonts available on your system.
> 4 - what's the life expectancy of a layout? Of a context?
The layout does caching as long as the text and attributes don't change.
However, note that you are expected to pass paragraph at a time to
PangoLayout. If you do that for each glyph, that's definitely not the way
it's supposed to be done.
behdad
> I can't really fault our drawing engine as the same page loads quickly
> when simply rendering w/ FT (a la FT_Load_Glyph)
>
> Apologies for html text -- I'll look for a gmail setting to disable.
>
> Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]