SHARE
TWEET

Untitled

a guest May 20th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. -- Change Default Fonts
  3. do
  4.   local NewFont = cfg.main_font
  5.   STANDARD_TEXT_FONT = NewFont
  6.   UNIT_NAME_FONT = NewFont
  7.   DAMAGE_TEXT_FONT = NewFont
  8.   NAMEPLATE_FONT = NewFont
  9.   NAMEPLATE_SPELLCAST_FONT = NewFont
  10.   local ForcedSize = { 11, 13, 17, 65, 65}
  11.   local FontObjects = {
  12.     -- These five fonts use the fixedSize argument, causing an incorrect font size return, so input our own sizes (ForcedFontSize)
  13.     SystemFont_NamePlateCastBar, SystemFont_NamePlateFixed, SystemFont_LargeNamePlateFixed,
  14.     SystemFont_World, SystemFont_World_ThickOutline,
  15.     -- Fonts.xml
  16.     SystemFont_Outline_Small, SystemFont_Outline, SystemFont_InverseShadow_Small,
  17.     SystemFont_Med2, SystemFont_Med3, SystemFont_Shadow_Med3,
  18.     SystemFont_Huge1, SystemFont_Huge1_Outline, SystemFont_OutlineThick_Huge2,
  19.     SystemFont_OutlineThick_Huge4, SystemFont_OutlineThick_WTF, NumberFont_GameNormal,
  20.     NumberFont_Shadow_Small, NumberFont_OutlineThick_Mono_Small, NumberFont_Shadow_Med,
  21.     NumberFont_Normal_Med, NumberFont_Outline_Med, NumberFont_Outline_Large,
  22.     NumberFont_Outline_Huge, Fancy22Font, QuestFont_Huge,
  23.     QuestFont_Outline_Huge, QuestFont_Super_Huge, QuestFont_Super_Huge_Outline,
  24.     SplashHeaderFont, Game11Font, Game12Font, Game13Font,
  25.     Game13FontShadow, Game15Font, Game18Font, Game20Font,
  26.     Game24Font, Game27Font, Game30Font, Game32Font,
  27.     Game36Font, Game48Font, Game48FontShadow, Game60Font,
  28.     Game72Font, Game11Font_o1, Game12Font_o1, Game13Font_o1,
  29.     Game15Font_o1, QuestFont_Enormous, DestinyFontLarge, CoreAbilityFont,
  30.     DestinyFontHuge, QuestFont_Shadow_Small, MailFont_Large, SpellFont_Small,
  31.     InvoiceFont_Med, InvoiceFont_Small, Tooltip_Med, Tooltip_Small,
  32.     AchievementFont_Small, ReputationDetailFont, FriendsFont_Normal,
  33.     FriendsFont_Small, FriendsFont_Large, FriendsFont_UserText,
  34.     GameFont_Gigantic, ChatBubbleFont, Fancy16Font, Fancy18Font,
  35.     Fancy20Font, Fancy24Font, Fancy27Font, Fancy30Font, Fancy32Font,
  36.     Fancy48Font, SystemFont_NamePlate, SystemFont_LargeNamePlate,
  37.     -- SharedFonts.xml
  38.     SystemFont_Tiny2, SystemFont_Tiny, SystemFont_Shadow_Small,
  39.     SystemFont_Small, SystemFont_Small2, SystemFont_Shadow_Small2,
  40.     SystemFont_Shadow_Med1_Outline, SystemFont_Shadow_Med1, QuestFont_Large,
  41.     SystemFont_Large, SystemFont_Shadow_Large_Outline, SystemFont_Shadow_Med2,
  42.     SystemFont_Shadow_Large, SystemFont_Shadow_Large2, SystemFont_Shadow_Huge1,
  43.     SystemFont_Huge2, SystemFont_Shadow_Huge2, SystemFont_Shadow_Huge3,
  44.     SystemFont_Shadow_Outline_Huge3, SystemFont_Shadow_Outline_Huge2,
  45.     SystemFont_Med1, SystemFont_WTF2, SystemFont_Outline_WTF2,
  46.     GameTooltipHeader, System_IME,
  47.   }
  48.   for i, FontObject in pairs(FontObjects) do
  49.     local _, OldSize, OldStyle = FontObject:GetFont()
  50.     FontObject:SetFont(NewFont, ForcedSize[i] or OldSize, OldStyle)
  51.     FontObject:SetShadowColor(0, 0, 0, 0)
  52.     FontObject:SetShadowOffset(0, 0)
  53.   end
  54.   FontObjects = nil
  55. end
  56. -- Outline Fonts
  57. do
  58.   for _, FontObject in pairs(cfg.outline_font) do
  59.     local font, size = FontObject:GetFont()
  60.     FontObject:SetFont(font, size, "OUTLINE")
  61.     FontObject:SetShadowColor(0, 0, 0, 0)
  62.     FontObject:SetShadowOffset(0, 0)
  63.   end
  64. end
  65. -- Hide Font Outlines
  66. do
  67.   for _, FontObject in pairs(cfg.hide_font) do
  68.     local font, size = FontObject:GetFont()
  69.     FontObject:SetFont(font, size, "NONE")
  70.     FontObject:SetShadowColor(0, 0, 0, 0.5)
  71.     FontObject:SetShadowOffset(0, 0)
  72.   end
  73. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top