Hi, first, JFreeReport already registers the fonts - you dont need to do this. Using the iText-FontFactory for registering the fonts will not have any effect at all (except that you create a memory leak, as the fonts there will never bee freed anymore). Second: Helvetica is *not*, *never*, *under no circumstances* Arial. And there is a huge difference between Arial and Arial Unicode MS. If you want to use Arial Unicode MS, you have do specify that font in the elements. If you dont specify a font at all, then Sans-Serif is used, which is mapped into Helvetica. According to the PDF standard, Helvetica does only support the Wester-European character sets - anyhing else will not work with Helvetica. Regards, Thomas. Hi,thank you so so much! I wanna know which 'fontname' and 'fontencoding' in support the chinese charactor,and what I will do in java code(I mean if it just need to config XML and do nothing in java code!) The part is right or not? Identity-H Identity-H true lazy true true true 1.5 Can you help me more much? Thomas.I have had a long time on this,but nothing i get! Hi, your report definition is buggy, unless there exists a font named 'UTF-8' on your system. The fontname should be the name of a valid TrueType font name (the same name you would use in your favourite word-processor, for instance). If you specify one of the built-in fonts, like sans-serif, serif or monospaced, then these fonts will be limited to the western-european charset (as defined in the PDF specs). The element's font-encoding can be omitted, as you already defined a sensible global default. Now I'll dive a bit into the config-properties: 'org.jfree.report.modules.output.pageable.pdf.Encoding' This specifies the default encoding for the PDF-output. The setting can be overridden on a per-element base using the 'font-encoding' attribute. Setting it th Identity-H enables the Unicode-mode (Identity-H is a PDF specific constant for the unicode mode and is defined by the PDF-specs and used by iText). 'org.jfree.report.modules.output.support.itext.Encoding' Defines, which font encoding should be used during the global font registration. This only affects iText's Type1 and Type3 font-registration. TrueType fonts get registered by LibFonts and do not require an encoding for the registration process anymore. 'org.jfree.report.modules.output.pageable.pdf.EmbedFonts' Configures the PDF font embedding. Some fonts have a license that forbids embedding, you will get a log message in these cases. This setting can also be activated on a per-element base. (If global embedding is enabled, all fonts will be embedded, no matter what the elements define.) 'org.jfree.report.modules.output.support.itext.AutoInit' Defines, whether and when the iText font registration takes place. The LibFonts font registration is always executed during the boot-up; but it is a lot faster than iText's code so usually you don't even notice that short delay. Whether fonts are initialized on boot or on first us of the font registry does not really matter, as long as the fonts are registered at all. Be aware that we use a different font registration mechanism than iText. IText's font reigstration will permanently consume the memory for the fonts used by the font registration or PDF output (and will never free it). If you have a lot of fonts, then you will run out of memory rather fast, if you use iText's FontFactory.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |