Forum Bugs

No Glyphs Fallback to "?"

scott_w
We are using the @font-face along with unicode ranges to manage how languages use fonts. So we might use something like this in the CSS:

/* Japanese */
@font-face {
font-family: "MS Mincho";
src: local("MS Mincho"), local("MS Mincho");
unicode-range: U+3000-9FFF, U+FF??;
}

/* Chinese Traditional */
@font-face {
font-family: "PMingLiU";
src: local("PMingLiU"), local("PMingLiU");
unicode-range: U+3000-9FFF, U+FF??;
}

When we run the job we get the following warnings, which we are OK with.
prince: Loading document...
prince: loading HTML input: ./Test.html
prince: Converting document...
prince: used font: Palatino ldsLat, Bold
prince: used font: Palatino ldsLat, Roman
prince: used font: DingPI ldsDpi, Dingbats & Pi
prince: used font: MS Mincho, Regular
prince: used font: PMingLiU, Regular
prince: warning: no glyphs for character U+9FB4, fallback to '?'
prince: warning: no glyphs for character U+9FB5, fallback to '?'
prince: warning: no glyphs for character U+9FB6, fallback to '?'
prince: warning: no glyphs for character U+9FB7, fallback to '?'
prince: warning: no glyphs for character U+9FB8, fallback to '?'
prince: warning: no glyphs for character U+9FB9, fallback to '?'
prince: warning: no glyphs for character U+9FBA, fallback to '?'
prince: warning: no glyphs for character U+9FBB, fallback to '?'
prince: warning: no glyphs for character U+9FBC, fallback to '?'
prince: warning: no glyphs for character U+9FBD, fallback to '?'
prince: warning: no glyphs for character U+9FBE, fallback to '?'
prince: warning: no glyphs for character U+9FBF, fallback to '?'
prince: warning: no glyphs for character U+9FC0, fallback to '?'
prince: warning: no glyphs for character U+9FC1, fallback to '?'
prince: warning: no glyphs for character U+9FC2, fallback to '?'
prince: warning: no glyphs for character U+9FC3, fallback to '?'
prince: warning: no glyphs for character U+9FC4, fallback to '?'
prince: warning: no glyphs for character U+9FC5, fallback to '?'
prince: warning: no glyphs for character U+9FC6, fallback to '?'
prince: warning: no glyphs for character U+9FC7, fallback to '?'
prince: warning: no glyphs for character U+9FC8, fallback to '?'
prince: warning: no glyphs for character U+9FC9, fallback to '?'
prince: warning: no glyphs for character U+9FCA, fallback to '?'
prince: warning: no glyphs for character U+9FCB, fallback to '?'
prince: warning: no glyphs for character U+9FCC, fallback to '?'
prince: warning: no glyphs for character U+9FCD, fallback to '?'
prince: warning: no glyphs for character U+9FCE, fallback to '?'
prince: warning: no glyphs for character U+9FCF, fallback to '?'
prince: Finished: success

What we are having problems with is that fact that the fallback character is a '?'. It should output the unicode character U+FFFD, which is called the Replacement Character. Is there a reason why? And if so can we change it somehow for our needs?
mikeday
Do you want to post-process the PDF files and do something with the missing characters? How should U+FFFD be rendered? Many fonts do not have a glyph for it, besides the implicit "missing glyph" box.
scott_w
We'd like to be able to override the default character "?" that is currently being put in and in our case have it output the FFFD character inserted instead. In our case all the fonts we produce have the FFFD character in them.. As we'd like to set the override in the CSS we create it would be our job to make sure a font has it in, otherwise have the current warning and glyph output in is fine.
mikeday
It seems that this won't be possible to implement for Prince 8.1. The glyph fallback mechanism is in a very performance-sensitive part of Prince, and it will take some work to make it more flexible without compromising speed. In the meantime, we could provide you with a customised Prince build that maps to U+FFFD only, instead of question mark. Would that help?