06-03-2002, 10:45 PM
How can I use other fonts when I preview the document?
I try to modified the report1.xml by changing the font-name to Cordia New(jdk1.4 supported) and I don't know why it doesn't work.
And I thought it possible from character encoding , if I put the data (may be Thai font) into report1.xml(<reportheader>) .
It doesn't work but if I put Thai font into the SampleData1.java , it OK.
Then If anyone have any comments please give me the solution
06-04-2002, 07:36 AM
Setting the fontname as you did, should do the job. Before we start: which release are you using? The 0.7.2 download version or from cvs?
Second question? Does your font fully support the unicode encoding? Most fonts do not implement all characters, unsupported characters mostly show up as weird or missing chars.
To check how your data is encoded try to create a char array and get the raw unicode 16-bit values. When you have them, you can lookup the current encoding using the unicode website (www.unicode.org). They have all known unicode characters listed there.
How did you try to add the data into the report header (the not working try)?
Just as a reminder: static data can only be placed into labels, everything else gets ignored by the parser, you won't see any warnings or error messages, as long as you haven't enabled validation in JAXP.
It can be helpfull to imagine the report definition as a complex stamp/template, which gets filled during the reporting process. Additionally only elements are printed, if it is not an element, you won't see it in the result. Simply writing text into the header and adding elements to the text like it could be done in HTML and its formular fields, is not possible with this parser.
Not a solution, not a comment, but maybe this is a hint. If you have more questions, just ask and we get closer to a solution at all.
Have more fun,