Author Topic: The '&' Symbol and the GLbasic Font Creation Tool  (Read 2874 times)

Offline CW

  • Mr. Polyvector
  • ***
  • Posts: 155
    • View Profile
Hi all,

Today I was working on a key-mapping utility as part of my larger keyboard scanning function, based on the swift K=Key() command, and I came upon a puzzling absence in the font sets created by the GLbasic utility. The '&' symbol is missing. This isn't a big deal and is easily correct, but I am just curious as to if there is a reason the symbol isn't there.

Here is a bit of code to show the problem. Create a font, name it "smalfont.png", and save it to the Media folder. Then run the following:

Code: (glbasic) [Select]
GLOBAL sw%,sh%,sm%
sm = sw/2
GLOBAL fontkey = GENFONT(),fw%,fh%
LOADFONT "smalfont.png",fontkey
SETFONT fontkey

PRINT "Ascii code 38 is the 'AND' sign,",50,fh,TRUE

LOCAL a$ = "&"
PRINT "Let a$ = "+CHR$(34)+"&"+CHR$(34)+".  Here is a$-> |"+a$+"|",50,fh*2,TRUE
PRINT "It is also CHR$(38). Here is CHR$(38)-> |"+CHR$(38)+"|",50,fh*3,TRUE

PRINT "The symbol is missing from GLbasic font creation utility.",50,fh*5,TRUE
PRINT "Is there a reason, or is it just a minor oversight?",50,fh*6,TRUE

PRINT "                     Press Key to Exit.",50,fh*8,TRUE



PS. Attached is a character set with my hand-drawn '&' symbol included, for anyone who might find it handy.
« Last Edit: 2013-Jun-08 by CW »


  • Guest
Yes, its a bug alright - wonder if it was present in either versions of the program

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1793
    • View Profile
    • Homepage
Everyone uses UO Dingsfont nowadays :-)

Offline CW

  • Mr. Polyvector
  • ***
  • Posts: 155
    • View Profile
A WONDERFUL Utility!  :-*
I'm sold. Thx Moru!


Offline SFguy

  • Mc. Print
  • *
  • Posts: 41
    • View Profile
UO Dingsfont looks good.  Thanks!

Offline hardyx

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 505
    • View Profile
I'm looking all my generated fonts, and they don't have the ampersand sign. :S