Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 650693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:04:51+00:00 2026-05-13T22:04:51+00:00

I’m trying to draw vertical text in win32 GDI api. I call CreateFont() with

  • 0

I’m trying to draw vertical text in win32 GDI api.
I call CreateFont() with 2700 for the angle and 900 for bold.

logPxlY = ::GetDeviceCaps (c->_hdc, LOGPIXELSY);
_hfont = ::CreateFont (-::MulDiv (point, logPxlY, 72),
    0, angle, weight, 0, FALSE, FALSE, FALSE, 0, 0, 0, 0,
    FIXED_PITCH | FF_MODERN, face);

where face is “Courier New”, point is 9, angle is 2700 and weight is 900.

The text IS rotated correctly, but it’s pretty dang faint compared to normal Courier New rendering. Is this since truetype is polishing the normal text real nice and isn’t bothering with wierd rotated text or something?

Thanks for any insight 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:04:51+00:00Added an answer on May 13, 2026 at 10:04 pm

    The font mapper can be a bit strange at times. 700 is bold, 900 is supposed to be “black”. However, you probably have a Courier New Bold font file, so it can be used directly, whereas you probably do not have a Courier New Black font file, so it’ll be synthesized — probably from the normal Courier New font instead of from Courier New Bold (not sure why that is, but such is life).

    If you try running through the possibilities, something like this (MFC code, for the moment, but the idea applies regardless):

    CFont fonts[num];
    
    pDC->SetBkMode(TRANSPARENT);
    for (int i=0; i<num; i++) {
        fonts[i].CreateFont(10, 0, 2700, 0, i*100, 0, 0, 0, DEFAULT_CHARSET, OUT_CHARACTER_PRECIS, OUT_CHARACTER_PRECIS, PROOF_QUALITY, FF_MODERN, L"Courier New");
        pDC->SelectObject(fonts+i);
        pDC->TextOut(20+i*14, 20, L"This is some text");
    }
    

    What you’ll probably see (what I get anyway) looks like this:

    Various weights of Courier New

    The 700 weight font is noticeably bolder than the 800 or 900 weight. This is not unique to Courier New either — for example, the same code with the font name changed to Times New Roman produces output like this:

    Various weights of Times New Roman

    That’s a bit closer, but the 700 weight still clearly looks darker than the 800 or 900. I won’t bore you with screen shots, but the same effect happens when the text is horizontal.

    Edit: One other minor detail: though it probably doesn’t make any difference, you’re currently computing the size of the font a bit incorrectly — you’re using logpixelsy, which makes sense when the font is horizontal. For a vertical font, you should use logpixelsx instead. On a typical screen, those will be identical, but on a printer (for example) they may be substantially different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.