I forward it to the mailing list.

Paulo

> -----Original Message-----
> From: Lidong Liu [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 21, 2006 2:51 PM
> To: itext-questions@lists.sourceforge.net; Paulo Soares
> Subject: iText rtf font
> 
> Hi iText developer,
> 
> Thank you very much for your excellent work on iText, which 
> gives me a lot of help!
> 
> Here is a work around to use fonts with names in Asian 
> encodings in RTF documents. Wish it can be merged in to main source: 
> 
> #######################
> # DIFF START
> #######################
> Index: D:/Devt/itext/src/com/lowagie/text/rtf/style/RtfFont.java
> ===================================================================
> --- D:/Devt/itext/src/com/lowagie/text/rtf/style/RtfFont.java 
>    (revision 2) 
> +++ D:/Devt/itext/src/com/lowagie/text/rtf/style/RtfFont.java 
>    (revision 4)
> @@ -248,6 +248,11 @@
>          this.fontName = fontName;
>      }
>      
> +    public RtfFont(String fontName, float size, int style, 
> Color color, int charset) { 
> +        this(fontName, size, style, color);
> +        this.charset = charset;
> +    }
> +    
>      /**
>       * Special constructor for the default font
>       *
> @@ -270,6 +275,7 @@
>          if(font != null) { 
>              if(font instanceof RtfFont) {
>                  this.fontName = ((RtfFont) font).getFontName();
> +                this.charset = ((RtfFont) font).getCharset();
>              } else {
>                  setToDefaultFamily( font.getFamilyname());
>              }
> @@ -574,6 +580,14 @@
>          super.setStyle(style);
>          fontStyle = style();
>      }
> +    
> +    public int getCharset() {
> +        return charset;
> +    } 
> +    
> +    public void setCharset(int charset) {
> +        this.charset = charset;
> +    }
>  
>      /**
>       * Gets the font number of this RtfFont
> #######################
> # DIFF END
> #######################
> 
> 
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to