Printing with the given font

A

Alex Chervinsky

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top