Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The character on the graph looks clipped when using some mono font with new version of rrdgraph #1174

Open
k79e opened this issue Apr 18, 2022 · 2 comments

Comments

@k79e
Copy link

k79e commented Apr 18, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Just use the newest version 1.8.0 to generate graphs.
Using the font "WenQuanYi Micro Hei Mono"

Expected behavior
A clear and concise description of what you expected to happen.
It should not clipped

Screenshots
If applicable, add screenshots to help explain your problem.
The 'i' of min and the top of 120k is clipped
image

On the old version this is fine.
image

Desktop (please complete the following information):
Win7 x64

Additional context
Add any other context about the problem here.

@c72578
Copy link
Collaborator

c72578 commented Apr 26, 2022

@k79e Thanks for your report.
Could you please add the following information:

  • Which version of rrdtool are you using?
    rrdtool-1.8.0-bin-mingw64.zip
    rrdtool-1.8.0-x64_vcpkg.zip
  • What was the "old version"?
  • Please provide a minimal example to reproduce the issue, which contains the required steps:
    Create the rrd file; set an example font, which causes the issue; draw the graph

@k79e
Copy link
Author

k79e commented Apr 26, 2022

I think tried both mingw and vc version.
Old version is previous version RRDtool 1.7.2.

Create a test.bat with

@set rrdfile=e\:\test.rrd

@rrdtool graph e:\test.png --vertical-label "Network Data" ^
--title "1Min Network Traffic Stats" --width 600 --height 250 -s end-100min -S 60s -n DEFAULT:0:"WenQuanYi Micro Hei Mono" ^
DEF:in=%rrdfile%:in:LAST ^
DEF:out=%rrdfile%:in:LAST ^
VDEF:imax=in,MAXIMUM  ^
VDEF:omax=out,MAXIMUM  ^
VDEF:imin=in,MINIMUM  ^
VDEF:omin=out,MINIMUM ^
AREA:out#00ff00:"OUT" ^
GPRINT:out:LAST:"Current\: %%5.1lf %%sbytes/min", ^
GPRINT:omin:"Low\: %%5.1lf %%sB/min", ^
GPRINT:omax:"Max\: %%5.1lf %%sB/min" ^
COMMENT:"\l" ^
LINE1:in#086ae5:"IN" ^
GPRINT:in:LAST:" Current\: %%5.1lf %%sbytes/min", ^
GPRINT:imin:"Low\: %%5.1lf %%sB/min", ^
GPRINT:imax:"Max\: %%5.1lf %%sB/min" ^
COMMENT:"\l"

Create a test rrdfile

rrdtool create test.rrd -s60 DS:in:DERIVE:120:0:U ^
RRA:LAST:0:1:1440
rrdtool update test.rrd -t in N:3
rrdtool update test.rrd -t in N:1

use cmd go into the newest version.
run the test.bat file
And use previous version to run test.bat

The newest version generated graph
test

Previous version's
test

I tested arial font and can't trigger bug. So maybe only the mono font can cause problem.
You need the font here
https://sourceforge.net/projects/wqy/files/wqy-microhei/0.2.0-beta/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants