Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Importing Fonts  (Read 13609 times)

0 Members and 1 Guest are viewing this topic.

bf5man

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Importing Fonts
« on: March 02, 2003, 09:14:48 PM »

I'd like to know if there's an easy way to import fonts.
The hard part is to make the bmp and i haven't found a way to do this that took less than three hours  ;).

Thanks.

bf5man.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Importing Fonts
« Reply #1 on: March 02, 2003, 09:59:08 PM »

Well, I used Windows Notepad to make the default WME fonts ;D

But you might want to check this cute little utility instead:

http://www.lmnopc.com/bitmapfontbuilder/
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Scarpia

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 77
  • Rich kid trash web designer :-P
    • View Profile
    • junk dot dk
Re:Importing Fonts
« Reply #2 on: March 02, 2003, 11:22:58 PM »

Well, I used Windows Notepad to make the default WME fonts ;D

You did what??!??

Ehm.. Maybe I'm just a tech nerd, but.... I'm really curious as to how you managed that!??


Scarpia
Logged

bf5man

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re:Importing Fonts
« Reply #3 on: March 02, 2003, 11:31:56 PM »

Wow!  :o

That's exactly what i was looking for.

Thanks mister Mnemonic.

bf5man.
Logged

Scarpia

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 77
  • Rich kid trash web designer :-P
    • View Profile
    • junk dot dk
Re:Importing Fonts
« Reply #4 on: March 03, 2003, 01:06:13 AM »

Well..... I downloaded the font program, seems nice.. But then I created a 512x512 pixel font and imported it into WME. Somehow, I didn't get a .FONT definition to go with it, and I had no way of creating one...??

{edit} i managed to make a new .FONT by creating it from scratch in Notepad and saving it in the project's Fonts folder -- but that's pretty awkward really, it should be possible to do from the project manager (as in, context menu on font folder, then add font - whoop - automatically a new .FONT file..)


Scarpia


« Last Edit: March 03, 2003, 01:26:27 AM by Scarpia »
Logged

bf5man

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re:Importing Fonts
« Reply #5 on: March 03, 2003, 02:23:33 AM »

Scarpia,
I've got a spacing problem with the letters. Here an exemple: http://cybertechs.qc.ca/prs/mini-baja/font.gif

There's too much spacing and i can't find how to reduce it.

If you find how, tell me please :)

Another question, how can we find the "size" of a variable (the size of the array)?

thanks

bf5man.
Logged

Brassfire

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 69
    • View Profile
    • The Unknown Hero
Re:Importing Fonts
« Reply #6 on: March 03, 2003, 12:42:07 PM »

No ttf? :(
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Importing Fonts
« Reply #7 on: March 03, 2003, 02:49:21 PM »

You did what??!??

Ehm.. Maybe I'm just a tech nerd, but.... I'm really curious as to how you managed that!??
Heh heh :) Just put all the characters to a text file, opened the file in Notepad and took a screenshot. Of course, I have modified it heavily in Paint Shop afterwards. But it's cool to say I create fonts using Notepad, isn't it? ;)


{edit} i managed to make a new .FONT by creating it from scratch in Notepad and saving it in the project's Fonts folder -- but that's pretty awkward really, it should be possible to do from the project manager (as in, context menu on font folder, then add font - whoop - automatically a new .FONT file..)
I can't test it right now (don't have WME on this computer) but this *should* be possible. Right-click, Add->Add font. If it's not there, something's gone terribly wrong.


I've got a spacing problem with the letters. Here an exemple: http://cybertechs.qc.ca/prs/mini-baja/font.gif
Hmm, could you send me both files? I'll check it out. Do you have the background color set to trasparent (i.e. by default the pink color, RGB(255,0,255)). This seems WME is unable to determine the right edge of the letters (it tests where the trasparent pixels begin).


Another question, how can we find the "size" of a variable (the size of the array)?
Ahem, nope, currently not. It's a bit complicated because the arrays in WME are "sparse arrays". But it could at least return the number of members. I'll do something about it.


No ttf? :(
Nope, no TTF. I always liked the bitmap fonts better. They are easier to edit and TTF's tend to have problems with different codepages...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Scarpia

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 77
  • Rich kid trash web designer :-P
    • View Profile
    • junk dot dk
Re:Importing Fonts
« Reply #8 on: March 03, 2003, 06:20:24 PM »

Mnemonic: Heh, Notepad rocks. I use it all the time. It's cool to say I create pro web sites with DHTML, Javascript and ASP in Notepad ;)

Bf5man: my font started out that way too. Then I found out my problem was I created the BMP with a black background, and since the transparency color in the FONT file was set to pink (255,0,255), the letters were all too far apart. Altering it to (0,0,0) will push your letters closer together. HOWEVER, with my (rather large type) font, the letters are still too far apart. Something tells me the engine adds a number of pixels relative to the column width, and this function seems to be a bit too steep, but I can't tell for sure, as I'm obviously blackboxing here. Jan?


Scarpia
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Importing Fonts
« Reply #9 on: March 03, 2003, 06:24:19 PM »

HOWEVER, with my (rather large type) font, the letters are still too far apart. Something tells me the engine adds a number of pixels relative to the column width, and this function seems to be a bit too steep, but I can't tell for sure, as I'm obviously blackboxing here. Jan?

Hmmmm, by default it shouldn't. Unless you have something like "EXPAND_WIDTH = 1" in your font definition file.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Scarpia

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 77
  • Rich kid trash web designer :-P
    • View Profile
    • junk dot dk
Re:Importing Fonts
« Reply #10 on: March 03, 2003, 06:35:40 PM »

I dont use the EXPAND_WIDTH method. I tried it with negative numbers, but that's no good with wide characters like m's or w's. There is certainly several pixels between characters as it is now, and the BMP is 1-bit B/W, so it should work.

If that isn't it, then I can't figure it out.

Scarpia
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Importing Fonts
« Reply #11 on: March 03, 2003, 09:58:24 PM »

Um, I dunno then. I'd need to see the files to say more...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Importing Fonts
« Reply #12 on: March 05, 2003, 09:31:55 PM »

Ow, stupid me. I forgot to tell you one important thing: The letters must be left alligned to the grid! The engine only determines the right edge of the letters automatically.
See the attached picture to see what I mean.

This should do the trick; sorry I didn't think of it earlier :-[

« Last Edit: March 05, 2003, 09:33:25 PM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.053 seconds with 20 queries.