Printing with the given font

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Chervinsky

    Printing with the given font

    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.lfHeigh t = (int)( 2.7 * UNITS_IN_MM ); // =270
    logFont.lfWidth = (int)( 2.54 * UNITS_IN_MM ); // =254
    logFont.lfWeigh t = FW_NORMAL;

    CFont* pFont = new CFont();
    pFont->CreateFontIndi rect(&logFont);
    CFont* oldFont = pPrintDC->SelectObject(p Font);
    ...

    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!
  • Victor Bazarov

    #2
    Re: Printing with the given font

    "Alex Chervinsky" <sashko1@sviton line.com> wrote...[color=blue]
    > 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 :[/color]
    [...]

    Wrong newsgroup. Please go to microsoft.publi c.vc.language or
    comp.os.ms-windows.program mer.

    Victor


    Comment

    Working...