Graphics

 View Only
Expand all | Collapse all

text size based on character count

  • 1.  text size based on character count

    Posted 05-12-2022 10:53
    I have a News scene that displays quotes. I based the font size on instances where there is a fairly long quote, but it looks bad if the quote is short, as it leaves too much open space in the scene. I would like the text size to increase when there is less text. Can I do this with visual logic?

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------


  • 2.  RE: text size based on character count

    MalThePal
    Posted 05-13-2022 01:07
    It's easier to build the scene for a short quote and have a large font. Then as the quote gets longer you can "auto squeeze" the vertical and horizontal size of the font so that it fits the text box.

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 3.  RE: text size based on character count

    Posted 05-13-2022 12:09
    Thanks, Malcolm. The way it works now, the text is at the top of the text box and each line goes down. I need it to be in the center and expand up and down from the center, and I need it to have a limit. Now it will just go forever. I really appreciate your feedback.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 4.  RE: text size based on character count

    MalThePal
    Posted 05-13-2022 12:15
    It looks like visual logic is your next step using the text bounding box. You can use it's size to control all sorts of things including the Y position which would center your text vertically based on the size of the text block. It will be on the text object itself inside visual logic. Now comes the fun part. Good luck, and hit me up if you need anything.

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 5.  RE: text size based on character count

    Posted 05-13-2022 12:24
    Thanks for sending me in the right direction, Malcolm.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 6.  RE: text size based on character count

    Posted 05-13-2022 12:31
    I agree, visual logic may be your next step.

    Try following this simple visual logic I use for a lower third that is usually one line of text, but sometimes goes into 2 lines.  You will have to play with the numbers to adjust to your graphic size.

    image.png

    It centers it on the X & Y.

    ASB





  • 7.  RE: text size based on character count

    MalThePal
    Posted 05-13-2022 12:41
    but don't just copy his. Do your own and figure it out for the next step. You got this.

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 8.  RE: text size based on character count

    Posted 05-13-2022 12:52
    I will do that, thanks.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 9.  RE: text size based on character count

    Posted 05-13-2022 13:28
    This is where I'm at. The text is expanding vertically from the center. But it will go on forever. I need the text to auto-squeeze (width and height) so the text gets smaller as more is added. Plus, the overall text bounding box needs to be constrained in the space between the headlines and the quote name. I set the auto-squeeze, but it's not working.



    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 10.  RE: text size based on character count

    Posted 05-13-2022 13:35
    unclick the enabled on auto-squeeze.
    hit set to current - does your number change (775)?
    re-hit enabled on auto-squeeze

    not sure about the word wrap

    ASB





  • 11.  RE: text size based on character count

    Posted 05-18-2022 12:16
    I'm still stuck on this. I can't figure out how to constrain the height of the text bounding box, so the text auto squeezes by width and height as more text is added.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 12.  RE: text size based on character count

    MalThePal
    Posted 05-18-2022 12:26
    in your example earlier you have word wrap enabled. If this is enabled it will just keep adding rows. Turn that off and the auto squeeze will start working.

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 13.  RE: text size based on character count

    Posted 05-18-2022 12:47
    I turned word wrap off, but then it requires the Producer to manually do their own line breaks so it's not just one line of text. If they do this, it just keeps going on and extends up over the headline text and lower identifier text and doesn't auto-squeeze. I think I'm just trying to do something that can't be done, and need to make different quote screens with different sizes of text.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 14.  RE: text size based on character count

    Ross Staff
    Posted 05-18-2022 12:49
    I am just guessing but I think he wants to have a text box with multiple lines that starts to shrink only once the max is space is hit, much like MS Word "Shrink Text On Overflow." or something similar. 

    Auto squeeze in XPression only works on 1 line. 




    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 15.  RE: text size based on character count

    MalThePal
    Posted 05-18-2022 12:55
    Just throwing things out to see if they stick. It might be possible to use the size of the text binding box of the quote to decide font size instead of a squeeze. But it could turn into a never ending loop because if you change font, the binding box gets smaller, which would trigger a visual logic to change the font size over and over again. This might be the afternoon tea project.

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 16.  RE: text size based on character count

    Ross Staff
    Posted 05-18-2022 13:02
      |   view attached
    Yeah I have ended up in that loop before and its not pretty. 

    Here's something I have quickly just put together as a rudimentary way to avoid that loop that would allow 3 sizes in this instance, obviously you can take it as far as you like. 



    In the final result you would publish only text1 but it would be invisible and unpublish text 2 but it would be visible.

    FYI you don't need to apply the word wrap to text 2, it is copied with rest of the text. 

    Final user would see


    I attached the scene.

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------

    Attachment(s)

    xpf
    basicsqueezetofitbox1.xpf   23 KB 1 version


  • 17.  RE: text size based on character count

    Posted 05-18-2022 13:06
    Simon, yes, that is what I'm trying to do. I can certainly just make different scenes with different text sizes, I just wondered if there was a way to make the font size change based upon 1) the amount of text and 2 ) the limit of the bounding box in the space between the text above and below the quote.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 18.  RE: text size based on character count

    Posted 05-18-2022 13:08
    Thanks, Simon, I will give that a shot.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------



  • 19.  RE: text size based on character count

    MalThePal
    Posted 05-18-2022 13:20
    Playing around with this one. What if you used the string length box in visual logic? I'll let you know. This might be a scripting project to select different fonts. 

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 20.  RE: text size based on character count

    Posted 05-18-2022 14:56
    Thanks, Malcolm.

    ------------------------------
    Kevin Coffee
    Graphic Designer
    Weigel Broadcasting
    ------------------------------