Download
(13Kb)
Download
Updated: 09-05-19 08:45 AM
Pictures
File Info
Compatibility:
Classic (1.13.2)
Rise of Azshara (8.2.0)
Updated:09-05-19 08:45 AM
Created:09-05-19 08:45 AM
Downloads:267
Favorites:3
MD5:

LibIconFonts

Version: 1.0.1
by: Gethe [More]

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:


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:

Code:
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)

Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: