Giter VIP home page Giter VIP logo

Comments (6)

dilworks avatar dilworks commented on August 23, 2024 2

Would you be so kind as to provide an example ASCII file that triggers this issue, for testing?

Anything as simple as a single line of text longer than 80 columns will trigger the problem, inserting unwanted line breaks when loaded.

from durdraw.

cmang avatar cmang commented on August 23, 2024 1

Thank you for this report!

Yes, that 80 column file loading stuff is ugly. I'll re-visit this and see what I can come up with. Ideally I want it to correctly guess the width of all ASCII files. This is also a reason why I prefer to keep .dur files as master copies of the art I'm working on, but of course, that doesn't help much when importing ASCII and ANSI files. :)

Would you be so kind as to provide an example ASCII file that triggers this issue, for testing?

Edit: I've also considered allowing overriding of canvas width at the load screen, though loading a file from the command-line with -W should do the same thing. (Right now, as you noted, it doesn't.)

from durdraw.

cmang avatar cmang commented on August 23, 2024

Got it. There is a lot of old hard-coded 80 column stuff in Durdraw. I'm working on removing that so that it can load and edit wide (and narrow) ANSI and ASCII files better. It does better with wider and narrow .dur files.

Part of the cause of the issue here is that lots of ANSI art files assume 80 columns and eliminate the newline character to save bytes over a dialup line, which Durdraw must account for, and Durdraw uses the ANSI parser to load ASCII files, too.

Another issue is that Durdraw does not yet support vertical scrolling, so your window will need to be wider than your ASCII file. Not as bad with modern resizable terminals, but still an issue.

from durdraw.

cmang avatar cmang commented on August 23, 2024

@dilworks I just added a --wrap command line option. you can pass to it the number of columns that you want it to start wrapping at (default 80) when loding ANSI and ASCII files. I also fixed a problem that was preventing editing past 80 columns when loding an .ANS or .ASC file.

For example, if your ASCII file is 100 columns wide, you can pass --wrap 120. It should automatically cut off at 100 columns and not wrap any lines.

It's not the most elegant solution, but I wanted to get you up and drawing while I think/work on this some more.

Could you please give it a try let me know if this helps out your situation? Thanks!

from durdraw.

cmang avatar cmang commented on August 23, 2024

Also, Durdraw looks to the SAUCE record for the columns and width, as an alternative to the default 80 columns or whatever is passed to --wrap. This is how it is able to load ANSI files larger than 80 columns from artscene packs.

Unfortunately it can't write sauce records yet. But if you were to add one to the end of the ASCII file using another program, then Durdraw should respect the dimensions in the SAUCE reord.

from durdraw.

cmang avatar cmang commented on August 23, 2024

@dilworks I'm going to go ahead and mark this as fixed and closed. If --wrap does not help your situation, or if you need anything else, feel free to leave a comment.

Thanks!

from durdraw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.