* * we need to parse the font to extract its metrics
* * then we pass the font bodily to both PS and PDF so it can
* be included in the output file
+ *
+ * - character substitution for better typography?
+ * * fi, fl, ffi, ffl ligatures
+ * * use real ellipsis rather than ...
+ * * a hyphen in a word by itself might prefer to be an en-dash
+ * * (Americans might even want a convenient way to use an
+ * em-dash)
+ * * DON'T DO ANY OF THE ABOVE WITHIN \c OR \cw!
+ * * substituting `minus' for `hyphen' in the standard encoding
+ * is probably preferable in Courier, though certainly not in
+ * the main text font
+ * * if I do do this lot, I'm rather inclined to at least try
+ * to think up a configurable way to do it so that Americans
+ * can do em-dash tricks without my intervention and other
+ * people can do other odd things too.
*/
#include <assert.h>
paper_idx *pi = (paper_idx *)entry->backend_data;
para_data *text, *pages;
+ if (!pi->words)
+ continue;
+
text = make_para_data(para_Normal, 0, 0,
conf->base_width - conf->index_colwidth,
NULL, NULL, entry->text, conf);
while (*str) {
glyph = font->bmp[*str];
- if (glyph == 0xFFFF)
+ if (glyph == 0xFFFF) {
+ str++;
continue; /* nothing more we can do here */
+ }
/*
* Find which subfont this character is going in.
* referenced by an index entry.
*/
case word_IndexRef:
- {
+ /*
+ * We don't create index references in contents entries.
+ */
+ if (!pdata->contents_entry) {
indextag *tag;
int i;