[Top][All Lists]

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

RE: [Swftools-common] missing characters in generated swf

From: Goldstein, Seth
Subject: RE: [Swftools-common] missing characters in generated swf
Date: Tue, 17 Mar 2009 09:09:15 -0500

> Very interesting.  Learning more about PDFs than I probably ever
> to. :)
> FYI - the PDF does render "correctly" with Ghostscript, so I'm sifting
> through their source code right now to see how they handle that glyph.
> But, there is a lot of code here, so if someone wants to lend another
> pair of eyes, I'd love the assistance!

So in the Ghostscript source code, we have this function here:

gs_font_glyph_is_notdef(gs_font_base *bfont, gs_glyph glyph)
    gs_const_string gnstr;

    if (glyph == gs_no_glyph)
        return false;
    if (glyph >= gs_min_cid_glyph)
        return (glyph == gs_min_cid_glyph);
    return (bfont->procs.glyph_name((gs_font *)bfont, glyph, &gnstr) >=
0 &&
            gnstr.size == 7 && !memcmp(gnstr.data, ".notdef", 7));

Along with these #defines:

#define GS_NO_GLYPH ((gs_glyph)0x7fffffff)
#if arch_sizeof_long > 4
#  define GS_MIN_CID_GLYPH ((gs_glyph)0x80000000L)
/* Avoid compiler warnings about signed/unsigned constants. */
#  define GS_MIN_CID_GLYPH ((gs_glyph)~0x7fffffff)
#define GS_MAX_GLYPH max_ulong
/* Backward compatibility */
#define gs_no_glyph GS_NO_GLYPH
#define gs_min_cid_glyph GS_MIN_CID_GLYPH
#define gs_max_glyph GS_MAX_GLYPH

Perhaps this is the appropriate test for notdef?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]