Bug 1568109
| Summary: | pcp-webapp-* packages render garbage fonts into PNG-based dashboards | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Paul Bransford <draeath> | ||||
| Component: | pcp | Assignee: | pcp-maint <pcp-maint> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-tools-bugs | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.5 | CC: | fche, lberk, mgoodwin, nathans | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcp-4.0.2 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-03-04 00:20:20 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
If it's easy, it would be handy to get an "strace -f" of the pmwebd process after a fresh startup, during its rendering of one such png. Here on f27, one can see a bunch of font-related configuration and data files being probed. The last ones, probably the ones most relevant to pmwebd are: /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf which come from dejavu-sans-fonts rpm. After the above test, would you be able to install just that RPM, restart pmwebd, and see if that fixes it? Thanks! I don't see references to that font on my strace, only `/usr/share/fonts/lyx/msam10.ttf` - incidentally, this is the font someone mentioned in Freenode ##linux when I asked if anyone recognized this failure mode. Fortunately, installing dejavu-sans-fonts fixed it! I'm not 100% on the logic of what font it selects, but it seems if it's expecting a particular font, it should be included as a package dependency. Else, something suitable should be elected as a dependency? Deja-Vu is a pretty nice and very glyph-inclusive font, and doesn't seem to have any undue dependencies - it would make a great suggestion for that. Thank you, Frank! (I can upload the strace output if you like) The code is not expecting a particular font, just anything that matches "sans" as far as Cairo is concerned. (No need for the strace report.) We recently added a dep on 'liberation-sans-fonts' to resolve a similar issue in pmchart (which is part of the pcp-gui package). Might be worth checking if those fonts resolve the pmwebd issue too, in the interests of avoiding pulling in another font package when chances are pcp-gui may already be installed too, along with the liberation-sans-fonts package. (In reply to Mark Goodwin from comment #5) > Might be worth checking if those fonts resolve the pmwebd issue too Hello Mark, I can confirm that liberation-sans-fonts does indeed also remedy this issue. (removed dejavu-*, installed liberation-sans-fonts, restarted pmwebd and confirmed legible text is rendered) (In reply to Frank Ch. Eigler from comment #4) > The code is not expecting a particular font, just anything that matches > "sans" as far as Cairo is concerned. (No need for the strace report.) Should a default font (or set of fonts) be depended on by the cairo libraries, rather than by those packages utilizing Cairo? I realize drawing text is only a subset of Cairo's functionality, but it doesn't hurt to raise the question, I hope. > Should a default font (or set of fonts) be depended on by the cairo libraries
Yeah, or freetype, which is a common solib of pmwebd and pmchart.
Fixed by rebase in 7.7. *** This bug has been marked as a duplicate of bug 1647308 *** |
Created attachment 1422686 [details] screenshot of grafana/graphite font rendering issue Description of problem: pcp-webapp-* web interfaces that use pre-rendered graphs (graphite, grafana using default-png.json) print garbage characters instead of readable labels. Version-Release number of selected component (if applicable): pcp-webapi-3.12.2-5.el7.x86_64 pcp-webjs-3.12.2-5.el7.noarch pcp-webapp-grafana-3.12.2-5.el7.noarch pcp-webapp-graphite-3.12.2-5.el7.noarch How reproducible: Always Steps to Reproduce: 1. `yum install -y pcp pcp-collector pcp-doc pcp-webapi pcp-webjs` 2. `systemctl start pmwebd` 3. browse to `host:44323` and select either "graphite", or "graphana png" demo dashboards. Actual results: Graphs draw lines/axis correctly, but text elements are not printed in a readable font. Screenshots attached. Expected results: Correct font rendering. Additional info: I have attempted to install various font packages (such as liberation-fonts), and in the case of graphite attempted changing the graph parameters to different font faces. Doing so did not change the results. I was unable to find upstream bugs possibly relating to this. I suspect missing fonts, but I'm not sure *what* fonts exactly. If this is indeed correct, a simple fix is to add the font as a package dependency.