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 4172438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:33:48+00:00 2026-05-21T00:33:48+00:00

There seems to be a bug in the GetCharABCWidths() and GetGlyphOutline() functions, when the

  • 0

There seems to be a bug in the GetCharABCWidths() and GetGlyphOutline() functions, when the font size is changed from (-16 * i) / 72, to (-n * i) /72 , for any n below 16.

The character ‘a’ is still displayed correctly but the functions return FALSE and GDI_ERROR.
Why ???

GetLastError() for GetCharABCWidths() returns 0 (ERROR_SUCCESS) and for
GetGlyphOutline() GetLastError() returns 1003 (CANNOT COMPLETE FUNCTION).

MAT2 gmat = { {0, 1}, {0, 0}, {0, 0}, {0, 1} };


case WM_PAINT:

        PAINTSTRUCT ps;

        BeginPaint(hwnd, &ps);

        int i;

        i = GetDeviceCaps(ps.hdc, LOGPIXELSY);

        LOGFONT lf;

        memset(&lf, 0, sizeof(LOGFONT));
        lf.lfHeight = (-14 * i) / 72;
        lf.lfWeight = FW_NORMAL;
        lf.lfItalic = 0;
        lf.lfCharSet = SYMBOL_CHARSET;
        wcscpy(lf.lfFaceName, L"Symbol");

        HFONT hFont;

        hFont = CreateFontIndirect(&lf);
        hFont = (HFONT)SelectObject(ps.hdc, hFont);

        BOOL bx;
        ABC abc;
        TCHAR tx;
        DWORD dwx;

        tx = 'a';

        if( !GetCharABCWidths(ps.hdc, tx, tx, &abc) ) dwx = GetLastError();

        GLYPHMETRICS gm;

        if( GetGlyphOutline(ps.hdc, tx, GGO_METRICS, &gm, 0, NULL, &gmat) == GDI_ERROR )
            dwx = GetLastError();

        TextOut(ps.hdc, 10, 20, (LPTSTR)&tx, 1);

        EndPaint(hwnd, &ps);
  • 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-21T00:33:48+00:00Added an answer on May 21, 2026 at 12:33 am

    On my system, Symbol exists both as a raster font (symbole.fon) and an OpenType font (symbol.ttf), so when GDI decides to use the raster version of the font you won’t be able to obtain any TrueType metrics. To fix this, set the fdwOutputPrecision member of your LOGFONT to something suitable, such as OUT_TT_PRECIS.

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

Sidebar

Related Questions

There seems to be a bug in a Wordpress PHP function that leaves whitespace
There seems to be a Bug with the Outer Join statement in SubSonic 3,
There seems to be a bug in the Java varargs implementation. Java can't distinguish
There seems to be a bug in IE when cascading dynamic stylesheets. Does anyone
There seems to be a rather annoying bug in MS Expression Web 3 (or
There seems to be no good way to localize a WPF application. MSDN seems
There seems to be a lot of heated discussion on the net about the
There seems to be two major conventions for organizing project files and then many
There seems to be three common approaches for mapping an application end user to
So there seems to be this problem with GNU Make's $(wildcard) function keeping a

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.