[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
wanted
> 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:
<code>
bool
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));
}
</code>
Along with these #defines:
<code>
#define GS_NO_GLYPH ((gs_glyph)0x7fffffff)
#if arch_sizeof_long > 4
# define GS_MIN_CID_GLYPH ((gs_glyph)0x80000000L)
#else
/* Avoid compiler warnings about signed/unsigned constants. */
# define GS_MIN_CID_GLYPH ((gs_glyph)~0x7fffffff)
#endif
#define GS_MIN_GLYPH_INDEX (GS_MIN_CID_GLYPH | (GS_MIN_CID_GLYPH >> 1))
#define GS_GLYPH_TAG (gs_glyph)(GS_MIN_CID_GLYPH | GS_MIN_GLYPH_INDEX)
#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
</code>
Perhaps this is the appropriate test for notdef?
- Re: [Swftools-common] missing characters in generated swf, (continued)
- Re: [Swftools-common] missing characters in generated swf, Jonas Petersson, 2009/03/08
- Re: [Swftools-common] missing characters in generated swf, Matthias Kramm, 2009/03/08
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/12
- Re: [Swftools-common] missing characters in generated swf, Matthias Kramm, 2009/03/13
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/16
- Re: [Swftools-common] missing characters in generated swf, Matthias Kramm, 2009/03/16
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/16
- Re: [Swftools-common] missing characters in generated swf, Matthias Kramm, 2009/03/17
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/17
- RE: [Swftools-common] missing characters in generated swf,
Goldstein, Seth <=
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/18
- RE: [Swftools-common] missing characters in generated swf, Goldstein, Seth, 2009/03/24