Hi Paulo

Thank you for your answer, but could you give me some more hints?

"Paulo Soares" <[EMAIL PROTECTED]> wrote on 22.09.2005 16:04:35:

> PdfGraphics2D doesn't do automatic font substitution. If it's just
> Symbol it will work if you register it in DefaultFontMapper with the
> encoding name "Symbol". 

I use:
      DefaultFontMapper mapper = new DefaultFontMapper();
        mapper.insertDirectory("D:/path/to/fonts");
        mapper.insertDirectory("D:/path/to/standardfonts");

Where Symbol and ZapfDingbats are in "D:/path/to/standardfonts" as 
PS-type1-fonts.

Then I use a normal Graphics2D object to define a graph (really I also 
want to use JFreeChart to produce a graph in a Graphics2D object). With 
iText, I finally want to produce a pdf-file with a graph. When I have an 
attributed string using the Symbol-font, the characters display as 
expected, when I use a normal string, the characters are missing. A 
similar problem is there with the ZapfDingbats font.
 
> > Subject: [iText-questions] charactercodes in Symbol font
> > 
> > Hi all
> > 
> > I encountered a problem with the charactercodes and the Symbol font 
> > (PS-Type1 Symbol). I did my tests on Windows XP with SUNs Java SDK 
> > 1.4.2._06 and iText 1.3 (based on itext-paulo-153).
> > I use PdfGraphics2D to produce a pdf-file from a Graphics2D 
> > object. I want 
> > to print some text using the Symbol font. As an example, I 
> > use the string 
> > "Hello\u03A9\u0398\u22A5" which includes three Unicode-values 
> > for Greek 
> > characters which are included in the Symbol font. When I 
> > directly use this 
> > string in drawString(), the characters which are defined with their 
> > unicode-values are not displayed, but the normal characters 
> > 'Hello' are 
> > displayed with Greek characters. When I use an 
> > attributedString() and set 
> > the font to Symbol with addAttribute() and draw it with an 
> > attributedCharacterIterator the characters 'Hello' are not 
> > displayed and 
> > the characters defined by their unicode-value are correctly 
> > displayed as 
> > expected.
> > 
> > Any idea what goes wrong here?

Regards
Matthias Dillier


This message is for information purposes only. It may not be secure or 
error-free.
The Swiss National Bank does not accept legal responsibility for any 
consequences resulting from e-mail use.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to