Try this:
BaseFont bf =
BaseFont.createFont("c:\\winnt\\fonts\\timesbi.ttf",
BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
Font font = new Font(bf, 60, Font.NORMAL, new
Color(255, 0, 0 ) );
Chunk ch = new Chunk("this is a phrase", font);
ck.setTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_STROKE, 2, Color.blue);
Phrase phrase5 = new Phrase(18, ch);
ColumnText.showTextAligned(cb, Element.ALIGN_LEFT,
phrase5, 100, 100 , 0);
Best Regards,
Paulo Soares
> -----Original Message-----
> From: wang yun [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 14:57
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] BOLDITALIC doesn't work with
> TEXT_RENDER_MODE_STROKE
>
> Dear Support,
>
> I try to use windows Fonts to draw stoke style.
> If I use Font.BOLDITALIC, TEXT_RENDER_MODE_STROKE
> doen't work. I need help.
>
> It works for FontFactory.HELVETICA.
>
> Here is my code. Thanks.
>
> yun
>
>
>
>
>
>
>
>
>
>
> //Chunk ch = new Chunk("this is a phrase",
> FontFactory.getFont(FontFactory.HELVETICA, 24,
> Font.BOLDITALIC, new Color(255, 0, 0)));
>
> BaseFont bf =
> BaseFont.createFont("c:\\winnt\\fonts\\timesbi.ttf",
> BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
>
> Font font = new Font(bf, 60, Font.BOLDITALIC, new
> Color(255, 0, 0 ) );
> Chunk ch = new Chunk("this is a phrase", font);
>
> //ch.setTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_STROKE,
> 2.0f, new Color(0, 0, 255) );
>
>
> Phrase phrase5 = new Phrase(18, ch);
> ColumnText.showTextAligned(cb, Element.ALIGN_LEFT,
> phrase5, 100, 100 , 0);
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions