Re: pango/true type font rendering



On Thu, 29 Nov 2001, Malcolm wrote:

> 
> I hope this is the right place to ask some (hopefully not too
> dumb) questions...
> 
> I am currently trying to use pango to display ttf's into a simple
> bitmap (256 colour for now) for use in an embedded app I am working
> on. (It seems to provide a lot of the facilities I am looking for
> without having to mess with ft2 directly).
> 
> However, I am having a few problems with it. Currently the
> largest one is that the rendering quality is abysmal. Even at very
> large point sizes, I get a lot of visible artifacts, at smaller
> ones (anything below about 16pt on a 75dpi ft2 context) it becomes
> completely illegible.

Can you post a screenshot of this? What fonts do you use?
 
> The example (pango-viewer) works fine and renders clearly readable
> and clean text, so my install seems to be sane.

pango-viewer doesn't use pangoft2 though.
 
> What I am doing:
> 
> creating a 256 greyscale FT_bitmap
> getting a 75dpi ft2 context
> building a layout with an appropriate font and some sample text
> using pango_ft2_render_layout to render the text into the bitmap.
> assuming the render uses a linear greyscale.
> (actual test code available if it will help).

The test code would be nice.

> Is there something obvious that I am missing here? Or a better way
> of acheiving what I am trying to do?

No, it sounds fine.
 
> As far as I can tell, there is no colour support for ttfs, they are
> greyscale rendered and coloring is up to the app level. (Though there
> are color tags in the markup). Have I missed something there too?

They are not grayscale. The pixel info it the transparency value.

/ Alex





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