The simplest option is probably just to do this:
Code:
hooksecurefunc("GuildRosterButton_SetStringText", function(buttonString, text, isOnline, class)
if strmatch(text, "%D") then
-- text contains something that isn't a number, use the standard font:
buttonString:SetFontObject(GameFontHighlightSmall)
else
-- text contains only numbers, use a smaller font:
buttonString:SetFontObject(GameFontWhiteTiny)
end
end)
If there are some other columns that display numbers that you don't want to make smaller, this might work, but I didn't test it:
Code:
hooksecurefunc("GuildRoster_Update", function()
-- What viewing mode are we in?
local currentGuildView = UIDropDownMenu_GetSelectedValue(GuildRosterViewDropdown)
-- In most viewing modes the target column shows a level:
local fontObject = GameFontWhiteTiny
-- But in one viewing mode it shows text:
if currentGuildView == "guildStatus" then
fontObject = GameFontHighlightSmall
end
-- Loop over all the rows in the roster list:
local buttons = GuildRosterContainer.buttons
for i = 1, #buttons do
local button = buttons[i]
-- And apply the desired font object:
button.string1:SetFontObject(GameFontWhiteTiny)
end
end)