Page 1 of 1
Text kerning and sizing on different machines
Posted: Wed Nov 19, 2008 7:45 pm
by DCdenizen
I'm having issues with inconsistent text formatting in charts produced from the same excel vba code run on different installs of dplot. I'd set the formatting properties such that the graph text labels render fine on one install, but they are coming out garbled on a different computer.
The labels on the axes have a tiny inter-character spacing (kerning, I believe it's called), and the chart title is huge, such that most of it is cut off on either side of the chart. Also, the x-axis label is disabled in the good version, but is enabled in the garbled version, obscuring custom x-axis labels.
Do you know what's going on here? Have you experienced issues like this before? The dplot version that works fine is the very latest version, the one that has issues is two versions older, but I don't see anything in the revision history that would cause these issues.
Might it be an issue with screen resolution? I thought it might be due to a font incompatibility, but the font in the vba code used by both installs is set to Arial. Let me know if you have any thoughts.
Thanks!
Posted: Wed Nov 19, 2008 8:34 pm
by DPlotAdmin
Do you know what's going on here? Have you experienced issues like this before? The dplot version that works fine is the very latest version, the one that has issues is two versions older, but I don't see anything in the revision history that would cause these issues.
It isn't clear from your post, but I assume you're talking about saved bitmaps. If so, yes - the latest version contains a few corrections that will make a difference in bitmap images. If not, please let me know what you're talking about - output to the display, a printer, a metafile, or what?
Posted: Sat Nov 29, 2008 5:10 pm
by DCdenizen
The files it's outputting are png files. I've figured out the other issues, save for the trouble I'm having with the text sizing. The problem is that there is an enormous jump from size 9 font to size 10 font. Pretty self explanatory code, but is there a way to post the images?
The example plots and code:
Code: Select all
"[TextFont(2,9,700,0,0,0,0," & Chr$(34) & "Arial" & Chr$(34) & ")]"
"[TextFont(2,10,700,0,0,0,0," & Chr$(34) & "Arial" & Chr$(34) & ")]"
Posted: Sat Nov 29, 2008 5:31 pm
by DCdenizen
Also, it seems the problem with text 'kerning' was actually that the command to disable the automatically generated x-axis labels didn't work, thus overlaying the automatically generated labels with the custom x-axis labels. The following command:
...is no longer disabling dplots x-axis labels for me. Let me know if you need any further details. Thanks!
Posted: Sat Nov 29, 2008 5:34 pm
by DPlotAdmin
Pretty self explanatory code, but is there a way to post the images?
Not directly to the forums. If you have a web site then you can reference images stored there with Img tags.
You're of course welcome to send your saved images to me via e-mail.
If all other plot settings are the same then you shouldn't see a marked difference in size between a 9pt and 10pt font. If everything is
not the same then it is impossible to say - it's possible, for example, that your plot with the 9pt font is scaled down (including the 9pt font) to fit within the size you've specified, while the plot with the 10pt font isn't scaled down. If you'll send me the PNG's along with the exact commands you used to create the plots I'm sure that would be helpful.
Posted: Sat Nov 29, 2008 5:42 pm
by DPlotAdmin
[NumberFormat(0,12)] works as expected for me, and this isn't something I would have changed in a long while. If you're starting out with the Add-In examples it is possible that your number formatting selection is being overridden later. Most of the Add-In commands at some point call the function DPlotNumberFormat and subsequently add one or more [NumberFormat()] commands. You might want to make sure that your code isn't doing that, and that your [NumberFormat(0,12)] command is actually being sent.
Posted: Sat Nov 29, 2008 6:37 pm
by DCdenizen
Weird, so just to verify, when you use the following code:
Code: Select all
ret = DPlot_Command(0, "[NumberFormat(0,12)]")
...it successfully removes the labels from the x-axis?
I don't think it's a problem with the setting being overridden by the existing commands in the dplot helper add-in, as I can successfully change the NumberFormat to any setting from 0 to 9. However, dplot doesn't respond to any command I give it with a value greater than 9.
Posted: Sat Nov 29, 2008 8:01 pm
by DPlotAdmin
Weird, so just to verify, when you use the following code:
Code:
ret = DPlot_Command(0, "[NumberFormat(0,12)]")
...it successfully removes the labels from the x-axis?
Yes, that's correct. You are welcome to send your VBA code for me to look over. I can't imagine why one style would work but another would not. There's nothing in the code that evaluates the NumberFormat command that distinguishes between 1 and 2 digit numbers.