Microsoft Small Basic

Program Listing: QZS270
' Webdings / Wingdings font symbols (not Unicode) and Unicode Miscellaneous Symbols
InitSuites()
x0 = 60 ' left
y0 = 80 ' top
fh = 50 ' font height
GraphicsWindow.FontSize = fh
n = Array.GetItemCount(suites)
index = Array.GetAllIndices(suites)
For i = 1 To n
GraphicsWindow.BrushColor = suites[index[i]]["color"]
sHex = suites[index[i]]["code"]
Math_Hex2Dec()
GraphicsWindow.FontName = suites[index[i]]["font"]
ch = Text.GetCharacter(iDec)
j = Math.Remainder(i - 1, 10)
GraphicsWindow.DrawText(x0 + j * fh, y0, ch)
If j = 9 Then
y0 = y0 + fh
EndIf
EndFor
Sub InitSuites
suites["spider"] = "color=Black;code=21;font=Webdings;"
suites["web"] = "color=Gray;code=22;font=Webdings;"
suites["bubble"] = "color=Pink;code=29;font=Webdings;"
suites["smile"] = "color=Orange;code=4A;font=Wingdings;"
suites["normal"] = "color=Orange;code=4B;font=Wingdings;"
suites["sad"] = "color=Orange;code=4C;font=Wingdings;"
suites["dynamite"] = "color=DimGray;code=4D;font=Wingdings;"
suites["scul"] = "color=Wheat;code=4E;font=Wingdings;"
suites["Aries2"] = "color=Black;code=5E;font=Wingdings;"
suites["Taurus2"] = "color=Black;code=5F;font=Wingdings;"
suites["Gemini2"] = "color=Black;code=60;font=Wingdings;"
suites["Cancer2"] = "color=FireBrick;code=61;font=Wingdings;"
suites["Leo2"] = "color=Peru;code=62;font=Wingdings;"
suites["Vergo2"] = "color=Black;code=63;font=Wingdings;"
suites["Libre2"] = "color=Black;code=64;font=Wingdings;"
suites["Scorpio2"] = "color=DarkRed;code=65;font=Wingdings;"
suites["Sagittarius2"] = "color=Black;code=66;font=Wingdings;"
suites["Capricorn2"] = "color=Black;code=67;font=Wingdings;"
suites["Aquarius2"] = "color=Aqua;code=68;font=Wingdings;"
suites["Pisces2"] = "color=DarkBlue;code=69;font=Wingdings;"
suites["pattern1"] = "color=Black;code=2591;font=MS UI Gothic;"
suites["pattern2"] = "color=Black;code=2592;font=MS UI Gothic;"
suites["pattern3"] = "color=Black;code=2593;font=MS UI Gothic;"
suites["pattern4"] = "color=Black;code=25A3;font=MS UI Gothic;"
suites["pattern5"] = "color=Black;code=25A4;font=MS UI Gothic;"
suites["pattern6"] = "color=Black;code=25A5;font=MS UI Gothic;"
suites["pattern7"] = "color=Black;code=25A6;font=MS UI Gothic;"
suites["pattern8"] = "color=Black;code=25A7;font=MS UI Gothic;"
suites["pattern9"] = "color=Black;code=25A8;font=MS UI Gothic;"
suites["pattern10"] = "color=Black;code=25A9;font=MS UI Gothic;"
suites["club"] = "color=Black;code=2663;font=MS UI Gothic;"
suites["diamond"] = "color=Red;code=2666;font=MS UI Gothic;"
suites["heart"] = "color=Red;code=2665;font=MS UI Gothic;"
suites["spade"] = "color=Black;code=2660;font=MS UI Gothic;"
suites["knight"] = "color=Maroon;code=265E;font=MS UI Gothic;"
suites["rook"] = "color=Gray;code=265C;font=MS UI Gothic;"
suites["bishop"] = "color=Indigo;code=265D;font=MS UI Gothic;"
suites["porn"] = "color=Green;code=265F;font=MS UI Gothic;"
suites["king"] = "color=Gold;code=265A;font=MS UI Gothic;"
suites["queen"] = "color=Silver;code=265B;font=MS UI Gothic;"
suites["Aries"] = "color=Black;code=2648;font=MS UI Gothic;"
suites["Taurus"] = "color=Black;code=2649;font=MS UI Gothic;"
suites["Gemini"] = "color=Black;code=264A;font=MS UI Gothic;"
suites["Cancer"] = "color=FireBrick;code=264B;font=MS UI Gothic;"
suites["Leo"] = "color=Peru;code=264C;font=MS UI Gothic;"
suites["Vergo"] = "color=Black;code=264D;font=MS UI Gothic;"
suites["Libre"] = "color=Black;code=264E;font=MS UI Gothic;"
suites["Scorpio"] = "color=DarkRed;code=264F;font=MS UI Gothic;"
suites["Sagittarius"] = "color=Black;code=2650;font=MS UI Gothic;"
suites["Capricorn"] = "color=Black;code=2651;font=MS UI Gothic;"
suites["Aquarius"] = "color=Aqua;code=2652;font=MS UI Gothic;"
suites["Pisces"] = "color=DarkBlue;code=2653;font=MS UI Gothic;"
suites["sun"] = "color=DarkRed;code=2600;font=MS UI Gothic;"
suites["cloud"] = "color=Gray;code=2601;font=MS UI Gothic;"
suites["rain"] = "color=Blue;code=2602;font=MS UI Gothic;"
suites["snow"] = "color=Gray;code=2603;font=MS UI Gothic;"
suites["star"] = "color=Olive;code=2605;font=MS UI Gothic;"
suites["shogi"] = "color=SandyBrown;code=2617;font=MS UI Gothic;"
EndSub
Sub Math_Hex2Dec
' Math | Convert hexadecimal to decimal
' param sHex
' return iDec
iDec = 0
iLen = Text.GetLength(sHex)
For iPtr = 1 To iLen
iDec = iDec * 16 + Text.GetIndexOf("0123456789ABCDEF", Text.GetSubText(sHex, iPtr, 1)) - 1
EndFor
EndSub