However, in current project I have to be quite exact and had to define font height in milimeters.
I do it using Canvas.Font.Height:=round(X*MM.X), where X is required size in mm's and MM.X my pixels to milimeters conversion TPoint, obtained by:
- Code: Select all
PPP.Units:=mmHiMetric;
...
MM:=PPP.ConvertXY(10,10,mmLoMetric,mmHiMetric);
It works fine, all the dimensions are ok, BUT:
- when I use DirectPrint it prints exactly as it should
- when I don't use DirectPrint, and instead I use my preview form with printer settings and page print controls, all the fonts are printed (both on screen and printer) somehow stretched (readable, but it is obvious that something is wrong with distance between letters...)
I attached an image of this cases.
When using Canvas.Font.Height:=-round(X*MM.X), things get better, but all heights are little higher than expected, so I have to recalculate and fix all height settings in my code to get proper result.
Any suggestions how to make it work properly (getting the same display/print without DirectPrint as I get print with DirectPrint)?