Results 1 to 6 of 6

Thread: Fonteditor

  1. #1

    Fonteditor

    I have a problem with the Fonteditor which comes with GLXtreem. (in the bin folder) I assume that its for creating fonts to use with the GLXFont component? Annyways, evertime I try to create a font, it doesen't work. If I save the font as a bitmap, then nothing happends when I call the TextOut, and when I use tga format, I get the following error: "Sample count per pixel does not correspond to the given color scheme" The error is in the GraphicColor unit if im not wrong. Please help me!!


    Thank you.

    EDIT: forgot to say; the program works fine with the Fixedsys font from the samples... And yes, I have saved the font metrics.

    EDIT 2: I've managed to fix it now, using Photoshop and lots of patience. Diddn't manage to find out what was wrong though
    BK - we.create (tm)

  2. #2

    Fonteditor

    The problem is that the font program saves the bitmap as 24Bit Bitmap, that means that no Alpha channel is avaiable and that's what the font class is default to use, you can shange this with GLXFont.BlendFunc(GL_SRC_ALPHA, GL_ZERO). However 32Bit Tga fonts are nicer then 24Bit bitmaps.

    The reason for not saving Tga's in the fonteditor is that GraphicEx seems to **** them up when trying to create a new one,

    The alpha channel of the image is quite easy to create, here's how u do it in Paint Shop Pro 8:

    1. Open The Bitmap.
    2. Select Layer->New Mask Layer->From Image
    3. Select the Bitmap as source.
    4. Select Layer->Load/Save Mask->Save Mask To Alpha Channel.
    5. Select the bitmap as dest, Press Save
    6. Delete the Layer called "Mask - Raster1" from the Layer palette
    7. Select "No" when asked if you want to merge the mask.
    8. Save the Bitmap as a Tga file.
    9. Load it in with TGLXFont and have fun.

    The step above just creates the font without any effects, for the Fixedsys font i added some shadows and so on to the Bitmap and mask.

    And the font metrix isn't required to get the font working without it GLXFont is just using the default font spacing, may not look as nice but it works.

    Tip: If some of the lower characters "_" for an example doesn't display Increase the Height param in the FontMetrics, but keeep it below (Bitmap.Height / 16).
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  3. #3

    Fonteditor

    I managed to get the targa saving to work, so expect an updated version of the fontEditor in the next version =)
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  4. #4

    Fonteditor

    Thanks for the explanation. Can't wait for the update...

    I noticed that the alpha channel was gone when I loaded the font into Photoshop, but I had no idea that it was that crucial..
    BK - we.create (tm)

  5. #5

    Fonteditor

    Well, it's not crucial, you can use std bitmap fonts if you change the blendfunct as above, but you have much more controll of the transparency with the alpha channel.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  6. #6

    Fonteditor

    Oh, I see. Thanks again.
    BK - we.create (tm)

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
  •