X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/dde3b9897b613b7321a506ae7b41a900080af747..e7d4c88fb39e6bada0a3e096bbb3670ba8f28bba:/bk_pdf.c diff --git a/bk_pdf.c b/bk_pdf.c index d75244d..a880872 100644 --- a/bk_pdf.c +++ b/bk_pdf.c @@ -209,7 +209,16 @@ void pdf_backend(paragraph *sourceform, keywordlist *keywords, "/Ordering(Identity)/Supplement 0>>\n"); objtext(cidfont, "/FontDescriptor "); objref(cidfont, fontdesc); - objtext(cidfont, ">>\n"); + objtext(cidfont, "\n/W[0["); + for (i = 0; i < sfnt_nglyphs(fe->font->info->fontfile); i++) { + char buf[20]; + double width; + width = find_width(fe->font, + sfnt_indextoglyph(fe->font->info->fontfile, i)); + sprintf(buf, "%g ", 1000.0 * width / FUNITS_PER_PT); + objtext(cidfont, buf); + } + objtext(cidfont, "]]>>\n"); } else { objtext(font, "/Subtype /Type1\n"); objtext(font, "\n/Encoding <<\n/Type /Encoding\n/Differences [");