I am trying to create my own fonts to use in my game, and I seem to run into a problem with a specific font.

I used the Gimp and the SFont creator script to create an image that SFont could use, then I used the SFontMaker to create an SFont PNG file.  Then I create an xml file that uses that PNG, and I run it through the encoder.

I can grab Parafont off of http://user.cs.tu-berlin.de/~karlb/sfont/fonts.html, and it works perfectly fine.  I then found a few more fonts. One of them gets processed by KrEncoder perfectly fine after I edit the SFont-ified PNG because it added a few markers where they shouldn't have been (the font looks like an LED and so it created markers in K since it really looks like |<).  The other one gives me the following output:

../source/kyra2/kyra/encoder/krencoder -w yourcomp.dat yourcomp.xml
Starting encoder version 2.1.3.
Write stream open. Beginning processing of output: yourcomp.dat
Processing XML file 'yourcomp.xml'
GetImageLoader called
Surface yourcomp-sfont.png loaded.
Font: YOURCOMP
Writing DAT file.
krencoder: encoder.cpp:366: bool KrEncoder::EndDat(): Assertion `numSegment >= numLine' failed.
make: *** [yourcomp.dat] Aborted
make: *** Deleting file `yourcomp.dat'

I tried looking at the code, but I am not sure what numSegment and numLine refer to. When I process the font that does work, I get:

../source/kyra2/kyra/encoder/krencoder -w led_real.dat led_real.xml
Starting encoder version 2.1.3.
Write stream open. Beginning processing of output: led_real.dat
Processing XML file 'led_real.xml'
GetImageLoader called
Surface led_real-red-sfont.png loaded.
Font: LED_REAL
Writing DAT file.
Tally count: rgba=12871 line=1702 segment=2193
DAT complete. Writing header 'led_real.h'
Saved BMP (result=0) file: led_real.dat_00.bmp

The working XML file:

<Definition filename="led_real-red-sfont.png">
    <Font name="LED_REAL" start="33" type="sfont" space="32"/>
</Definition>

And the non-working one:

<Definition filename="yourcomp-sfont.png">
    <Font name="YOURCOMP" start="33" type="sfont" space="32"/>
</Definition>

So as you can see, there is no significant difference, and it isn't as if the starting location has changed between the two fonts, so the XML files should be fine.  I even painstakingly compared the *-sfont.png files to see if there were extra or missing markers.  I just don't see what it is about this PNG that causes a problem for the encoder. Any ideas?

You can find the sfont PNGs I used at http://www.gbgames.com/blog/images/fonts/yourcomp-sfont.png and http://www.gbgames.com/blog/images/fonts/led_real-red-sfont.png