summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2004-09-25 18:03:19 +0000
committerBen Harris <bjh21@bjh21.me.uk>2004-09-25 18:03:19 +0000
commitc5e2f10cde45ede485d174a0e521de8c0bc722ef (patch)
tree3e5b87ed8643f9b6bedc31a41e88fc1c5c155c26
parenta29935bd95b53a5dfa2fd3f7c7835311bad1452f (diff)
downloadhalibut-c5e2f10cde45ede485d174a0e521de8c0bc722ef.zip
halibut-c5e2f10cde45ede485d174a0e521de8c0bc722ef.tar.gz
halibut-c5e2f10cde45ede485d174a0e521de8c0bc722ef.tar.bz2
halibut-c5e2f10cde45ede485d174a0e521de8c0bc722ef.tar.xz
Don't bother overriding the metrics of PostScript fonts. If the metrics
we've got are wrong, things are going to look horrible either way, so we may as well apply minimal effort. [originally from svn r4580]
Diffstat (limited to '')
-rw-r--r--bk_ps.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/bk_ps.c b/bk_ps.c
index af7fde8..5409290 100644
--- a/bk_ps.c
+++ b/bk_ps.c
@@ -99,7 +99,7 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
fprintf(fp, "%%%%IncludeResource: font %s\n", fe->font->name);
/*
- * Re-encode and re-metric the fonts.
+ * Re-encode the fonts.
*/
font_index = 0;
for (fe = doc->fonts->head; fe; fe = fe->next) {
@@ -109,22 +109,14 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
sprintf(fname, "f%d", font_index++);
fe->name = dupstr(fname);
- fprintf(fp, "/%s findfont dup length 1 add dict begin\n",
- fe->font->name);
+ fprintf(fp, "/%s findfont dup length dict begin\n", fe->font->name);
fprintf(fp, "{1 index /FID ne {def} {pop pop} ifelse} forall\n");
fprintf(fp, "/Encoding [\n");
for (i = 0; i < 256; i++)
fprintf(fp, "/%s%c", fe->vector[i] ? fe->vector[i] : ".notdef",
i % 4 == 3 ? '\n' : ' ');
- fprintf(fp, "] def /Metrics 256 dict dup begin\n");
- for (i = 0; i < 256; i++) {
- if (fe->indices[i] >= 0) {
- double width = fe->font->widths[fe->indices[i]];
- fprintf(fp, "/%s %g def\n", fe->vector[i],
- 1000.0 * width / FUNITS_PER_PT);
- }
- }
- fprintf(fp, "end def currentdict end\n");
+ fprintf(fp, "] def\n");
+ fprintf(fp, "currentdict end\n");
fprintf(fp, "/fontname-%s exch definefont /%s exch def\n\n",
fe->name, fe->name);
}