Results 1 to 6 of 6

Thread: Font size - cell vc character

  1. #1
    Member Newbie
    Join Date
    May 2006
    Location
    New Zealand
    Posts
    38

    Font size - cell vc character

    Hi Guys,

    Working through Nehe's tutorial on outline fonts at: http://nehe.gamedev.net/data/lessons....asp?lesson=14

    I notice he talks about font size based on character height vs cell. Can someone please explain this to me?

    I ask because I tried changing his value for font size from -24 to -12 - but it didnt seem to make a difference??

    -Al

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: Font size - cell vc character

    take a look at this msdn page about createfont.
    I don't know exactly what it truly means, so i use glScale to get a bigger font, works just fine.

    Hopefuly we(the NeheDev team) will find a better (and system independent) way of doing this when we rewrite the text tutorials.

  3. #3
    Member Newbie
    Join Date
    May 2006
    Location
    New Zealand
    Posts
    38

    Re: Font size - cell vc character

    Weird, because i have tried changing the font size, to both positive and negative values to try and get a smaller font - and nothing changes!!!

    Any ideaS?

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: Font size - cell vc character

    It could be that wglUseFontOutlines does not use that value at all

    i use this before glCallLists
    glScalef(sx,-sy,1);
    glTranslatef((x/sx),-(y/sy),0.0f);
    instead of
    glTranslatef(-length/2,0.0f,0.0f);

    sx and sy controls the size
    x and y moves it around the screen

  5. #5
    Member Newbie
    Join Date
    May 2006
    Location
    New Zealand
    Posts
    38

    Re: Font size - cell vc character

    That worked - thanks. Would love to know why it doesnt work with the font size value?

    -Al

  6. #6
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Font size - cell vc character

    Read the wglUseFontOutlines manual.
    "The em square size of the font, the notional grid size of the original font outline from which the font is fitted, is mapped to 1.0 in the x- and y-coordinates in the display lists."

    Means the fontsize you used to create the logical font is ignored and any glyph's OpenGL coordinates after wglUseFontOutlines are always in the range [0.0, 1.0].

Similar Threads

  1. font size in wglUseFontOutlines
    By imported_xargon in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-18-2005, 10:44 PM
  2. Font Size
    By Rong Yao in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-12-2003, 05:29 AM
  3. font size
    By dlswimmer in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-14-2003, 07:52 AM
  4. Font Size
    By Rong Yao in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-06-2001, 11:24 AM
  5. Font Size
    By Rong Yao in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-06-2001, 08:13 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