CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    23

    Proper font scaling

    Hi there,

    I have a problem scaling fonts properly.

    I have an application that zooms into a drawing that contains text. Now the problem is that i create a font using CreateFont() using the actual zoom factor of the view.

    The problem is that the ratio of the width and the height differs. The height is scaled properly but the width differs... I tried around a lot with the lfWidth parametr of the LOGFONT structure and with ExtTextOut but nothing seems to fix this problem.

    Can anyone help me out with this?

    Thanks a lot!!

    Greetings
    Christoph

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Proper font scaling

    Have you tried to keep the lfwidth at 0?
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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