You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Jürgen Uhl <ju...@gmx.de> on 2016/08/05 10:20:10 UTC

Font problem

I'm having problems writing a pdf document from elements of a previously 
read document. Everything works fine, except when I call showText on a 
PDPageContentStream where I previously set the font with 
"out.setFont(textState.getFont(), textState.getFontSize())" (see the 
INFORMATION log) and the font is ComicSansMS or ArialBlack. "textState" 
is (a clone from) the state from the previously read document. Writing 
text with Helvetica or Times-Roman works fine.

INFORMATION: set font PDTrueTypeFont RXNQOL+ComicSansMS,Bold/18.0 embedded
SEVERE: error writing <w>U+0077 is not available in this font's 
encoding: built-in (TTF)

I suppose the problem may be caused by a missing hyphen or blank in the 
font name but have no clue how to fix this.

Any suggestions?
Thanks,
Juergen


Re: Font problem

Posted by John Hewson <jo...@jahewson.com>.
> On 5 Aug 2016, at 09:29, Tilman Hausherr <TH...@t-online.de> wrote:
> 
> Am 05.08.2016 um 12:20 schrieb Jürgen Uhl:
>> I'm having problems writing a pdf document from elements of a previously read document. Everything works fine, except when I call showText on a PDPageContentStream where I previously set the font with "out.setFont(textState.getFont(), textState.getFontSize())" (see the INFORMATION log) and the font is ComicSansMS or ArialBlack. "textState" is (a clone from) the state from the previously read document. Writing text with Helvetica or Times-Roman works fine.
>> 
>> INFORMATION: set font PDTrueTypeFont RXNQOL+ComicSansMS,Bold/18.0 embedded
>> SEVERE: error writing <w>U+0077 is not available in this font's encoding: built-in (TTF)
> 
> Most likely, the cause is that you're using a font subset. "RXNQOL+" means that it is a subset. So there is no easy solution.

Yes, U+0077 is the letter “w”, which is apparently not present in this particular font subset.

I’d recommend writing any new text using a new font created from a TTF file, not an existing font.
That way PDFBox will have access to all the characters you need.

— John

> Tilman
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Font problem

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 05.08.2016 um 12:20 schrieb J�rgen Uhl:
> I'm having problems writing a pdf document from elements of a 
> previously read document. Everything works fine, except when I call 
> showText on a PDPageContentStream where I previously set the font with 
> "out.setFont(textState.getFont(), textState.getFontSize())" (see the 
> INFORMATION log) and the font is ComicSansMS or ArialBlack. 
> "textState" is (a clone from) the state from the previously read 
> document. Writing text with Helvetica or Times-Roman works fine.
>
> INFORMATION: set font PDTrueTypeFont RXNQOL+ComicSansMS,Bold/18.0 
> embedded
> SEVERE: error writing <w>U+0077 is not available in this font's 
> encoding: built-in (TTF)

Most likely, the cause is that you're using a font subset. "RXNQOL+" 
means that it is a subset. So there is no easy solution.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org