Graphics

 View Only
  • 1.  Different fonts, same line

    Posted 10-07-2015 04:01
    I want to have two text fields with different fonts on the same line (first name, last name) and for those two fields to adjust so that both fields are centered in the one line.

    Thanks.


  • 2.  RE: Different fonts, same line

    Posted 10-07-2015 20:26
    Try using font tags. You can insert the font number in brackets `{x}` (braces?) to change the font. For example:

    `{1}First {2}Last`

    That will use font #1 for the first name, and font #2 for the last name. Just use whichever font number you'd like it to be.

    #XPression


  • 3.  RE: Different fonts, same line

    Posted 10-07-2015 20:32
    If you want to use two different text objects, then you will need to use Visual Logic to make one object follow the other; and visual logic could also center them both within the line.

    This tutorial should help put you on the right track: http://www.rossvideo.com/graphics-system/xpression/xpression-u/video-tutorial-202.html

    #XPression


  • 4.  RE: Different fonts, same line

    Posted 10-20-2015 23:23
    I followed the example exactly substituting width for height and not a thing happened. What I need is for the right text box to push the left text box to the left as it becomes longer so the whole thing stays center.

    #XPression


  • 5.  RE: Different fonts, same line

    Posted 10-27-2015 23:13
    Align both text objects right. Open Visual logic.

    Grab these Objects from the left side under "Scene Objects":

    Right Text Object - x.position

    Right Text Object - bounding.box.width

    Left Text Object - x.position

    Grab an "Add" function block from the right side under 'math'

    Put Both Right Text Objects into the left side of the "Add" function block.

    Pull the result into the Left Text Objects x.position

    This should get your desired result, but will also depend on if your objects are grouped and what their x.position is. If it is negative, you might want to try replacing the add with a subtract and play around with which number your putting into the add block first. If this doesn't give you the result you want. try multiplying by -1.

    ps. if you are trying to center everything horizontally. I would just make your left text justified right and your right text justified left then stick the two near each other.

    #XPression