*
* - linearised PDF, perhaps?
*
- * - compression of output files. For the actual text display,
- * both output formats currently average about 50-60 characters
- * per 5-6 character word of text, and almost all of it's the
- * same.
- * * In PS, we can define custom text operators to make things
- * more efficient.
- * * In PDF, there already are!
- *
* - I'm uncertain of whether I need to include a ToUnicode CMap
* in each of my font definitions in PDF. Currently things (by
* which I mean cut and paste out of acroread) seem to be
}
static void add_string_to_page(page_data *page, int x, int y,
- font_encoding *fe, int size, char *text)
+ font_encoding *fe, int size, char *text,
+ int width)
{
text_fragment *frag;
frag->fe = fe;
frag->fontsize = size;
frag->text = dupstr(text);
+ frag->width = width;
}
/*
if (!subfont || sf != subfont) {
if (subfont) {
text[textpos] = '\0';
- add_string_to_page(page, x, y, subfont, fontsize, text);
+ add_string_to_page(page, x, y, subfont, fontsize, text,
+ textwid);
x += textwid;
} else {
assert(textpos == 0);
if (textpos > 0) {
text[textpos] = '\0';
- add_string_to_page(page, x, y, subfont, fontsize, text);
+ add_string_to_page(page, x, y, subfont, fontsize, text, textwid);
x += textwid;
}