Quantcast
Forcing Asian fonts to conform to chat size - WoWInterface
Thread Tools Display Modes
03-18-18, 05:28 PM   #1
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 507
Forcing Asian fonts to conform to chat size

I have my chat windows at size 10, but Asian fonts have their own size. I tried loading my own fonts.xml file hoping my heights would overwrite NumberFont_Shadow_Med (which is inherited by ChatFontNormal) but it does nothing.

I don't want to block these fonts (even though I can't read them) I just want them to be the same size as everything else.
  Reply With Quote
03-20-18, 02:31 AM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 328
Create your own or use already existing XML font template where all fonts are of the same desired size, then do the following:

Lua Code:
  1. for i = 1, NUM_CHAT_WINDOWS do
  2.     _G["ChatFrame"..i]:SetFontObject("FontTemplateName")
  3.     _G["ChatFrame"..i]:MakeFontObjectCustom()
  4. end

Using XML templates is important because atm only they support alphabets. Blizz use SetFont to update chat frame's font size, but it updates only 1(?) out of 5 alphabets.

I asked Dan in IRC to add SetRomanFont, SetKoreanFont, etc methods to font strings and objects (created via CreateFont) in addition to or in place of SetFont because it's quite needed in EU and OC regions, he liked the suggestion, but it won't be implemented soon because it's a low priority task for them and because entire fontstring-related system is kinda messed up and it's not that easy to work on >_>
__________________

Last edited by lightspark : 03-20-18 at 02:56 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Forcing Asian fonts to conform to chat size

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off