sebpra Posted June 11, 2018 Share Posted June 11, 2018 Hi all, I generate reports where data might be in different languages. Until now I was OK using single Dejavu Sans font, but now I need to support Chinese language as well and Dejavu Sans font fails to represent Chinese glyphs. Is there a way dynamically switch font to a different one if default one cannot represent text correctly? I don't think 'locale' feature will help me as data for PDF report to fill comes from same internal system in different languages. P.S. I use XML as data source. I use jasper reports 5.5.1 and if I am right font subset feature was introduced only in 6.2.2. I would prefer avoiding upgrade if possible. To make sure PDF layout looks the same across the platforms I embed font to PDF. I would really appreciate any help or ideas how to solve this. I tried to go through the community but unfortunately couldn't find suitable solution. If I missed any, please excuse me for that. At the moment I have one possible option in my mind. Which is to check if field content glyph numbers(char converted to int) falls into font supported range and if not switch font. I haven't tested this idea yet but I have a feeling that this will increase generation time and load a lot if it is possible at all. By the way I tested MS Arial unicode font and this font does the job, unfotunately it is really expensive. Maybe you know good substitute for it? Link to comment Share on other sites More sharing options...
peter.w Posted June 13, 2018 Share Posted June 13, 2018 HiNot sure if you know about this or if it helps or not but I have used a font from here.http://www.unifont.org/fontguide/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now