Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
1.0.1 release | 12.96 KB | Sep 5, 2019 | 8.2.0 | 50 | Download |
e8eaaac alpha | 12.96 KB | Sep 5, 2019 | 8.2.0 | 9 | Download |
0d6b0a3 alpha | 12.96 KB | Sep 5, 2019 | 8.2.0 | 5 | Download |
Description
LibIconFonts
This is a library for World of Warcraft that provides easy access to icon font glyphs. Font files are not included.
Currently supported icon fonts include:
- FontAwesome 4.7 download | preview
API
lib:GetIconFont(fontName)
Parameters
fontName – The registered name of an icon font. (string)
Returns
icons – List of unicode characters indexed by name. (table)
Note: The names for each character is determined by the individual icon font set, excluding any redundant prefix.
lib:RegisterIconFont(fontName, fontFunc)
Parameters
fontName – The name of an icon font. (string)
fontFunc – A function that returns a table containing a list of icons. (function)
Example usage:
“`
local frame = _G.CreateFrame("Frame", nil, _G.UIParent, "BasicFrameTemplate")
frame:SetSize(925, 600)
frame:SetPoint("CENTER")
local fa = _G.LibStub("LibIconFonts-1.0"):GetIconFont("FontAwesome-4.7")
local icon = frame:CreateFontString(nil, "ARTWORK")
icon:SetFont([[path\to\fontawesome.ttf]], 16, "OUTLINE")
icon:SetText(fa.microphone)
icon:SetPoint("CENTER", frame)
“`
Add a comment