Forum: HDLoader Skins Discussion - Talk about the customization of the HDLoader interface and skins downloads as it relates to the PS2.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: Creating font.bmp & font.dat makes my head hurt
  

Results 1 to 9 of 9
  1. #1 Creating font.bmp & font.dat makes my head hurt 
    nigecube is offline Don't look at me, I'm irrelevant
    Join Date
    Aug 2004
    Location
    UK
    Posts
    63
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    I've been following the guide in the hdlpatch readme.txt regarding adding my own font to a HDL skin.

    It reads:

    Use Bitmap Font Builder (http://www.lmnopc.com/bitmapfontbuilder/) to
    create the needed BMP and DAT files for font patching with the
    following settings:

    Texture Size: 256x256
    Background: 1 1 1
    Foreground: 128 128 128
    Font Alignment: Left
    Character Set: Full ASCII

    Save the font image as BMP & Font Widths (Byte Format) DAT using the
    same filename (file.bmp + file.dat)


    Okay, understood!

    However, no matter how many different fonts I try, they always appear as garbage once injected into an .elf. I know it's not my patching method because with somebody else's font.bmp and font.dat files it works perfectly.

    All I can assume is that Font Builder is fussy about the choice of font. Any recommendations folks?
    Silver PAL V10, Matrix Infinity, Romeo Mod, 120Gig HD
    Reply With Quote  

  2. #2  
    darkpoet's Avatar
    darkpoet is offline SCPH-39005 Jap v8 NH7 modchip 80GB
    Join Date
    Sep 2004
    Location
    Korea
    Posts
    124
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    I also have tried. Most recently with Garamond and previously with a few fonts I've collected over the years. I followed the program's recommendations to use 32-bit mode and font-smoothing (both in XP and as an option in the program)...

    After following the instructions to a T and inserting my new Garamond .bmp and .dat into a pretty plain HDL ELF, it looks so much like garbage on my TV... after looking closely, I realized I could read a few of my games but that certain letters were cut off or completely messed-up, but some still made some sense.

    ....While searching for info and writing this message, I notice that my font.dat file is 512 bytes.... It should be 256... Hmmm... does that mean... yup, upon hex-editing my font.dat is full of a lot of zeroes... that's double the bits necessary right? 32 bits instead of 16, am I wrong? What do I do to fix it? Hmmmm, I'll try to figure that out and write back...

    I looked at the "What's New?" under the "Help Menu" and discovered this (Some non-critical information deleted):

    Version 1.9 - Apr 4, 2005
    ......Changed char width data type from bytes to integer so that it's not the limiting factor when creating huge textures. This will affect any code that used char widths. L+ABC widths are NOT affected by this change.

    I'm sure there are more changes buried in there, but I can't remember them at the moment. It's been a while since I worked on this so you'll have to forgive me.
    What's that? Changed char width data type... DATA=.DAT ???

    Version 1.9 BETA - Oct 08, 2001
    This version was created for Westwood Studios for use in Earth & Beyond. This version was never released for public consumption.
    Version 1.8 - Sept 27, 2001
    Wow, he really hadn't worked on it in a long time...

    Version 1.4 - April 1, 2001
    Binary font metrics option. Stores the font widths to a .dat file in a 256 item byte array
    Well at least I get confirmation it should be 256 bytes...

    Inferences: HDLoader was originally made, probably using version 1.8... The publicly available version isn't compatible, and the author isn't likely to include any new options... seeing as how this version is actually probably quite old to him already... he just released it cause he thought he should...

    Conclusion: Gonna have to use Version 1.8... Is there anyone out there who actually has it already so I don't have to petition the author to get it?
    Last edited by darkpoet; 05-12-2005 at 01:45 PM.
    Reply With Quote  

  3. #3  
    darkpoet's Avatar
    darkpoet is offline SCPH-39005 Jap v8 NH7 modchip 80GB
    Join Date
    Sep 2004
    Location
    Korea
    Posts
    124
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    OK my theory turned out to be accurate, I think. I hex-edited the font.dat file, deleting every second byte (starting with the 2nd byte, all zeroes), and at the end it was 256 bytes. Patched the HDL ELF again, and bam! Magic! It works.

    How to reconcile the new BitMapFontBuilder with the HDLoader patcher?

    Zero-X, if you read this, would it be possible to add an easy option to your patcher to automatically convert a 512-byte font.dat to 256-byte during the insert process? Or would it be easier to just use the old program...?

    Perhaps I could write a QuickBASIC program (the only language I can do) to do the conversion... Dammit, is anyone else (with skillz) reading this thread?
    Reply With Quote  

  4. #4  
    Zer0-X's Avatar
    Zer0-X is offline User
    Join Date
    Sep 2002
    Location
    Finland
    Posts
    805
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    This is the 1.8 version. If there's any problem in posting this just /dev/null it.

    Perhaps I could add a small check into HDLPatch.
    Attached Files
    --- Signatures are just lame excuse to waste bandwidth ---
    Reply With Quote  

  5. #5  
    Join Date
    Mar 2005
    Posts
    75
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Has anybody else tried any other application. I was using Bitmap Font Builder and it patched correctly and I had the same issue where it all appeared garbled. I just found out that Bitmap Font Builder will not allow you to edit True Type font. Does anybody else use any other applications to use True Type font.
    Reply With Quote  

  6. #6  
    nigecube is offline Don't look at me, I'm irrelevant
    Join Date
    Aug 2004
    Location
    UK
    Posts
    63
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    @Darkpoet & Zer0-X

    Thanks very much guys. V1.8 has got things working perfectly.
    Silver PAL V10, Matrix Infinity, Romeo Mod, 120Gig HD
    Reply With Quote  

  7. #7  
    darkpoet's Avatar
    darkpoet is offline SCPH-39005 Jap v8 NH7 modchip 80GB
    Join Date
    Sep 2004
    Location
    Korea
    Posts
    124
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Bitmap Font Builder is what you want for skinning HDLoader using existing fonts, yes... but you wanna edit TrueTypeFont files? Good luck. I've tried. It's difficult. Takes many hours. A lot better to download an existing font. There are tens of thousands available either as freeware, public domain, or included in packages such as Word, WordPerfect (perhaps these are "free use" fonts?) and so on... If you really want a font editor, look at The Bitmap Font Builder homepage, I believe he advises one to use. Or search Google...

    And excellent ZeroX - a check would be great... do you think it would be possible to add an automatic "reduction" routine to remove every 2nd byte in 512 byte files...? Because it seems BFB has some pretty neat options (at least on the BMP side) for the new version... I dunno. Does the 1.8 use font-smoothing options?

    Perhaps another utility might be more appropriate? I'm not sure what language you use or how easy this would be to do... as I said, I'm only familiar with BASIC due to my younger days with my Vic-20, C64, and DOS 3...
    Last edited by darkpoet; 05-14-2005 at 04:11 PM.
    Reply With Quote  

  8. #8  
    rhisto is offline Registered User
    Join Date
    Mar 2005
    Posts
    12
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Quote Originally Posted by darkpoet
    OK my theory turned out to be accurate, I think. I hex-edited the font.dat file, deleting every second byte (starting with the 2nd byte, all zeroes), and at the end it was 256 bytes. Patched the HDL ELF again, and bam! Magic! It works.
    Looks like your large font was made for progressive overscan (twice the amount of pixel-height since that uses two half-images that quickly alternate on your monitor)

    Rhisto
    Reply With Quote  

  9. #9  
    darkpoet's Avatar
    darkpoet is offline SCPH-39005 Jap v8 NH7 modchip 80GB
    Join Date
    Sep 2004
    Location
    Korea
    Posts
    124
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    OK this is far from an elegant solution but it does work.

    This will change a 512-byte font.dat into a 257-byte file compatible with Zero-X's hdl-patch program... I realize the dat should be 256 bytes but I made this in BASIC (MS PDS actually) and I haven't programmed in years. Anyways, it works and that's the important thing. If you want the source PM me... if you can do something better, please do.
    Attached Files
    Reply With Quote  

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