CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Posts
    3

    Question Help me, font size differs in different printers!!

    I have a problem in printing. My problem is that my font sizes differ when I use different printers. The same font is sometimes large and sometimes it is so small.
    I read the old posts and found out that I should not use CreareFont(), bacause it depends on the printer's dpi. and I should use CreatePointFont() So, I changed it. but I still have the problem.

    CFont Font;
    Font.CreatePointFont(300,"Times New Roman");

    Would you please help me?

  2. #2
    Join Date
    May 2000
    Location
    Scotland, Livingston.
    Posts
    728

    Re: Help me, font size differs in different printers!!

    Try passing a pointer to the printers DC as the last parameter to the CreatePointFont funtion. It needs the DC so that it can determine the printer resolution andd scale the font appropriately. The default for this is NULL and that uses the screen DC to scale the font.
    Dave Mclelland.

  3. #3
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: Help me, font size differs in different printers!!

    Quote Originally Posted by Marziye
    I have a problem in printing. My problem is that my font sizes differ when I use different printers. The same font is sometimes large and sometimes it is so small.
    Well... Which mapping mode are you using when drawing text to the printer DC?

  4. #4
    Join Date
    Aug 2005
    Posts
    3

    Re: Help me, font size differs in different printers!!

    Thanks a lot Dave. It fixed the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured