Author Topic: The '&' Symbol and the GLbasic Font Creation Tool  (Read 2112 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]
SETSCREEN 1366,768,FALSE
GLOBAL sw%,sh%,sm%
GETSCREENSIZE sw,sh
sm = sw/2
SETCURRENTDIR(GETCURRENTDIR$()+"Media")
GLOBAL fontkey = GENFONT(),fw%,fh%
LOADFONT "smalfont.png",fontkey
SETFONT fontkey
GETFONTSIZE fw,fh


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

SHOWSCREEN;KEYWAIT

Thanks!
-CW

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 »

MrTAToad

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

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1787
    • View Profile
    • Homepage
Everyone uses UO Dingsfont nowadays :-)
http://www.glbasic.com/forum/index.php?topic=6421.0

Offline CW

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

-CW

Offline SFguy

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

Offline hardyx

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