local _, addon = ...

local FontPath = "Interface\\AddOns\\CzechQuests\\Assets\\Fonts\\"

local TestFont = UIParent:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
TestFont:SetPoint("TOP", UIParent, "BOTTOM", 0, -64);

local function CreateCzechFont(frame, name, size, flags)
    local font = frame:CreateFontString(nil, "OVERLAY")
    font:SetTextColor(0, 0, 0, 1)
    font:SetJustifyH("LEFT")
    font:SetWidth(frame:GetWidth())
    font:SetFont(FontPath ..name, size, flags or "")
    return font
end
addon.API.CreateCzechFont = CreateCzechFont

local function UpdateCzechFont(FontString, name, size)
    local _, _, flags = FontString:GetFont()
    FontString:SetFont(FontPath .. name, size, flags)
end
addon.API.UpdateCzechFont = UpdateCzechFont

local function GetFontContainer()
    local container = Settings.CreateControlTextContainer()
    container:Add("morpheus_cz.ttf", "Morpheus (cz)")
    container:Add("frizquadratatt_cz.ttf", "Friz Quadrata TT (cz)")
    container:Add("quicksand.ttf", "Quicksand")
    container:Add("caveat.ttf", "Caveat")
    return container:GetData()
end
addon.API.GetFontContainer = GetFontContainer