How do I set a button.caption to the webdings “play” character?
I keep getting the system font and the number 4
I verified the font exists. ButtonFont is a string for the font.
If App.ButtonFont <> "" Then
Bevel17PlayWord.Icon = Nil
Bevel17PlayWord.TextFont = App.ButtonFont
Bevel17PlayWord.TextSize = 18
Bevel17PlayWord.Caption = Chr(52)
Else
Bevel17PlayWord.Caption = ""
End If
If App.ButtonFont <> "" Then
Bevel17PlayWord.Icon = Nil
Bevel17PlayWord.TextFont = App.ButtonFont
Bevel17PlayWord.TextSize = 18
Bevel17PlayWord.TextSize.Caption = &uF034
Else
Bevel17PlayWord.Caption = ""
End If
and i’m sure you came to wonder “how the heck did he figure out &uF034?”
well
opened font book on os x
select web dings
scrolled the the character I wanted to see & the help tag that shows up show the Unicode code point as that value
You don’t understand. It is coincidental that the slot is &h34. It has nothing to do with Unicode F034. &uF034 is found in other slots all over the map in other Microsoft fonts such as Segoe UI Symbol.
Thank you for the “&uf034”.
I am wondering now about something that seems to be impossible - or I have Wingdings instead of Webdings. I spent quite a bit of time trying to figure out what was happening, but the font that is being displayed is Wingdings and not Webdings. I double checked the textfont and tried to change the hex value about 20 times before it occurred to look at the very next font and there were the symbols that weren’t supposed to be there.
Just in case my code is wrong:
[code] Dim fc As Integer//for setting the Windings font for special characters
fc = FontCount-1
For fi As Integer = 0 To fc
If Font(fi) = ButtonFont Then
ButtonFont = Font(fi)//ButtonFont = ButtonFont
Exit
ElseIf fi = fc And Font(fi) <> ButtonFont Then
ButtonFont = ""
End If
Next//for setting the Windings font for special characters[/code]
Edit: I took out the part for selecting the font (leaving System font as default), and found the character &U25B6 and got my character.