Does MM_LOMETRIC Mapper mode work properly on every printer?

I've created font (CreateFontIndirect)
with font mapper mode set to MM_LOMETRIC
(lf.Height member of LOGFONT structure set to 50), then printed some text.
But it's not the same on every printer,
on Cannon BJC-250(under Windows 95) it's 5 milimeters and that's OK, but on HP 690(under Windows 98) it's only 3 mm high and on some laser printers(under Windows NT) it's even smaller.
Whos fault is it?:
- printer(does DPI matter?)
- system(does font mapper work diferent under diferent systems)
- compiler(I'm using Delphi 2)
Thanks, Ziolko  
LVL 21
Who is Participating?
intheConnect With a Mentor Commented:
it is the printer drivers fault,
if you tried it on the same 2-3 printers on different systems it will be one size but try it on different printers on same system and will be differnt size..this can also be common with even printing a simple richedit etc.apart from upgrading latest printer drivers etc ther isnt much you can do.
ps you can try calling this before printing to set the pixelsper inch.:

procedure SetPixelsPer;
      finch,f : longint;
      mmv: integer;
      pixv : integer;
      case GetMapMode(printer.canvas.handle) of
        MM_HIMETRIC, MM_ISOTROPIC, MM_ANISOTROPIC: FInch := 2540;         MM_HIENGLISH: FInch := 1000;
        MM_LOMETRIC: FInch := 254;
        MM_LOENGLISH: FInch := 100;
          mmv := GetDeviceCaps(printer.canvas.handle,VERTSIZE);           pixv := GetDeviceCaps(printer.canvas.handle,VERTRES);           FInch := round(pixv / (mmv/25.4));
        MM_TWIPS: FInch := 1440;
      else ShowMessageBox('Unknown printer resolution.  Unable to
verify font size.');
Printer.Canvas.Font.PixelsPerInch := Finch;


SetMapMode( printer.canvas.handle, MM_ANISOTROPIC );
SetWindowExtEx(printer.canvas.handle,GetDeviceCaps(canvas.handle, LOGPIXELSX),GetDeviceCaps(canvas.handle, LOGPIXELSY),Nil);
SetViewportExtEx(printer.canvas.handle,GetDeviceCaps(printer.canvas.handle, LOGPIXELSX),GetDeviceCaps(printer.canvas.handle, LOGPIXELSY),Nil);
This artificially reduces the printer resolution to the screen resolution
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.