Thanks for reply. I've solve the problem, please see http://www.nabble.com/forum/ViewPost.jtp?post=16697572&framed=y
I didn't point to any directory specially, but instead used registerDirectories() Paulo Soares wrote: > > What path are you using in linux to get the font file? > Is there a font file in that path? > Do you have access permissions to that font file? > Can you read the font file to a byte array and create the font from > that? > > Paulo > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of nanotime >> Sent: Monday, April 14, 2008 2:05 PM >> To: itext-questions@lists.sourceforge.net >> Subject: [iText-questions] "Arial Unicode MS" and >> FontFactory.registerDirectories() >> >> >> I'm using itext for creating PDF file with Unicode encoding. >> My workstation is Windows Vista, so I create fonts using this >> construction: >> >> -------------------------- >> BaseFont arialUnicode = >> BaseFont.createFont("C:\\Windows\\Fonts\\arialuni.ttf", >> BaseFont.IDENTITY_H, >> BaseFont.EMBEDDED); >> -------------------------- >> >> Then i moved to linux and therefore expirienced exception - >> can't find font >> >> I searched API and docs and found FontFactory.registerDirectories() >> After invocation of this method I'm printing out all >> registered fonts using >> code (all next code snippets run under Windows Vista): >> >> -------------------------- >> Set fonts = FontFactory.getRegisteredFonts(); >> for (Object font : fonts) { >> System.out.println(font); >> } >> -------------------------- >> >> that prints a lot of font names, and also "arialunicodems" and "arial >> unicode ms". >> >> I then tried both of them to pass into BaseFont.createFont() >> using code: >> >> -------------------------- >> BaseFont arialUnicode = BaseFont.createFont("arialunicodems", >> BaseFont.IDENTITY_H, BaseFont.EMBEDDED); >> -------------------------- >> >> , but that code throws an exception: >> >> -------------------------- >> Exception in thread "main" com.lowagie.text.DocumentException: Font >> 'arialunicodems' with 'Identity-H' is not recognized >> -------------------------- >> >> Once generated on Linux, PDF file should open (and unicode >> text should not >> be broken) on other Windows machines. >> What am I doing wrong and how can I make the program to work >> on both Windows >> and Linux? (suppose I can copy ARIALUNI.TTF on Linux) > > > 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. > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > 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 > -- View this message in context: http://www.nabble.com/%22Arial-Unicode-MS%22-and-FontFactory.registerDirectories%28%29-tp16677449p16697688.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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