Results 1 to 4 of 4

Thread: Extruding fonts

  1. #1
    Member Contributor
    Join Date
    Nov 2010
    Posts
    85

    Extruding fonts

    Hi,

    I want to extrude the fonts in OpenGL, so I'm using the GetGlyphOutline Windows function.
    The fonts I build from the outlines I get are bigger than the fonts created with wglUseFontOutlines, so probably I have to scale them.

    I noticed that wglUseFontOutlines returns a GLYPHMETRICSFLOAT structure (with float values), while GetGlyphOutline returns a GLYPHMETRICS structure (with short/ uint values) describing the fonts bounding box and increment in X and Y.

    What is the relation between the two?
    How can I properly scale the lines returned by GetFontOutline so that the output is similar to the fonts created with wglUseFontOutlines?
    Thanks

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Extruding fonts


  3. #3
    Member Contributor
    Join Date
    Nov 2010
    Posts
    85

    Re: Extruding fonts

    Hi,
    so you mean that wglUseFontOutlines returns the metrics in device units and the GetGlyphOutline returns the metrics in design units?

    Is there another way to get the outlines of the font created by the wglUseFontOutlines?

    Where can I get more informations on this subject?
    Thanks

  4. #4
    Member Contributor
    Join Date
    Nov 2010
    Posts
    85

    Re: Extruding fonts

    I solved the problem by applying the scale given by the floatMetrics[0].gmfBlackBoxY / metrics.gmBlackBoxY

    where floatMetrics is the GLYPHMETRICSFLOAT object returned by the wglUseFontOutlines and metrics is the GLYPHMETRICS object returned by the GetGlyphOutline.

    Now there is only a little difference between the font built by the wglUseFontOutlines and the one built with the GetGlyphOutline.

    This scale factor varies with the FontFamily(and FontStyle), but
    I was expecting it to remain the same since it should just be a matter of the different units used by the wglUseFontOutlines and GetGlyphOutline, am I wrong?

Similar Threads

  1. bitmap fonts vs texture fonts
    By ehsan2004 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-31-2005, 03:24 AM
  2. fonts
    By incognito in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-06-2002, 01:03 AM
  3. Extruding gluPartialDisk()
    By imported_aurora in forum OpenGL: General
    Replies: 0
    Last Post: 02-28-2002, 08:05 AM
  4. Extruding gluPartialDisk()
    By imported_aurora in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-28-2002, 08:03 AM
  5. Fonts
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-17-2002, 12:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean