On Sun, 2010-09-26 at 22:52 -0700, Jeremy Huddleston wrote:
> I filed this a while ago
> (https://bugs.freedesktop.org/show_bug.cgi?id=28803) for a user who
> reported it to me through XQuartz
> (http://xquartz.macosforge.org/trac/ticket/325) since I'm pretty
> clueless about a bunch of font magic.  Since I finally have time to
> work through my XQuartz queue, I thought I'd bring it up and hopefully
> make some progress...

Oh good, core fonts.  My favorite.

> You'll get:
> X Error of failed request:  BadValue (integer parameter out of range
> for
> operation)
>   Major opcode of failed request:  45 (X_OpenFont)
>   Value in failed request:  0x80000b
>   Serial number of failed request:  21
>   Current serial number in output stream:  22

The only obvious place I can see in the ProcOpenFont path where you
could get a BadValue out is in doOpenFont:

        err = (*fpe_functions[fpe->type].open_font)
            ((pointer) client, fpe, c->flags,
             c->fontname, c->fnamelen, FontFormat,
             BitmapFormatMaskByte |
             BitmapFormatMaskBit |
             BitmapFormatMaskImageRectangle |
             BitmapFormatMaskScanLinePad |
             BitmapFormatMaskScanLineUnit,
             c->fontid, &pfont, &alias,
             c->non_cachable_font && c->non_cachable_font->fpe == fpe ?
                 c->non_cachable_font :
                 (FontPtr)0);

So that ends up being FontFileOpenFont() in libXfont, then it's all a
maze of twisty passages.  Remember that font error types are different
from X error types, so we consult FontToXError() and discover that any
of BadFontPath, BadFontFormat, or BadCharRange could become BadValue.
As a first cut I'd hack FontToXError to have those all return different
things (something you can't otherwise generate like BadWindow and
BadPixmap for two of them should be enough), that should help us drill
down.

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to