[cairo] Error Loading FreeType Glyphs
britten at caris.com
Thu Oct 30 10:21:13 PDT 2008
Bobby Salazar wrote:
> I am seeing a weird error using Cairo to render some text. It is sort
> of out of the blue, as I have been using pretty much the same code
> to render text for a very long time now. But all of a sudden I am
> seeing a condition where, depending on the width and height of the
> surface I render to, some characters disappear because FreeType
> returns an error. So drag-resizing a window causes the text to lose
> characters and gain them again with no obvious clues why.
[ snip ]
> One other thing I have noticed is that when I maximize the window,
> the rendered text actually shrinks in size even though I pass the
> same height to create the scaled font. This also seems to be
> completely random, some window sizes give correct looking text and
> some give text that looks slightly shrunk.
Now that I've reached the point of rendering text myself (to PDF),
I'm wondering if the problems you're seeing are related to the
problems that I'm seeing (See my "Text Rendering Questions" post
from the other day).
I didn't see any details in your post, but I'm using cairo 1.6.4
(And cairomm 1.6.0) with FreeType 2.3.7, on Linux (Mandriva 2008.1)
I'm in the process of trying to get to cairo 1.8.0 to test my code
with that version...
Some possible differences I have from you include:
- I never seem to have any glyphs missing - Just at the wrong size.
- I don't get any errors back from Cairo, but maybe Cairo is
falling back to something internally? I haven't stepped into
the Cairo code like you obviously have...
- I seem to be getting the wrong font sometimes too (Bold, Italic),
but that may be completely unrelated.
- Text randomly picking the wrong size (Usually smaller).
- Inconsistent results, especially when the zoom/scale is changed.
[ FWIW, I've already run my code (and Cairo) through Valgrind, but
it didn't report anything ]
Anyways, our problems may be completely unrelated, but I just
wanted to point it out, in case we're seeing the same thing...
More information about the cairo