Quantcast
How to prevent font string from being multiline? - WoWInterface
Thread Tools Display Modes
05-18-21, 08:14 AM   #1
MinguasBeef
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 47
How to prevent font string from being multiline?

Is there any way to prevent a font string from being multiline?

I'm creating my font string like so...
Code:
frame.Texts[1] = frame:CreateFontString(nil,"OVERLAY") 
frame.Texts[1]:SetFont("Fonts\\ARIALN.ttf", 14, "OUTLINE")
frame.Texts[1]:SetPoint("LEFT", frame, "LEFT", 2, 0)
frame.Texts[1]:SetPoint("RIGHT", frame, "RIGHT", -2, 0)
frame.Texts[1]:SetJustifyH("LEFT")
When I have text that is long and contains spaces though, the text will go onto the next line. I'd rather the text just cut off like it does with long names that do not contain spaces.
  Reply With Quote
05-18-21, 10:27 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,424
Set the size or set TOPLEFT/BOTTOMRIGHT.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 05-18-21 at 10:49 AM.
  Reply With Quote
05-18-21, 12:21 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,844
https://wowprogramming.com/docs/widg...tWordWrap.html
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-19-21, 05:38 AM   #4
MinguasBeef
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 47
Thank you to both of you! Much appreciated.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to prevent font string from being multiline?

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