Graphical Font Creation program needed?
  • blueglassesblueglasses November 2005
    The last days i was searching for bitmap fonts and a graphical font creation program, so far (concerning the program) i found nothing suitable..

    So i thought i might program a little tool to "convert" true type fonts (the fonts Windows uses) to graphical fonts (including the *.fnt file, of course) which then can be used within HGE.

    So first i have to make sure there is no other program which manages this task. Is there one?


    [UPDATE]

    Just for those who are too lazy reading the bunch of posts here.

    Latest version can be downloaded HERE, did an update to the readme regarding gray outlining of characters / using windows in-built true type antialiasing.
  • TaskMasterTaskMaster November 2005
    There is one that was made by Hoek. I am not sure it is still compatible or if it will continue to be developed, since he is creating his own offshoot engine.
  • mkmk41mkmk41 November 2005
    Haaf had originally planned to release a graphical font editor of his own with the 1.6 release. See the original thread here: http://www.relishgames.com/forum/viewtopic.php?t=63 I am not sure what the plans are so far since HGE has gone Open Source and we are still organizing the development team and getting everything setup with SourceForge. As soon as I know something, I'll let you know, or perhaps Haaf already knows... *shrugs*
  • haafhaaf November 2005
    font generator for HGE is 50% built. i guess together we can finish it soon.
  • blueglassesblueglasses November 2005
    Oh, well :). Took a look at the screenshot, very nice, and antialiasing, wow. Can't wait to see this, even if i'm very impatient and already got the frame of my conversion tool up and running... ;)
  • EvilJorisEvilJoris November 2005
    Great stuff HaaF,

    I would really like to see this font generator working with the next release of HGE. As for now I'm using the LMNOpc to hgefont conversion tool by JasonP which is good but not the perfect solution.
    When development on HGE gets started again it should be a priority to do the features which were planned first.

    from site:
    - Collision detection (coming soon)
    - Tile maps (coming soon)
    - Bitmap Font Editor (coming soon)
    - Tile Map Editor (coming soon)

    but hey, these are just my 2 cents :wink:
  • blueglassesblueglasses November 2005
    My conversion tool is almost complete. Almost means, at the moment i'm only able to export the final bitmap in .bmp format, so i have to manually convert the bitmap with help of a paint program to .png.

    Can anyone give me some advice on how to export the bitmap to .png directly without too much work?
  • ProfEclipseProfEclipse November 2005

    My conversion tool is almost complete. Almost means, at the moment i'm only able to export the final bitmap in .bmp format, so i have to manually convert the bitmap with help of a paint program to .png.

    Can anyone give me some advice on how to export the bitmap to .png directly without too much work?



    You'll need a library like libpng to save the image as a .png file.
  • blueglassesblueglasses November 2005
    Well, atm the tool can't export the bitmap as .png format, but it's still very useful.

    Check it out at http://www.scratch.arcticgeckostudios.com/
  • TaskMasterTaskMaster November 2005
    It doesn't work. Missing files.

    vcl60.bpl
  • blueglassesblueglasses November 2005
    Sry for that (i know, stupid beginner's mistake), i'm on it.

    [Edit]
    Alright, now it should do its job. Added .png conversion, too.
  • blueglassesblueglasses November 2005
    Has anyone tried my font creation tool already? I'm a little disappointed that noone seems to have done that..
  • TaskMasterTaskMaster November 2005
    Not bad. Straight and to the point.

    I haven't tried using its output in a program yet though, so I cannot comment on whether or not the .fnt file is correct...
  • blueglassesblueglasses November 2005
    The output should be ok as i've already converted some fonts and used them without problems. But i'm reliant on bug reports / improvement suggestions as i can't see everything :)
  • TaskMasterTaskMaster December 2005
    I finally got around to using a font built with this program. Works like a champ.

    Just wanted to say thanks for making it.
  • blueglassesblueglasses December 2005
    You're welcome :)
  • TaskMasterTaskMaster December 2005
    Now, I found something wrong.

    I am using HGE 1.53...

    I created a tahoma 8 point font on a 128,128 size bitmap with upper/lower/numbers/standard. The upper case letters and numbers work fine, the lower case do not work, they come out scrambled.

    Then I ctreated a tohoma 10 point with the same stats and all of them came out crazy.

    Then I moved it up to creating 256,256 size bitmaps and all is fine on both the 8 and the 10. So, there is somethign wrong when using 128,128 size bitmaps.

    I am currently using a 256,256 size texture, but the tahoma 8 I am using could easily be on a 128,128 texture. So I am using a bit more memory than necessary.
  • blueglassesblueglasses December 2005
    Thanks for that, i'll take a look at it.

    [Edit]

    Done. It was a bug not related to the specific size of the bitmap but to the size in general (could have happened with every bitmap size). Just an error in reasoning in my character drawing loops.

    Thanks for the hint, the new version can be downloaded here as always:


    http://www.scratch.arcticgeckostudios.com/
  • AnonymousAnonymous December 2005

    Well, atm the tool can't export the bitmap as .png format, but it's still very useful.

    Check it out at http://www.scratch.arcticgeckostudios.com/




    Thnx man , It will really help me
    :) :)
  • blueglassesblueglasses February 2006
    So far i'm quite satisfied with my font converter, also (if you're interested) released a new version which includes some fonts made with GFC, too.

    Now i'm searching for some time for the opportunity to use antialiasing without success as it's not build-in in C++ Builder. Does anyone of you have an idea on how to do antialiased fonts on a simple canvas?
  • EvilJorisEvilJoris February 2006
    Hey a great tool you have here, before I was using the hgeLbfFont solution. But this really slowed things down and was kind of hacky. I'm really glad you took the time to make things compatible with hgeFont.
    When the font is converted into bitmapfont and used ingame, the characters seem to gain grey outlining, is this normal? It doesn't really bother me but it's strange because when i use the font in word for example, there is no outlining.

    Keep up the good work :)
  • blueglassesblueglasses February 2006
    Hi EvilJoris, thanks for your comment, i'm glad you like it. :)
    Regarding the "grey outlining" i can't tell you what's going on as i'm not having this problem (and others not too). Perhaps you could send me a screenshot of the problem, so i can take a closer look. Just upload the image here http://imageshack.us/ and post it here in this thread.

    I'm still searching for the opportunity of using antialiasing. If anyone knows how to, please contact me, thanks.
  • EvilJorisEvilJoris February 2006
    Ok, I studied the case closer now. I made an example containing both text with .ttf font and a screenshot from hge rendered text with bitmap font.

    image

    As you can see the bitmap font text is a bit longer because of spacing, but also it is rendered with a darker shadow around the characters. Maybe it is supposed to do that? I'm just curious, why the difference?
  • blueglassesblueglasses February 2006
    Well, to be honest, that's strange. I've examined all my GFC-made fonts and no single font has this outlining. I've not tested this in HGE so i guess it *could* have something to do with HGE and global antialiasing (only if you've activated this), because your bitmap font is rendered with antialiasing as it seems.

    So i suggest you take a closer look at the bitmap font itself with a paint program / image viewer and zoom in to look for the same outlining. If there is no outlining, then it's HGE+antialiasing or HGE + another combination. If there is an outlining in the bitmap font then i'll have to take a look at the bmp-png conversion as this can be the only explanation.
  • EvilJorisEvilJoris February 2006
    Hi,

    I ran some other tests using the font builder. I used several different fonts at 24 pts: Arial, comic sans and times new roman. When I build their bitmap fonts all the characters get the outlining in both the .bmp and the .png output files. So bmp->png conversion is not the cause, the anti-aliasing happens in your internal font render-function. When I use courier font, the anti-aliasing doesn't appear because the character lines are only 1 pixel wide.
    You don't have to fix this problem I guess. Maybe give the user the choice for proper anti-aliasing or none.
  • blueglassesblueglasses February 2006
    I've tested some fonts with size of 24, didn't get the outlining. The only thing i can think of is that your graphics card / driver is the one to be blamed because the .bmp file SHOULD DEFINITELY NOT get this outline as there is no antialiasing and no compression used when the bmp is saved. Again, check your graphics card antialiasing settings as this could be the reason (perhaps you need to restart after changing 'em).

    Nevertheless, i've included an option to change the compression rate of the png image (download as usual, no version change). I did some short testing of this resulting in no change of the png font, no artifacts, no pixels appeared or disappeared compared to the .bmp file, even if i set the highest compression rate. So it has to be antialiasing or some kind of error diffusion your driver is using.
  • AnonymousAnonymous February 2006
    I tried to download the program from your web site but the link seems to be broken.
  • EvilJorisEvilJoris February 2006
    Hey,

    I'm really stumped here.. I tried the font tool at 3 different pc's, one with geforce ti4200, one with intel xtreme graphics and one with radeon 9700 pro. Each with updated drivers and all. On every one of them I get some sort of anti aliasing/outlining on both the bitmap and the png (which is logical because the png is created from the bitmap). I also tried setting hardware acceleration to 0 which had no effect whatsoever. The anti-aliasing is on "application preference" so that shouldn't be a problem.
    Then I tried the font builder PRO compiled and it gave me perfect anti-aliasing. Real transparency because there is no black background which generates the weird outlining. But only when the font size is >= 18, any lower, the anti-aliasing doesn't seem to work. Then I switch to no anti aliasing, it perfectly generates fonts without anti aliasing, just like in paint.
    Maybe you should take a look at that font builder, because it was HaaF's tool before he decided to stop development.

    anyway, hope this helps you.
    Thnx for all the effort so far!
  • blueglassesblueglasses February 2006
    @paquito:
    I'm sorry, i've corrected the link. Thanks for the hint.

    @EvilJoris:
    First, the colour of the background does not influence the outcome as there are only two colours used. The first colour is the black background, the second the white coloured font. The colour black is set to transparent when the bmp is converted to png, so black "disappears".

    So i'm stumped here, too: How the hell do the additional (outlining) colours come into your bitmap? I can't tell you because i'm really only using black as background and white as font colour, so this can't be a problem of GFC.

    [some minutes later...]

    Alright, i've found the source of the problem: You've activated antialiasing for true type fonts. That's not the usual "antialiasing" i've spoken about, it's a windows feature of making fonts more soft.

    So if you want, here's the way to deactivate it (i have to translate some things to english, so i don't know if i'm right as i'm using a german version of winXP pro):

    Right-click your desktop, select properties. Select category "display" (where you can change the appearance of windows and fonts), then click "effects". There you see the second checkbox, which indicates the type of antialiasing you use for true type fonts (could be called "edge smoothing" or so), just uncheck the checkbox.


    Knowing this now i'm perhaps able to include a kind of antialiasing (i'm still searching for this opportunity). So i thank you for keeping me on track of this problem. :)
  • EvilJorisEvilJoris February 2006
    Great, you found it. After unchecking the smooth edges option and a restart the outlining is gone! The font now looks the same ingame, as in paint.
    It might be a good idea to include this problem in a FAQ of your program, because the option comes standardly checked on winXP (English and Dutch edition at least.. 8) )
  • purplepurple March 2006


    Has anyone tried my font creation tool already? I'm a little disappointed that noone seems to have done that..



    I've tried it today. Works like a charm for me.
    Perhaps it is an idea to include it in the download for hge as a tool? Like the particle generator.
  • KaptainJackKaptainJack April 2006
    Yea, it's great.

    Except for a couple things: it doesn't always automatically create a .png file, the background is black, not transparent. Since you're using bmps, this is acceptable, but the background should be the bright purple or something easier to remove.

    But great tool, thanks!
  • blueglassesblueglasses April 2006

    Yea, it's great.

    Except for a couple things: it doesn't always automatically create a .png file, the background is black, not transparent. Since you're using bmps, this is acceptable, but the background should be the bright purple or something easier to remove.

    But great tool, thanks!



    First, i don't see any reason why the .png should not be created, it should be done automatically after the .bmp is created. At least if you have not removed the bmp->png converter placed in "b2p162w" folder.

    Second: The background *SHOULD ALWAYS* be transparent. It is black, right, but transparency is added to this color during bmp->png conversion. Perhaps your paint program doesn't show transparency initially?
    But if no transparency is added to your png actually, you can do the following:

    Open a commandline window (start - execute - enter "cmd" or "command"), change to the GFC folder, enter

    b2p162w\BMP2PNG.EXE -0 -P #000000 [filename]

    where [filename] is to be replaced with font001.bmp for example.

    That should do it if the conversion isn't executed correctly within GFC. Of course you can open the .bmp file in your favourite paint program and add transparency to black manually.

    If you want me to look at why the .png isn't always created / why transparency isn't added (if it really isn't), i need some more detailed info on your operating system and where you've placed the GFC. Perhaps it's just a folder name issue.
  • STWiSTWi July 2006
    Hm... It doesn't work for me as it should. I get png files without transparent background. Here an example. The left part is what I get. The right part is standart font that goes with HGE. What's the problem? And is there another tool for creating fonts? Thanks in advance.

    image

    p.s. Screenshot from Adobe image ready
  • STWiSTWi July 2006
    UP. Er... Am I really the only person with such a problem? I really need to create my own fonts for HGE that will look smooth :(
  • TaskMasterTaskMaster July 2006
    [quote="STWi"]UP. Er... Am I really the only person with such a problem? I really need to create my own fonts for HGE that will look smooth :(

    I really hate to be the person to say it, but it works for me :)

    I really have no idea how troubleshoot your problem. Maybe you can send the author an email.
  • STWiSTWi July 2006
    [quote="TaskMaster"][quote="STWi"]UP. Er... Am I really the only person with such a problem? I really need to create my own fonts for HGE that will look smooth :(

    I really hate to be the person to say it, but it works for me :)

    I really have no idea how troubleshoot your problem. Maybe you can send the author an email.

    thx, the other program that was written by russian developer works :) But I don't like the antialising I get because photoshop creates way more good looking letters :)

    p.s. I think I will blur the images or maybe manually create them in photoshop ;)
  • STWi:

    Have you tried to use the fonts created with GFC in HGE? Some programs don't show the transparancy correctly: The original fonts delivered in the HGE package have a color resolution of 24bit, while the fonts created with this program have 32bit. This difference is that the GFC-made fonts are saved with an alpha channel, while the HGE fonts only have 1bit transparency. The advantage of the method used by GFC is that i can implement some more options which affect the transparency (if i had time). So, perhaps your image viewer doesn't show (or support) alpha transparency initially.

    Some more information i can provide you with is the process of the creation of the .png file:

    The image is first being saved as a .bmp file, the background is black. Then the command line program "bmp2png.exe" is being executed, it converts the .bmp to .png and adds complete transparency to the color #000000 (black).
    Furthermore, if GFC creates .png files, then these files most certainly ARE transparent, as the filename is the last parameter given to the command line tool. Therefore, if the parameters wouldn't be submitted correctly, the .png file would not be created.

    Alright, one last note: In the readme.txt i described a (limited) method of using true type font smoothing, which is a built-in Windows XP feature(dunno if other Windows versions support this, too) compareable to antialiasing.
  • STWiSTWi July 2006
    Thanks for your answer. I took a look at fonts that were packed with your tool. They look exactly the same. I mean when I open them with Photoshop background is not transparent but black. Standart HGE fonts have transparent backgrounds. I'm not sure about 1 bit transparency but with alpha blending they look smoothly.
  • blueglassesblueglasses August 2006
    As i said, the font images are transparent, but it's possible that adobe photoshop doesn't show alpha transparency initially, i've noticed this with many paint programs. The two programs i'm using (Paint.NET and Gimp) show alpha transparency instantly, just tested this with the fonts made with GFC. They are all ok. :)
  • STWiSTWi August 2006
    [quote="blueglasses"]As i said, the font images are transparent, but it's possible that adobe photoshop doesn't show alpha transparency initially, i've noticed this with many paint programs. The two programs i'm using (Paint.NET and Gimp) show alpha transparency instantly, just tested this with the fonts made with GFC. They are all ok. :)

    That's quite strange since Photoshop is the best program for editing images :shock: But ok I'll try Paint.net. Thanks for support
  • Pedro+LMPedro LM August 2006
    I use Paint Shop Pro, and I have to go through a few moronic steps to view a PNG's alpha channel:

    Step 1: Mask -> New Mask -> From alpha channel
    Step 2: Mask -> Delete Mask -> Merge mask into current image

    Maybe Photoshop is similar?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion

Who's Online (1)