星虎论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

查看: 17124|回复: 2

《魔兽世界》TBC字体修改方法

[复制链接]
  • TA的每日心情
    开心
    2024-3-23 16:40
  • 签到天数: 30 天

    [LV.5]常住居民I

    发表于 2007-9-14 09:05:33 | 显示全部楼层 |阅读模式
    2.14自定义字体的方法和大小的修改
    2.14恶心的字体(个人觉得)
    因为我现在在玩TF 但是我虽然有TF的客户端
    但是有部分插件的问题还是用CWOW的 和大家一样
    感觉字体不好看 自己在看了WOWAR和NGA的大大的字体修改后
    有个体会和认识,希望一样在有捆饶的FS同行有所帮助

    我不是专业的插件控!!!

    首先你必须有自己喜欢的自定义字体 在MOP和多玩上都能找到
    以前的字体应该是
    FZLBJW
    FZJZJW
    FZXHLJW
    FZXHJW
    FZBWJW
    这5个基本 然后有arialn等表情字体   
    而现在因为我们以前的插件都放在FONTS里面 而FONTS这个文件夹放在X:\World of Warcraft   里面
    而因为方正的问题(我不讨论)所以现在2.14又给“和谐”
    而新的办法很简单

    把FONTS里面的字体你保存好 然后把以前的字体的名字改成
    FZLBJW -> ZYKai_T
    FZJZJW -> ZYKai_C
    FZXHLJW -> ZYHei
    FZXHJW -> ZYHei
    FZBWJW -> ZYKai_T
    当然你现在会发现有重复的哦 很简单重复的就不要了也就是说
    新出的字有3个ZYKai_T ZYKai_C ZYHei

    这3个名字改了后 以前的5个+现在的3个 你就有8个字体文件在FONTS里面
    然后我们把FONTS的文件夹放在X:\World of Warcraft\Data 里面
    就OK了

    有朋友的插件或许跟我一样Quartz这个强大的施法插件好象不能用了 用我的这个方法就能解决这个问题
    对于以上不是我个人的能力解决的问题 只是从MOP等网上学到的比较通俗的办法

    而很多朋友跟我可能也有一个相同的问题就是自己的字体貌似很小 看起来很不舒服
    下个狂鼠大大的ClearFont 这个是个插件把她放在X:\World of Warcraft\Interface\Addons里面然后你打开ClearFont文件夹你会看到ClearFont.lua和ClearFont.toc这2个文件ClearFont.toc就不要去管他了你用记事本当然你有word更好了 打开后 挖!!那么长的文章

    -- /////////////////////////////////////////////////////////////////////////////
    -- =============================================================================
    -- 根据ClearFont v20000-2 版本汉化修改
    -- 原作者:KIRKBURN
    -- 官方网页:http://www.clearfont.co.uk/
    -- 汉化修改:五区 元素之力 逆袭的蓝
    -- 发布日期:07.07.10
    -- 2.1.4修改: 米之魂
    -- 最后修改日期: 07.09.07
    -- -----------------------------------------------------------------------------
    -- CLEARFONT.LUA - STANDARD WOW UI FONTS
    --   A. ClearFont 框架 及为了以后代码的简洁而预先定义字体位置
    --   B. 标准的WOW用户界面部分
    --   C. 每当一个插件载入时都重新载入的功能
    --   D. 第一次启动时应用以上设定
    -- =============================================================================
    -- /////////////////////////////////////////////////////////////////////////////




    -- =============================================================================
    -- A. ClearFont 框架 及为了以后代码的简洁而预先定义字体位置
    -- 你可以根据例子添加属于自己的字体
    -- =============================================================================

       ClearFont = CreateFrame("Frame", "ClearFont");

    -- 指出在哪里寻找字体
       local CLEAR_FONT_BASE = "Fonts\\";

    -- 状态栏、生命条、经验条上显示的英文和数字字体
       local CLEAR_FONT_NUMBER = CLEAR_FONT_BASE .. "ZYKai_T.TTF";

    -- 任务说明和书信、石碑的正文字体
       local CLEAR_FONT_QUEST = CLEAR_FONT_BASE .. "ZYKai_T.TTF";

    -- 战斗时的伤害数值提示文字
       local CLEAR_FONT_DAMAGE = CLEAR_FONT_BASE .. "ZYKai_C.TTF";

    -- 按钮和登陆画面及人物、物品、装备、技能等标题上的主要字体
       local CLEAR_FONT = CLEAR_FONT_BASE .. "ZYKai_T.TTF";

    -- 物品、技能的说明字体
       local CLEAR_FONT_ITEM = CLEAR_FONT_BASE .. "ZYHei.TTF";

    -- 聊天字体
       local CLEAR_FONT_CHAT = CLEAR_FONT_BASE .. "ZYKai_T.TTF";

    -- 添加属于自己的字体 (例子)
    --   local YOUR_FONT_STYLE = CLEAR_FONT_BASE .. "YourFontName.ttf";

    -- 字体的比例 - 比如:你想把所有字体缩小到80%,那么可以将"1.0"改成"0.8"
       local CF_SCALE = 1.0



    -- -----------------------------------------------------------------------------
    -- 检查存在的字体并改变它们
    -- -----------------------------------------------------------------------------

       local function CanSetFont(object)
        return (type(object)=="table"
           and object.SetFont and object.IsObjectType
           and not object:IsObjectType("SimpleHTML"));
       end

    [ 本帖最后由 化不肥 于 2007-9-14 09:14 编辑 ]
  • TA的每日心情
    开心
    2024-3-23 16:40
  • 签到天数: 30 天

    [LV.5]常住居民I

     楼主| 发表于 2007-9-14 09:06:16 | 显示全部楼层
    -- =============================================================================
    -- B. 标准的WOW用户界面部分
    -- =============================================================================
    -- 这是需要编辑的最重要的部分
    -- 主要的字体被预先列出,其余部分字体按照字母表顺序排列
    -- 如果在补丁改变的情况下,声明可能会有所忽略
    -- -----------------------------------------------------------------------------
    -- 举个例子:游戏初始字体如下:SetFont(CLEAR_FONT, 19 * CF_SCALE)
    -- 在括号里的第一部分是字体类型,第二部分是字体大小
    -- 根据个人所需而改变
    -- =============================================================================


       function ClearFont:ApplySystemFonts()


    -- -----------------------------------------------------------------------------
    -- 世界环境中、3D字体等 (Dark Imakuni)
    -- -----------------------------------------------------------------------------


    -- 聊天泡泡
       STANDARD_TEXT_FONT = CLEAR_FONT_CHAT;

    -- 人头上的名字
       UNIT_NAME_FONT = CLEAR_FONT;
       NAMEPLATE_FONT = CLEAR_FONT;


    -- 显示在被攻击目标头上的效果 (和插件SCT/SDT无关)
       DAMAGE_TEXT_FONT = CLEAR_FONT_DAMAGE;

    -- 拾取菜单字体大小
       UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 19 * CF_SCALE;


    -- -----------------------------------------------------------------------------
    -- Raid 等级色彩 (默认禁止)
    -- -----------------------------------------------------------------------------

    --   RAID_CLASS_COLORS = {
    --      ["HUNTER"] = { r = 0.67, g = 0.83, b = 0.45 },
    --      ["WARLOCK"] = { r = 0.58, g = 0.51, b = 0.79 },
    --      ["PRIEST"] = { r = 1.0, g = 1.0, b = 1.0 },
    --      ["PALADIN"] = { r = 0.96, g = 0.55, b = 0.73 },
    --      ["MAGE"] = { r = 0.41, g = 0.8, b = 0.94 },
    --      ["ROGUE"] = { r = 1.0, g = 0.96, b = 0.41 },
    --      ["DRUID"] = { r = 1.0, g = 0.49, b = 0.04 },
    --      ["SHAMAN"] = { r = 0, g = 0.86, b = 0.73 },
    --      ["WARRIOR"] = { r = 0.78, g = 0.61, b = 0.43 }
    --   };


    -- -----------------------------------------------------------------------------
    -- 系统字体
    -- -----------------------------------------------------------------------------

    if (CanSetFont(SystemFont)) then          SystemFont:SetFont(CLEAR_FONT, 19 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 主游戏字体: 随处可见的主要的字体
    -- -----------------------------------------------------------------------------

    if (CanSetFont(GameFontNormal)) then       GameFontNormal:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontHighlight)) then       GameFontHighlight:SetFont(CLEAR_FONT, 19 * CF_SCALE); end

    if (CanSetFont(GameFontDisable)) then       GameFontDisable:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontDisable)) then       GameFontDisable:SetTextColor(0.6, 0.6, 0.6); end

    if (CanSetFont(GameFontGreen)) then          GameFontGreen:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontRed)) then          GameFontRed:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontBlack)) then          GameFontBlack:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameFontWhite)) then          GameFontWhite:SetFont(CLEAR_FONT, 17 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 小字体:经常用小字体的地方,也用在 Titan Panel
    -- -----------------------------------------------------------------------------

    if (CanSetFont(GameFontNormalSmall)) then       GameFontNormalSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end

    if (CanSetFont(GameFontHighlightSmall)) then    GameFontHighlightSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameFontHighlightSmallOutline)) then    GameFontHighlightSmallOutline:SetFont(CLEAR_FONT, 17 * CF_SCALE, "OUTLINE"); end

    if (CanSetFont(GameFontDisableSmall)) then       GameFontDisableSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameFontDisableSmall)) then       GameFontDisableSmall:SetTextColor(0.6, 0.6, 0.6); end

    if (CanSetFont(GameFontDarkGraySmall)) then       GameFontDarkGraySmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameFontDarkGraySmall)) then       GameFontDarkGraySmall:SetTextColor(0.4, 0.4, 0.4); end

    if (CanSetFont(GameFontGreenSmall)) then       GameFontGreenSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameFontRedSmall)) then       GameFontRedSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 大字体:标题
    -- -----------------------------------------------------------------------------

    if (CanSetFont(GameFontNormalLarge)) then       GameFontNormalLarge:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontHighlightLarge)) then    GameFontHighlightLarge:SetFont(CLEAR_FONT, 19 * CF_SCALE); end

    if (CanSetFont(GameFontDisableLarge)) then       GameFontDisableLarge:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontDisableLarge)) then       GameFontDisableLarge:SetTextColor(0.6, 0.6, 0.6); end

    if (CanSetFont(GameFontGreenLarge)) then       GameFontGreenLarge:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(GameFontRedLarge)) then       GameFontRedLarge:SetFont(CLEAR_FONT, 19 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 极大字体:Raid警报
    -- -----------------------------------------------------------------------------

    if (CanSetFont(GameFontNormalHuge)) then       GameFontNormalHuge:SetFont(CLEAR_FONT, 21 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 战斗文字: 集成 SCT-style 信息
    -- -----------------------------------------------------------------------------

    if (CanSetFont(CombatTextFont)) then       CombatTextFont:SetFont(CLEAR_FONT, 26 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 数字字体: 拍卖行,金币,按键绑定,物品堆叠数量
    -- -----------------------------------------------------------------------------

    if (CanSetFont(NumberFontNormal)) then       NumberFontNormal:SetFont(CLEAR_FONT_NUMBER, 19 * CF_SCALE, "OUTLINE"); end
    if (CanSetFont(NumberFontNormalYellow)) then    NumberFontNormalYellow:SetFont(CLEAR_FONT_NUMBER, 19 * CF_SCALE, "OUTLINE"); end
    if (CanSetFont(NumberFontNormalSmall)) then       NumberFontNormalSmall:SetFont(CLEAR_FONT_NUMBER, 19 * CF_SCALE, "OUTLINE"); end
    if (CanSetFont(NumberFontNormalSmallGray)) then    NumberFontNormalSmallGray:SetFont(CLEAR_FONT_NUMBER, 19 * CF_SCALE, "OUTLINE"); end
    if (CanSetFont(NumberFontNormalLarge)) then       NumberFontNormalLarge:SetFont(CLEAR_FONT_NUMBER, 19 * CF_SCALE, "OUTLINE"); end

    if (CanSetFont(NumberFontNormalHuge)) then       NumberFontNormalHuge:SetFont(CLEAR_FONT_DAMAGE, 24 * CF_SCALE, "THICKOUTLINE"); end
    if (CanSetFont(NumberFontNormalHuge)) then       NumberFontNormalHuge:SetAlpha(30); end


    -- -----------------------------------------------------------------------------
    -- 聊天窗口输入字体和聊天窗口字体大小
    -- -----------------------------------------------------------------------------

    if (CanSetFont(ChatFontNormal)) then       ChatFontNormal:SetFont(CLEAR_FONT_CHAT, 19 * CF_SCALE); end

       CHAT_FONT_HEIGHTS = {
          [1] = 7,
          [2] = 8,
          [3] = 9,
          [4] = 10,
          [5] = 11,
          [6] = 12,
          [7] = 16,
          [8] = 17,
          [9] = 15,
          [10] = 19,
          [11] = 17,
          [12] = 18,
          [16] = 19,
          [17] = 20,
          [15] = 21,
          [19] = 22,
          [17] = 23,
          [18] = 24
       };
  • TA的每日心情
    开心
    2024-3-23 16:40
  • 签到天数: 30 天

    [LV.5]常住居民I

     楼主| 发表于 2007-9-14 09:07:50 | 显示全部楼层
    -- -----------------------------------------------------------------------------
    -- 任务日志: 任务日志、书籍等
    -- -----------------------------------------------------------------------------

    if (CanSetFont(QuestTitleFont)) then       QuestTitleFont:SetFont(CLEAR_FONT_QUEST, 18 * CF_SCALE); end
    if (CanSetFont(QuestTitleFont)) then       QuestTitleFont:SetShadowColor(0.54, 0.4, 0.1); end

    if (CanSetFont(QuestFont)) then           QuestFont:SetFont(CLEAR_FONT_QUEST, 19 * CF_SCALE); end
    if (CanSetFont(QuestFont)) then           QuestFont:SetTextColor(0.15, 0.09, 0.04); end

    if (CanSetFont(QuestFontNormalSmall)) then       QuestFontNormalSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(QuestFontNormalSmall)) then       QuestFontNormalSmall:SetShadowColor(0.54, 0.4, 0.1); end

    if (CanSetFont(QuestFontHighlight)) then       QuestFontHighlight:SetFont(CLEAR_FONT_QUEST, 15 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 对话框按钮:"同意"等字样
    -- -----------------------------------------------------------------------------

    if (CanSetFont(DialogButtonNormalText)) then    DialogButtonNormalText:SetFont(CLEAR_FONT, 15 * CF_SCALE); end
    if (CanSetFont(DialogButtonHighlightText)) then    DialogButtonHighlightText:SetFont(CLEAR_FONT, 15 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 错误字体:"另一个动作正在进行中"等字样
    -- -----------------------------------------------------------------------------

    if (CanSetFont(ErrorFont)) then           ErrorFont:SetFont(CLEAR_FONT, 19 * CF_SCALE); end
    if (CanSetFont(ErrorFont)) then           ErrorFont:SetAlpha(60); end


    -- -----------------------------------------------------------------------------
    -- 物品信息: 框架内的综合使用形式(大概包括任务物品的版面字体,比如可以携带的书籍)
    -- -----------------------------------------------------------------------------

    if (CanSetFont(ItemTextFontNormal)) then        ItemTextFontNormal:SetFont(CLEAR_FONT_ITEM, 19 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 邮件和发货单字体:游戏中邮件和拍卖行发货单
    -- -----------------------------------------------------------------------------

    if (CanSetFont(MailTextFontNormal)) then        MailTextFontNormal:SetFont(CLEAR_FONT_QUEST, 19 * CF_SCALE); end
    if (CanSetFont(MailTextFontNormal)) then        MailTextFontNormal:SetTextColor(0.15, 0.09, 0.04); end
    if (CanSetFont(MailTextFontNormal)) then        MailTextFontNormal:SetShadowColor(0.54, 0.4, 0.1); end
    if (CanSetFont(MailTextFontNormal)) then        MailTextFontNormal:SetShadowOffset(1, -1); end

    if (CanSetFont(InvoiceTextFontNormal)) then        InvoiceTextFontNormal:SetFont(CLEAR_FONT_QUEST, 15 * CF_SCALE); end
    if (CanSetFont(InvoiceTextFontNormal)) then        InvoiceTextFontNormal:SetTextColor(0.15, 0.09, 0.04); end

    if (CanSetFont(InvoiceTextFontSmall)) then        InvoiceTextFontSmall:SetFont(CLEAR_FONT_QUEST, 16 * CF_SCALE); end
    if (CanSetFont(InvoiceTextFontSmall)) then        InvoiceTextFontSmall:SetTextColor(0.15, 0.09, 0.04); end


    -- -----------------------------------------------------------------------------
    -- 技能书:技能副标题
    -- -----------------------------------------------------------------------------

    if (CanSetFont(SubSpellFont)) then           SubSpellFont:SetFont(CLEAR_FONT_QUEST, 17 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 状态栏:单位框架的数字、Damage Meters
    -- -----------------------------------------------------------------------------

    if (CanSetFont(TextStatusBarText)) then        TextStatusBarText:SetFont(CLEAR_FONT_NUMBER, 15 * CF_SCALE, "OUTLINE"); end
    if (CanSetFont(TextStatusBarTextSmall)) then    TextStatusBarTextSmall:SetFont(CLEAR_FONT, 19 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- 提示框
    -- -----------------------------------------------------------------------------

    if (CanSetFont(GameTooltipText)) then        GameTooltipText:SetFont(CLEAR_FONT, 15 * CF_SCALE); end
    if (CanSetFont(GameTooltipTextSmall)) then        GameTooltipTextSmall:SetFont(CLEAR_FONT, 17 * CF_SCALE); end
    if (CanSetFont(GameTooltipHeaderText)) then        GameTooltipHeaderText:SetFont(CLEAR_FONT, 19 * CF_SCALE, "OUTLINE"); end


    -- -----------------------------------------------------------------------------
    -- 世界地图:位置标题
    -- -----------------------------------------------------------------------------

    if (CanSetFont(WorldMapTextFont)) then        WorldMapTextFont:SetFont(CLEAR_FONT, 102 * CF_SCALE, "THICKOUTLINE"); end
    if (CanSetFont(WorldMapTextFont)) then        WorldMapTextFont:SetShadowColor(0, 0, 0); end
    if (CanSetFont(WorldMapTextFont)) then        WorldMapTextFont:SetShadowOffset(1, -1); end
    if (CanSetFont(WorldMapTextFont)) then        WorldMapTextFont:SetAlpha(40); end


    -- -----------------------------------------------------------------------------
    -- 区域切换显示:在屏幕中央通知
    -- -----------------------------------------------------------------------------

    if (CanSetFont(ZoneTextFont)) then           ZoneTextFont:SetFont(CLEAR_FONT, 112 * CF_SCALE, "THICKOUTLINE"); end
    if (CanSetFont(ZoneTextFont)) then           ZoneTextFont:SetShadowColor(0, 0, 0); end
    if (CanSetFont(ZoneTextFont)) then           ZoneTextFont:SetShadowOffset(1, -1); end

    if (CanSetFont(SubZoneTextFont)) then        SubZoneTextFont:SetFont(CLEAR_FONT, 26 * CF_SCALE, "THICKOUTLINE"); end


    -- -----------------------------------------------------------------------------
    -- 战斗纪录文字 (不再被使用了?)
    -- -----------------------------------------------------------------------------

    if (CanSetFont(CombatLogFont)) then          CombatLogFont:SetFont(CLEAR_FONT, 19 * CF_SCALE); end


    -- -----------------------------------------------------------------------------
    -- PVP信息(“争夺中的领土”、“联盟领地”等)
    -- -----------------------------------------------------------------------------

    if (CanSetFont(PVPInfoTextFont)) then       PVPInfoTextFont:SetFont(CLEAR_FONT, 22 * CF_SCALE, "THICKOUTLINE"); end


       end




    -- =============================================================================
    -- C. 每当一个插件载入时都重新载入的功能
    -- 他们真喜欢搞乱我的插件!
    -- =============================================================================

       ClearFont:SetScript("OnEvent",
           function()
           if (event == "ADDON_LOADED") then
              ClearFont:ApplySystemFonts()
           end
           end);

       ClearFont:RegisterEvent("ADDON_LOADED");




    -- =============================================================================
    -- D. 第一次启动时应用以上设定
    -- 让球能够滚起来
    -- =============================================================================

       ClearFont:ApplySystemFonts()


    细心的朋友可以一个一个发现很多系统的字体的大小
    比如GameFontNormal:SetFont(CLEAR_FONT, 19 * CF_SCALE); end等等
    中间一个19 就是字体的大小
    按我的经验数字越大显示的字体就越大
    这里的19是我自己改的 因为狂鼠大大说2.X后字体大小基本就是12和14你可以用WORD的替换把ClearFont.lua里面所有的12替换成16 14替换成19 这个只是我的推荐当然你可以改成你自己习惯的大小
    然后保存下就OK 然后你进游戏看看 没什么问题的话 你的系统字包括任务 好友 等等 字体都变大了 不再忍受小字的不舒坦

    很可能修改狂鼠大大的插件对他不是很礼貌 但是为了我的眼睛(偶好自私。。)还是对不起他们了
    感谢下MOP的娜娜姐姐 还有狂鼠大大这些插件控的先驱给我们提供了更加舒服的游戏空间和环境

    希望对大家有所帮助
    *滑块验证:
    您需要登录后才可以回帖 登录 | 马上注册

    本版积分规则



    qq群及公众号二维码

    QQ|小黑屋|手机版|Archiver|星虎 ( 黔ICP备05004538号 )

    GMT+8, 2024-4-20 12:05

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表