cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Eduardo
Level III

Displaying ASCII art on a window

Hello all,

 

I usually post more serious :-) stuff. But I was wondering how do I get ascii art to display properly in a window. My simple code is below. It looks ok on the script editor but it gets messed up after execution. Any help welcome! Thanks!

 

Eduardo.

New window("Force",<<modal,
Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	"),
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
cwillden
Super User (Alumni)

Re: Displaying ASCII art on a window

Just change the font to "Consolas" to match the editor. I also bumped the text size up to 11:

New window("Force", << Modal,
t1 = Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	", << Font("Consolas", 11)),
);

 Result:

The force is strong with "Consolas" fontThe force is strong with "Consolas" font

-- Cameron Willden

View solution in original post

4 REPLIES 4
cwillden
Super User (Alumni)

Re: Displaying ASCII art on a window

Just change the font to "Consolas" to match the editor. I also bumped the text size up to 11:

New window("Force", << Modal,
t1 = Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	", << Font("Consolas", 11)),
);

 Result:

The force is strong with "Consolas" fontThe force is strong with "Consolas" font

-- Cameron Willden
Byron_JMP
Staff

Re: Displaying ASCII art on a window

I think you all need to seriously upgrade your Yoda game

 

 

 

 

https://community.jmp.com/t5/Uncharted/Can-I-make-ASCII-Art-with-JMP/ba-p/31157

Yoda ASCII.png

JMP Systems Engineer, Health and Life Sciences (Pharma)
Eduardo
Level III

Re: Displaying ASCII art on a window

:-) Many thanks!

pmroz
Super User

Re: Displaying ASCII art on a window

May the Fourth be with you.  And have a great Cinco de Mayo as well...