BUG: GetGlyphOutline() Returns Partial Glyph

Last reviewed: January 5, 1995
Article ID: Q87350
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

SYMPTOMS

In the Microsoft Windows graphical environment, when an application calls the GetGlyphOutline function to retrieve the bitmap for a rotated glyph (the lpmat2 matrix points to a nonidentity rotation matrix) and the glyph is larger than 75 pixels, the returned bitmap contains a partial, nonrotated, glyph.

RESOLUTION

To work around this problem, perform the following five steps:

  1. Select the font into an appropriate device context (DC).

  2. Determine the size of the bitmap required to hold the rotated glyph by performing the following three steps:

    a. Call the GetCharABCWidths() function to determine the (nonrotated)

          width of the black part of glyph. This information is returned in the
          abcB member of an ABC data structure.
    

    b. Call the GetTextMetrics() function to fill a TEXTMETRICS data

          structure with information about the font. Use the value of the
          tmHeight member of the TEXTMETRICS structure as the height.
    

    c. Use the angle of rotation to compute the width and height of the

          rotated glyph based on the information above.
    

  3. Create a bitmap of the size calculated in step 2 and select it into a memory DC.

  4. Create a rotated version of the font by specifying the rotation angle in the lfOrientation member of the LOGFONT data structure and select it into the memory DC.

  5. Call the TextOut() function to write the desired glyph into the memory DC.

STATUS

Microsoft has confirmed this to be a bug in Windows version 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: buglist3.10 3.10
KBCategory: kbprg kbbuglist
KBSubcategory: GdiTt


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 5, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.