logo
wow addon LibIconFonts

LibIconFonts

Game Version: 8.2.0
Total Downloads: 23
Updated: Sep 5, 2019
Created: Sep 2, 2019

Earlier Versions

Name Size Uploaded Game Version Downloads
1.0.1 release 12.96 KB Sep 5, 2019 8.2.0 17 download LibIconFonts 1.0.1 releaseDownload
e8eaaac alpha 12.96 KB Sep 5, 2019 8.2.0 3 download LibIconFonts e8eaaac alphaDownload
0d6b0a3 alpha 12.96 KB Sep 5, 2019 8.2.0 3 download LibIconFonts 0d6b0a3 alphaDownload

Description

Share this:

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)
“`

Comments

Add a comment