How to determine iTextSharp Basefont default style

barabum

New Member
I am creating a PDF using iTextSharp. Part of the process adds straightforward text to the PDF and another part creates an outline of the same text.For the straighforward text aspect I am using the ShowTextAligned method in iTextSharp; which requires a Basefont and has no way of setting the style. For the outline I am creating a GDI GraphicsPath to get points, which are then translated into PDF curves/lines etc. The AddString method requires a Drawing.FontStyleNow my issue is that I need to set the style of AddString to the same one being used by the BaseFont. I.E if the Basefont is rendering Regular, i need to set the AddString fontstyle to regularHow do I determine what style is being used by the BaseFont in ShowTextAligned?Further info:I have also tried using ColumnText; which allows you to set an iTextSharp Font, along with it's style. Though using this method results in a font that is rendered with the approximate style; I.E a font usually in regular and set to bold gives a slightly malformed bold font.
 
Back
Top