Arrowx7 wrote:
> Hello,
> I was working on a PDF with iText, and I added my own font like this:
> BaseFont purisa = BaseFont.createFont("/home/garden/Purisa.ttf",
> BaseFont.CP1252, BaseFont.NOT_EMBEDDED);Correction: you didn't add your own font. You told the PDF you want the viewer to use Purisa.ttf, but that's only possible if the viewer is able to find that font. > The PDF looked exactly as expected, but when I loaded it on a windows or Mac > machine, the font is different (i.e. I don't think that font is available on > Windows or Mac). Exactly! You didn't embed the font, so if Purisa.ttf isn't found by the viewer, the viewer has the liberty of replacing the font by any other font it seems fit. > Is there a way ensure font consistency across different > OS's? Yes, embed the font. Replace BaseFont.NOT_EMBEDDED with BaseFont.EMBEDDED > Is there a way that I can turn the font into graphs with iText so > it'll be consistent? Yes, but that's a bad idea, so I'm not going to tell you how to do that unless you really, really need it (I think you don't). Please subscribe to the mailing list if you have any further questions; do not reply to me personally. br, Bruno ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
