Thread Tools Display Modes
06-06-23, 11:17 AM   #1
Platine
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 71
AceConfig-3.0 own font file needed

I need to display text in national language. How can I set my own font file with diacritics of my language?



Lua Code:
  1. local LibStub = LibStub;
  2. local AceConfigRegistry = LibStub("AceConfigRegistry-3.0");
  3. local AceConfigDialog = LibStub("AceConfigDialog-3.0");
  4. local AceGUI = LibStub("AceGUI-3.0");
  5.  
  6. local My_Font = "Interface\\AddOns\\Test\\frizquadratatt_pl.ttf";
  7.  
  8.  
  9. -------------------------------------------------------------------------------------------------------------------
  10.  
  11. local testOptionsGroup =  {
  12.    type = "group",
  13.    order = 10,
  14.    name = "Test",        -- name of tab #1
  15.    get = function(info)
  16.       return info;
  17.    end,
  18.    set = function(info, value)
  19.       value = info;
  20.    end,
  21.    args = {
  22.         generalMainHeaderQS = { order = 10, type = "header", name = "Test section", },       -- header of section 1
  23.      
  24.       activateTestOption1 = {
  25.          type = "toggle", order = 20, name = "Zażłć gęślą jaźń", desc = "To jest testowy opis tej opcji", width = "double",
  26.          get = function(info)
  27.             return true;
  28.          end,
  29.          set = function(info, value)
  30.             wynik = value;
  31.          end,
  32.          },
  33.          
  34.       },
  35.    };
  36.  
  37.  
  38. -----------------------------------------
  39. --SETTING OF OPTIONS
  40. -----------------------------------------
  41. local options = {
  42.    type = "group",
  43.    args = {
  44.       general = { type = "group", name = " Test header   ver. 123" , childGroups = "tab",
  45.          get = function(info) return info end,
  46.          set = function(info, value)
  47.             info = value;
  48.          end,
  49.          args = {
  50.             testOptionsGrp = testOptionsGroup,
  51.             },
  52.          },
  53.       },
  54.    };
  55.  
  56. -----------------------------------------------------------------------------------------------------------------
  57.  
  58. -- general Test configuration
  59. AceConfigRegistry:RegisterOptionsTable("Test", options.args.general);
  60.  
  61. Test_OptionFrame = AceConfigDialog:AddToBlizOptions("Test");
  62. InterfaceOptionsFrame_OpenToCategory(Test_OptionFrame);

Last edited by Platine : 06-06-23 at 01:37 PM.
  Reply With Quote
06-08-23, 03:18 AM   #2
Platine
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 71
I can see that this is a difficult topic.
I decided to use a not so sophisticated solution by modifying the Ace libraries directly:

AceGUIWidget-Heading.lua
Line 28: self.label:SetFont(My_Font, 13);

AceGUIWidget-CheckBox.lua
Line 193: self.text:SetFont(My_Font, 13);

AceConfigDialog-3.0.lua
Line 512: _G[tooltip:GetName().."TextLeft1"]:SetFont(My_Font, 13);
Line 519: _G[tooltip:GetName().."TextLeft2"]:SetFont(My_Font, 13);

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » AceConfig-3.0 own font file needed

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