| Summary: | Changing or mapping fonts using fontsConfig.xml became impossible in BIRT 3.7 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Taras Kopets <tkopets> | ||||||||||||||
| Component: | BIRT | Assignee: | Wei Yan <wyan> | ||||||||||||||
| Status: | REOPENED --- | QA Contact: | Liwen Chen <lchen> | ||||||||||||||
| Severity: | critical | ||||||||||||||||
| Priority: | P3 | CC: | bluesoldier, djart, jeevandinesh, kamalbansal123, lchen, scott.bryden, tkopets, wyan, zqian | ||||||||||||||
| Version: | unspecified | ||||||||||||||||
| Target Milestone: | 4.4.0 | ||||||||||||||||
| Hardware: | All | ||||||||||||||||
| OS: | All | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Taras Kopets
This seems to be critical because out of the box BIRT font configuration does not handle correct Cyrillic output in PDF. Hi Taras, I tried to design a report:insert a label and set it as one Cyrillic font. Then I deploy birt runtime into Tomcat6. Run the report in pdf, the label shows the true type font effect. I'm using 3.7.2 nightly build. I will attach the report. Please try if you can still reproduce it. Created attachment 208836 [details]
report
Set as worksforme, if you still can reproduce it, please reopen it. Thanks. the topic of the bug is - user cannot change default fontConfig configuration beacuse it is bundeled in JAR file. Config file should not be put in a JAR file, it should be in a config folder or some kinds of places where user can edit it and save without any other effort. Reopen it. Good evening, I also acknowledge this bug, it is indeed very important for the users to edit the font configuration. Apart from Cyrillic, Greek (utf8) is also not handled correctly by the default BIRT configuration. I'm used to applying the following changes to fontsConfig_pdf.xml for BIRT prior to 3.7.x in order to get correct Greek PDF output (sorry for going a bit offtopic): * change the mapping (i.e. Times New Roman for serif and Arial for sans-serif, or some free proper truetype unicode font, such as DejaVu, Bitstream Vera, etc) * comment out all font families (Chinese, Korean, Japanese) except Western, inside the composite-font option. I've tested this on Linux, Windows and OSX enviroments, mainly using JBoss and BIRT runtime WebApp. I don't know why commenting out Asian families is required but if I don't do, something goes wrong with the PDF font embedding and no fonts gets embedded on the PDF, which is wrong. However, point is, we do need to access fontConfig_pdf.xml and modify it for several reasons. Another good example is for using msttcorefonts in a Linux environment, these fonts are not in a standard path, but usually something like /usr/share/fonts/truetype/msttcorefonts. I'm going to attach evidence for the above showcase, just to emphasize that the majority of non-Latin BIRT users will indeed need to modify fonts configuration at some point. I'll attach the same report attached by Liwen Chen, I've only added some Greek utf8 text under it. I'll also attach both PDFs, the wrong one from a vanilla BIRT 3.7.2 runtime environment (running in jboss 4.2.3) and the correct one using the BIRT 2.6.2 environment with customized font configuration. I'll also attach screenshots just in case. Sorry for the long post and thanks in advance for your attention. Created attachment 211983 [details]
plain report design carrying greek utf text
Created attachment 211984 [details]
fontconfig-greek-wrong.pdf
Wrong PDF file (and font embedding) generated by vanilla BIRT 3.7.2
Created attachment 211985 [details]
fontconfig-greek-wrong.png
Screenshot from 3.7.2 faulty greek pdf font embedding
Created attachment 211987 [details]
fontconfig-greek-correct.pdf
Correct PDF containing Greek text generated by BIRT 2.6.2 and customized font config
Created attachment 211989 [details]
fontconfig-greek-correct.png
Screenshot from Correct PDF containing Greek text generated by BIRT 2.6.2 and customized font config
To edit fontConfig users have to repackage the org.eclipse.birt.runtime_*.jar after each release. Is it possible to put these configuration files in easily editable place? Mark as fixed. see commit fa7c442ffc8f3a851124892d845030aea66fd10e. EngineConfig now has a setFontConfig() method to specify the extra font directory. It surely is not fixed. The bug is not about adding another font directory, it is about modifying the whole mapping and/or the whole font configuration. setFontConfig is used to override system font configuration. For example:
config.setFontConfig(new File("d:/config/font.xml").toURL());
>> setFontConfig is used to override system font configuration. For example:
>> config.setFontConfig(new File("d:/config/font.xml").toURL());
This is really great if now there is ability to change the font config location in packaged BIRT Viewer!
Can you please tell me where I have to put above mentioned line of code in packaged version of BIRT viewer in order to change location of config file?
Reopening this bug as there is still no ability to change font mapping/configuration in BIRT Viewer. When viewing Birt report from UI, we can see the barcode. But when try to view in PDF, the barcode will say "The resource of this report item is not reachable" when the protocol is https, but its working fine when its http is this resolved? |