• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Text in Blocks

    How To... ?
    4
    9
    1845
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MABO
      MABO last edited by

      Hi everybody,

      Is there a simple way to align text justified in blocks form like this :
      text text text text text text text text 
      text text text text text text text text 
      text text text text text text text text 
      text text text text text text text text 
      To avoid to have text displayed like this :
      text text text text text text text text 
      text text text text text text 
      text text text text text text text text text text
      text text text text.
      Thanx.
      Matt 
      1 Reply Last reply Reply Quote 0
      • DusX
        DusX Tech Staff last edited by

        Format the text with linebreaks after X words.

        How is the text being generated?

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • Isadora Add-ons: https://troikatronix.com/add-ons/
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

        Running: Win 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

        1 Reply Last reply Reply Quote 0
        • Marci
          Marci last edited by

          Pass it to the input of a JS Actor containing the following... should work...
          function main() {
            var result = '';
            while (arguments[0].length > 0) {
              result += str.substring(0, 200) + '\n';
              str = str.substring(200);
            }
            return result;
          }

          rMBP 11,3 (mOS 10.13) / rMBP 11,4 (mOS 10.14) / 3x Kinect + Leap / TH2Go
          Warning: autistic - may come across rather blunt and lacking in humour!

          1 Reply Last reply Reply Quote 0
          • Marci
            Marci last edited by

            Oops... correction...

            ----------
            function main() {
              var result = '', str = arguments[0];
              while (str.length > 0) {
                result += str.substring(0, 200) + '\n';
                str = str.substring(200);
              }
              return result;
            }

            rMBP 11,3 (mOS 10.13) / rMBP 11,4 (mOS 10.14) / 3x Kinect + Leap / TH2Go
            Warning: autistic - may come across rather blunt and lacking in humour!

            1 Reply Last reply Reply Quote 0
            • MABO
              MABO last edited by

              Hi @DusX ,

              The text is generated with a text draw.
              When you say "Format the text with linebreaks after X words."  Do you mean that I can do that with an Isadora object?
              The "bounds width" entry in the TextDraw object produce almost what I want but not if I copy and paste a block of text in it.
              In the meantime, I'll try @Marci 's Java solution.
              Thanx a lot to you both for your answer.
              Cheers.
              1 Reply Last reply Reply Quote 0
              • DusX
                DusX Tech Staff last edited by

                I was meaning how is the test entered. Are you manually writing the text, loading it from a tcp-ip request, is it entered once and never again changed etc..

                If its very dynamic a Javascript solution would be the best option I think.
                If you are entering it once. You are probably best to manually format it.
                Using the 'bounds width' does give you are control over wrapping, which will make for nice columns if all entries are the same length.

                Troikatronix Technical Support

                • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                • Isadora Add-ons: https://troikatronix.com/add-ons/
                • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

                Running: Win 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

                1 Reply Last reply Reply Quote 0
                • O
                  OscarNic last edited by

                  Is there a way to output the text that you have generated and formatted? perhaps as a txt file or something similar?

                  1 Reply Last reply Reply Quote 0
                  • DusX
                    DusX Tech Staff last edited by

                    Only way I can think of would be via a HTTP call (post)

                    You could send the text as a string... and process the request via a server script.

                    Troikatronix Technical Support

                    • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                    • Isadora Add-ons: https://troikatronix.com/add-ons/
                    • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

                    Running: Win 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

                    1 Reply Last reply Reply Quote 0
                    • MABO
                      MABO last edited by

                      Thanx for answering.

                      I finally manually did it.
                      The two solutions of @DusX look very nice but a bit out of my skills...
                      Best.
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post