MAC fonts are not supported. If you can't use those fonts in a PC it won't work in iText.
Best Regards, Paulo Soares > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of sreeram rajagopalachari > Sent: Tuesday, July 06, 2004 9:15 AM > To: [EMAIL PROTECTED] > Subject: [iText-questions] reading of font file causing > divide by zero Java Exception > > Hi, > I am using ABD.ttf, arial.ttf, ariblk.ttf to add text > with each of > the fonts mentioned. ABD.ttf (Agenda Bold is a PC font) and > the other two > arial.ttf,ariblk.ttf are MAC fonts. While adding the text I > am getting the > following error: > > java.lang.ArithmeticException: / by zero at > com.lowagie.text.pdf.TrueTypeFont.readGlyphWidths at > com.lowagie.text.pdf.TrueTypeFont.process at > com.lowagie.text.pdf.TrueTypeFont. at com.lowagie.text.p > > I looking into the source code of TrueTypeFont class and > found that the > following line is the cause for error because head.unitsPerEm > is being > assigned to zero: > GlyphWidths[k] = (rf.readUnsignedShort() * 1000) / > head.unitsPerEm; > > ie., when the font file is read to retrieve unitsPerEm > in FontHeader > protected class it is reading the two required bytes as 0 in > the following > assignment: > head.unitsPerEm = rf.readUnsignedShort(); > > Can you please suggest me what might be the cause for this > error and how can > we correct it? Is this because the font file is corrupted? > > Thanks, > Raj. > > _________________________________________________________________ > Get FREE unlimited Citibank ATM transactions! > http://go.msnserver.com/IN/52040.asp Discover real-value banking here. > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
