X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/e7d4c88fb39e6bada0a3e096bbb3670ba8f28bba..bb8bfd66192edaa49a708795754a0ac60bfd5868:/in_sfnt.c diff --git a/in_sfnt.c b/in_sfnt.c index 9718425..b33a2a1 100644 --- a/in_sfnt.c +++ b/in_sfnt.c @@ -806,46 +806,6 @@ void sfnt_writeps(font_info const *fi, FILE *ofp) { fprintf(ofp, "end /%s exch definefont\n", fi->name); } -void sfnt_cmap(font_encoding *fe, object *cmap) { - unsigned i; - - objtext(cmap, "<name); - objtext(cmap, "\n/CIDSystemInfo<>\n"); - objstream(cmap, "%!PS-Adobe-3.0 Resource-CMap\n" - "%%DocumentNeededResources: procset CIDInit\n" - "%%IncludeResource: procset CIDInit\n" - "%%BeginResource: CMap "); - objstream(cmap, fe->name); - objstream(cmap, "\n%%Title ("); - objstream(cmap, fe->name); - objstream(cmap, " Adobe Identity 0)\n%%Version: 1\n%%EndComments\n"); - objstream(cmap, "/CIDInit/ProcSet findresource begin\n"); - objstream(cmap, "12 dict begin begincmap\n"); - objstream(cmap, "/CIDSystemInfo 3 dict dup begin\n" - "/Registry(Adobe)def/Ordering(Identity)def/Supplement 0 def " - "end def\n"); - objstream(cmap, "/CMapName/"); - objstream(cmap, fe->name); - objstream(cmap, " def/CMapType 0 def/WMode 0 def\n"); - objstream(cmap, "1 begincodespacerange<00>endcodespacerange\n"); - for (i = 0; i < 256; i++) { - char buf[20]; - if (fe->vector[i] == NOGLYPH) - continue; - objstream(cmap, "1 begincidchar"); - sprintf(buf, "<%02X>", i); - objstream(cmap, buf); - sprintf(buf, "%hu", sfnt_glyphtoindex(fe->font->info->fontfile, - fe->vector[i])); - objstream(cmap, buf); - objstream(cmap, " endcidchar\n"); - } - objstream(cmap, "endcmap CMapName currentdict /CMap defineresource pop " - "end end\n%%EndResource\n%%EOF\n"); -} - void sfnt_data(font_info *fi, char **bufp, size_t *lenp) { sfnt *sf = fi->fontfile; *bufp = sf->data;