Simply changing the default color of the error font object won't do much, since most (if not all) types of error messages are sent to the error frame along with a color specific to the message. To override the colors for all messages, you need to replace the function that tells the frame what color to use for each message:
Code:
local orig = UIErrorFrame.AddMessage
function UIErrorFrame:AddMessage(message, r, g, b, ...)
orig(message, 1, 1, 0, ...)
end
As for the "floating combat text" font, if you're talking about the damage/healing numbers that appear over units in the game world -- those are rendered as part of the 3D game world, not as part of the interface, and you can't change any of their properties except for the font itself. You can't change the size or color, you can't remove the shadow, you can't add an outline, etc. This is all you can do:
Code:
DAMAGE_TEXT_FONT = "Interface\\AddOns\\MyAddon\\MyFont.ttf"
You can (probably) change more properties for the
actual "floating combat text" -- friendly healer names, aura changes, reactive abilities, enter/leave combat, etc. -- this way:
Code:
local font, size = CombatTextTemplate:GetFont()
CombatTextTemplate:SetFont(font, size, "OUTLINE") -- add an outline
CombatTextTemplate:SetShadowOffset(0, 0) -- remove the shadow
Again, changing the default color likely won't achieve much, as each message is displayed in a specific color that overrides the default color of the font object. If you want to override those colors, look through the default UI code in Blizzard_CombatText.lua, find the function that actually tells the font strings what text to display, and pre-hook (replace) it.