> On 3 Nov 2016, at 10:08, Tilman Hausherr <thaush...@t-online.de> wrote: > > Am 03.11.2016 um 10:11 schrieb Maruan Sahyoun: >> Hi, >> >> a very common issue on the mailing list as well as SO is the >> IllegalArgumentException people get if one tries to use a character with a >> font which has no support for that. Could we lower the requirement here to >> instead of throwing a exception use a replacement char and log a warning? >> Other ideas? >> >> I know that the current behaviour has been introduced to ensure a consistent >> PDF but it might be a little difficult to handle. > > Some thoughts about this: > > One aspect that wasn’t investigated (or I missed it) is that it didn't work > to find out whether the character is part of the font or not.
I’m not quite sure what you mean? Could you elaborate? > With document generation, I'd prefer having an exception instead of drawing a > default glyph. Or make it configurable. > > Lets say a company wants to create invoices. Its better to throw an exception > than to have clients see a name with a square in it. This looks very > unprofessional. I agree. There’s really no point having embedded fonts if those fonts don’t provide the necessary glyphs. > But what about a company that creates invoices all around the world. E.g. a > Chinese company that sells objects on the internet: it will have Chinese, > Japanese, Korean, Indian and US/EU customers. They need to find a way to > accomodate all of them. We could look at making some higher-level APIs to support automatic selection of fonts from a “pool” based on the script of the Unicode characters. Would work great with Google’s Noto fonts. — John > Tilman > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: dev-h...@pdfbox.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org