Printing with the given font

From: Alex Chervinsky (sashko1_at_svitonline.com)
Date: 10/29/03


Date: 29 Oct 2003 06:52:15 -0800

Hello everybody!

  I am using VC++6.0.
  I want to print a text with the font OCRB, and with the symbol size
2.7 mm Height and 2.5 mm width. I use :

// 100 log units per mm for HIMETRIC mapping mode :
#define UNITS_IN_MM 100
    ...
    strcpy(logFont.lfFaceName, "OCRB");
    logFont.lfHeight = (int)( 2.7 * UNITS_IN_MM ); // =270
    logFont.lfWidth = (int)( 2.54 * UNITS_IN_MM ); // =254
    logFont.lfWeight = FW_NORMAL;

    CFont* pFont = new CFont();
    pFont->CreateFontIndirect(&logFont);
    CFont* oldFont = pPrintDC->SelectObject(pFont);
    ...

  When it have printed a text, I made the measuring. The text is wide
exactly as I set it - 25 mm for 10 symbols, but its height is only
about 2.2 mm :-(
  Then I try to set the lfHeight to 300 or even to 320, but the real
size does not change 8-|
  How to set correct size ? Or which values have I to set exactly in
this case ?
  
  Any information is greatly appreciated!
Best wishes!