Author Topic: help with .png fonts please?  (Read 2060 times)

GEEK

  • Guest
help with .png fonts please?
« on: July 19, 2013, 04:14:07 PM »
Can someone explain me how to work wit mono-fonts and bitmap-fonts please?

i made a font in .png format and its not displaying correctly...
and how to use this:

loadbmpfont ("font_name.png",1,41,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")
what are the numbers?

thanks in advance
regards,

GEEK

  • Guest
Re: help with .png fonts please?
« Reply #1 on: July 19, 2013, 04:26:19 PM »
openwindow (800,600,32,"Bitmapfont Test")
colourkey (0,0,0)
myfont=loadbmpfont ("tamFont.png",1,4,"abc.")
backcolor (255,0,255)

testimage=createimage (600,22)
repeat
key=getkey()
cls()
startimagedraw (testimage)
  cls()
  bmptext (0,0,"acbc",myfont)
stopimagedraw()
double=zoomimage (testimage,3.0,3.0)
bmptext (50,150,"abacb",myfont)
bmptext (290,550,"....",myfont)
putimage (190,250,double)
freeimage (double)
sync()
until key==27
closewindow()

what am I doing wrong here?

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: help with .png fonts please?
« Reply #2 on: July 20, 2013, 07:45:52 AM »
Your are using a monofont as a bmpfont. In a bmpfont you don't need the purple lines above the characters. But if you are loading this as a monofont it has to be complete, see the readme.txt in the monofonts download.
Loadbmpfont on the other hand works like this:
loadbmpfont (filename, lines, rows, fontface)