Results 1 to 2 of 2

Thread: pgeFont bitmap font library

                  
   
  1. #1
    Won Hung Lo wraggster's Avatar
    Join Date
    Apr 2003
    Location
    Nottingham, England
    Age
    53
    Posts
    141,430
    Blog Entries
    3209
    Rep Power
    50

    psp pgeFont bitmap font library

    News/release from insert witty name:

    pgeFont is part of Phoenix Game Engine.

    -=Info=-
    The library loads a TrueType font and generates a swizzled 4-bit paletted bitmap font texture for use when drawing text. It's very fast.

    -=Samples=-
    There are two samples included, one for raw GU and the other using the graphics library from Yeldarb's tutorials on psp-programming.com
    If you're using the graphics library then you may need to reset the sceGuTex* states to what they are defaulted to in the initGraphics() functions, after using the pgeFont* functions.
    It should be easy enough to add to any other library.

    -=Dependencies=-
    Freetype

    -=Differences=-
    The differences between this release and the actual Phoenix Game Engine pgeFont code are:
    - No loading to VRAM
    - No loading from memory

    Possibly more on release of the engine.

    -=Credits=-
    Raphael: Converted my initial 8-bit textures to 4-bit and fixed a bug in the swizzle function.

    -=License=-
    This is released under the Creative Commons Attribution-Share Alike 3.0 License.
    See LICENSE for more information.

    -=Atttribution=-
    With accordance to the license, the following must be adhered to:
    If you use the code in any way, shape or form you must attribute it in the following way:

    'Uses pgeFont by InsertWittyName - http://insomniac.0x89.org

    If you alter the code in any way, shape or form you must also release the updated code under the same license.

    See http://creativecommons.org/licenses/by-sa/3.0/ if you need more information.

    Download and Give Feedback Via Comments

  2. #2
    DCEmu Newbie
    Join Date
    Jan 2007
    Posts
    1
    Rep Power
    0

    Default

    Found a bug in a function:

    int pgeFontMeasureText(pgeFont *font, const char *text)
    {
    if(!font)
    return 0;

    int x = 0;

    while(*text)
    {
    Glyph *glyph = font->glyph + font->map[*text & 0xff];
    x += glyph->advance;
    +
    + text++;
    +
    }

    return x;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •