Hope that helps you implementing your own. There are a few more small details you have to deal with if you are working on a unity before 5.3, but its essentially the same process. Also, you don't want to move the characters at all if the space is small, so a minimum space value comes handy. That's why in my implementation I added a factor to know how much to move the characters compared to the whole words. It can be a bit better if you also allow the characters to move a bit. Then, its just dividing it against the number of words and voila! Justification! You can find the min and max x of each line and you will know how much space you need to add. With that information, you know where you lines start and end. Css Vertical Align How To Center A Div Text Or An Image Example Code equipped with a HD resolution 1277 x 765. You can then parse the text, to see where the whiteSpaces are, so you could separate the words.īecause this is a VertexModifier, you have access to all the vertices, so you know where each character is located. Css Vertical Align How To Center A Div Text Or An Image Example Code images that posted in this website was uploaded by. That gave me info about each line (specially, in which character they start). If you are using theThis plugin is not a replacement of the Text object, so it works as a VertexModifier and adds lots of the missing things (like animation, justification, deforms, pixel perfect, etc). Coincidentally, I just finished the Text Justification, Wrapping and Overflowing for my new plugin I2 SmartEdge.
0 Comments
Leave a Reply. |