diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2007-02-10 12:33:56 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2007-02-10 12:33:56 +0000 |
| commit | 7d287800e5a5bcdf0d4d38679ff7980ce8c18250 (patch) | |
| tree | d9171fa7beb13a40f36ffb192cd7d5bdde55cf92 /in_sfnt.c | |
| parent | a0a77360d18d8207cbd67bb00297553fe90bc43a (diff) | |
| download | halibut-7d287800e5a5bcdf0d4d38679ff7980ce8c18250.zip halibut-7d287800e5a5bcdf0d4d38679ff7980ce8c18250.tar.gz halibut-7d287800e5a5bcdf0d4d38679ff7980ce8c18250.tar.bz2 halibut-7d287800e5a5bcdf0d4d38679ff7980ce8c18250.tar.xz | |
Generate a "W" array for CIDFonts, since acroread seems to do very silly
things without one.
[originally from svn r7261]
Diffstat (limited to 'in_sfnt.c')
| -rw-r--r-- | in_sfnt.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -349,7 +349,6 @@ typedef struct { unsigned short index; } glyphmap; -typedef struct sfnt_Tag sfnt; struct sfnt_Tag { void *data; size_t len; @@ -497,11 +496,15 @@ static void sfnt_mapglyphs(font_info *fi) { glyphsbyname_cmp); } -static glyph sfnt_indextoglyph(sfnt *sf, unsigned short idx) { +glyph sfnt_indextoglyph(sfnt *sf, unsigned idx) { return sf->glyphsbyindex[idx]; } -static unsigned short sfnt_glyphtoindex(sfnt *sf, glyph g) { +unsigned sfnt_nglyphs(sfnt *sf) { + return sf->nglyphs; +} + +unsigned sfnt_glyphtoindex(sfnt *sf, glyph g) { cmp_glyphsbyindex = sf->glyphsbyindex; return *(unsigned short *)bsearch(&g, sf->glyphsbyname, sf->nglyphs, sizeof(*sf->glyphsbyname), |