473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.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!
Jul 19 '05 #1
1 2701
"Alex Chervinsky" <sa*****@svitonline.com> wrote...
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 :

[...]

Wrong newsgroup. Please go to microsoft.public.vc.language or
comp.os.ms-windows.programmer.

Victor
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print...
16
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style...
11
by: Curious Angel | last post by:
Hi, I have a version of my resume that is (almost) web ready and I'm pleased with its appearance on the screen (well, sort of heh heh, it's my first HTML). I also created a tighter, scaled-down...
5
by: Mr. B | last post by:
This is driving me NUTZ!!! I've been screwing around on this for a week now. And I have tried to find examples similar to what I have (nada). Got lots of streaming a TXT file... bah! I am...
6
by: Roger Shrubber | last post by:
I know HTML was never designed to be WYSIWYG, but with CSS, there is much greater control over coordinates and dimensions. So I would expect that a specific piece of text, with a specific font,...
10
by: Jeff B. | last post by:
Has anyone come across a decent algorithm for implementing word wrap features in .net printing? I have a small component that uses basic printing techniques (i.e. e.Graphics.DrawString in a...
4
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
4
by: Rob T | last post by:
I have a small VB program that has a printing module...very simple....and works great. However, If I try to print to a generic printer, I get the following error: "The data area passed to a...
4
by: iwdu15 | last post by:
can anybody help me print from a rich text box? i tried the way they showed on the MSDN web page, but it did not work. I am using VB.net 2003...any help would be appreciated
4
by: DeWittds | last post by:
I have asked before and got little responce, So I try and try again. The code below prints the data in the same place but does not advance the page. I can see the lblnumber change but print in...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.