This is a supporting Class that allows easy (and much more readable) access to Icon characters within the Unicode, FontAwesome and Ligature fonts.
I wrote this for use with my upcoming SmartHost class but it has value as a standalone class.
The three fonts that are mapped are:
Unicode (Symbola): Version 2.300
For a list of Unicode symbols point your browser to http://www.unicode.org/charts/ and select a range in Symbols and Punctuation. Not all ranges extended ranges are represented in this Library. The font file is too large to attach to this thread but you can find it on my Google Drive here.
Font Awesome: Version 4.4
For a list of FontAwesome Symbols and to download the font point your browser to https://fortawesome.github.io/Font-Awesome/icons
Ligature: Version 2.11
For a list of Ligature symbols and to download the font point your browser to http://kudakurage.com/ligature_symbols
All of these fonts are available for free use and distribution but Font Awesome and Ligature request simple attribution of some sort.
How to use it.
Icons are broken down by code block for the Unicode range.
Unicode Basic
Arrows *
BoxDrawings *
BlockElements *
GeoShapes *
GeoShapesExt *
Unicode All adds these ranges.
Dingbats
MiscSymbols
PlayingCards
MiscSymbolsExt
Transport
You do not need to use the Unicode.TTF referenced here in order to use these ranges. This library simply provides a pointer to a character within the font table. If your chosen font contains that character it will be displayed. In working with Android I have found their implementation of the Unicode standard to be decent but there are gaps in the character range.
If you request a font to display a given character and that character is not available Android will check other available fonts for a match. If no match is found across all available fonts then a "missing" default character will be used, typically this looks like a rectangle stood on its shortest edge.
Emoji characters are not the same across android devices as there are some vendor specific improvements: http://apps.timwhitlock.info/emoji/tables/unicode
Lastly here is an awesome Emoji set that is much better than the default Android one and as good, if not better, than the IOS Emoji set. Go to www.emojione.com and scroll down. Again it is free to use with attribution. Although this character set is not yet mapped I'm sure I will add it in the future.
I wrote this for use with my upcoming SmartHost class but it has value as a standalone class.
The three fonts that are mapped are:
Unicode (Symbola): Version 2.300
For a list of Unicode symbols point your browser to http://www.unicode.org/charts/ and select a range in Symbols and Punctuation. Not all ranges extended ranges are represented in this Library. The font file is too large to attach to this thread but you can find it on my Google Drive here.
Font Awesome: Version 4.4
For a list of FontAwesome Symbols and to download the font point your browser to https://fortawesome.github.io/Font-Awesome/icons
Ligature: Version 2.11
For a list of Ligature symbols and to download the font point your browser to http://kudakurage.com/ligature_symbols
All of these fonts are available for free use and distribution but Font Awesome and Ligature request simple attribution of some sort.
How to use it.
B4X:
Dim Icons As Icons_
'Initializes the Icon map in the ranges (FontAwesome, Ligature, UnicodeBasic, UnicodeAll)
Icons.Initialize(True, False, False, True)
btnKey.Text = Icons.FA.Key
btnYes.Text = Icons.Unicode.MiscSymbols.Ballot_Box_With_Check
btnNo.Text = Icons.Unicode.MiscSymbols.Ballot_Box
btnAsterix.Text = MyString & " " & Icons.Unicode.Dingbats.Balloon_Spoked_Asterisk
Icons are broken down by code block for the Unicode range.
Unicode Basic
Arrows *
BoxDrawings *
BlockElements *
GeoShapes *
GeoShapesExt *
Unicode All adds these ranges.
Dingbats
MiscSymbols
PlayingCards
MiscSymbolsExt
Transport
You do not need to use the Unicode.TTF referenced here in order to use these ranges. This library simply provides a pointer to a character within the font table. If your chosen font contains that character it will be displayed. In working with Android I have found their implementation of the Unicode standard to be decent but there are gaps in the character range.
If you request a font to display a given character and that character is not available Android will check other available fonts for a match. If no match is found across all available fonts then a "missing" default character will be used, typically this looks like a rectangle stood on its shortest edge.
Emoji characters are not the same across android devices as there are some vendor specific improvements: http://apps.timwhitlock.info/emoji/tables/unicode
Lastly here is an awesome Emoji set that is much better than the default Android one and as good, if not better, than the IOS Emoji set. Go to www.emojione.com and scroll down. Again it is free to use with attribution. Although this character set is not yet mapped I'm sure I will add it in the future.
Attachments
Last edited: