Quantcast
WoWInterface - View Single Post - Unicode symbols in a string within quotes
View Single Post
07-07-20, 02:48 PM   #6
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 128
Originally Posted by Clayent View Post
In this case, could you please add this symbol "→" in any text of any addon and show me a code and an ingame screenshot with result?
Not sure what you're using the symbol for, maybe something like this works for you (the problem is that you can't use multiple different fonts at once, so you have to split the text and and anchor the segments manually unless there's a widget I don't know of that that support that):



Lua Code:
  1. local f = CreateFrame("Frame", nil, UIParent);
  2. f:SetPoint("CENTER");
  3. f:SetSize(200, 100);
  4.  
  5. local fs1 = f:CreateFontString(nil, "OVERLAY");
  6. fs1:SetFont([[Fonts\FRIZQT__.TTF]], 12);
  7. fs1:SetPoint("LEFT");
  8. fs1:SetText("This arrow");
  9.  
  10. local fs2 = f:CreateFontString(nil, "OVERLAY");
  11. fs2:SetFont([[Fonts\ARKai_T.TTF]], 12);
  12. fs2:SetPoint("LEFT", fs1, "RIGHT");
  13. fs2:SetText(" → ");
  14.  
  15. local fs3 = f:CreateFontString();
  16. fs3:SetFont([[Fonts\FRIZQT__.TTF]], 12);
  17. fs3:SetPoint("LEFT", fs2, "RIGHT");
  18. fs3:SetText("points right.");

PS: You can also use https://icomoon.io/app/ to generate a font that only contains the symbols you need and use it in your addon.

Edit: Removed LibSharedMedia

Last edited by sezz : 07-10-20 at 07:46 PM.
  Reply With Quote