Coder Social home page Coder Social logo

Comments (12)

fcambus avatar fcambus commented on May 19, 2024

So far I checked if we can maintain backward compatibility, as in having the -r flag defaulting to 2, and then allowing to pass an integer as well. The problem with that approach is that specifying two colons (to specify that argument is optional) in getopt(3) optstring is not standard and I believe it is not supported on NetBSD and therefore will not be supported on OS X either.

from ansilove.

fcambus avatar fcambus commented on May 19, 2024

Could you check if getopt(3) on OS X supports this or not?

from ansilove.

christianvozar avatar christianvozar commented on May 19, 2024

It looks like option characters followed by two colons :: is a GNU extension.

from ansilove.

christianvozar avatar christianvozar commented on May 19, 2024

My concern going forward is I'm not sure where the pixel density madness will end. I thought for sure that Retina @2x sized would be adequate for some time but now iPhone X, the Plus Series, and others now use a "Super Retina" with a @3x scale factor. It makes sense for us going forward to use a scale factor so when a "Super Duper Retina" of scale factor @4 comes out it's just a flag to be set.

from ansilove.

fcambus avatar fcambus commented on May 19, 2024

Agreed, allowing to specify a custom scale factor is the way to go. I just pushed a retina branch which should allow that.

You can try ansilove -r n input, where n is the scale factor.

So far, n can take a minimum value of 2 and a maximum value of 4, we can adjust it before merging if we decide to go this way.

@ByteProject: any opinion on this issue?

from ansilove.

christianvozar avatar christianvozar commented on May 19, 2024

That certainly did the trick.

alpha_king-lovecicle ans
alpha_king-lovecicle ans 3x

from ansilove.

ByteProject avatar ByteProject commented on May 19, 2024

Yes. When I added the createRetinaRep bool value to the AnsiLove/C codebase, it was meant to provide compatibility with OS X Retina desktop applications.

I absolutely agree that a custom scale factor is the way to go and I appreciate your efforts to bring ANSi to iOS, even though I see the relevance of a dedicated viewer more on the iPad than on the iPhone.

Regarding the usage of the flags -r n: Iā€˜m fine with that as long as using the -rflag without n would default to @2x (if possible) to not break compatibility with any programs and frameworks relying on this.

Iā€™m wondering if we should limit to max. scale factor 4 or if we should go higher, 10 for instance. That would allow us to not touch this code again for a long time. I first thought that it would be great to not limit the scale factor, but we definitely need to have a limit for preventing misbehavior or bad experience when someone accidentally enters 44444444 instead of 4 for n

If this all is provided, Iā€™d agree that this useful addition should be merged to the main branch.

from ansilove.

christianvozar avatar christianvozar commented on May 19, 2024

My intention is to create an Ansilove "viewer" (right now it's just codename Ansilove, suggestions for a name for it on the app store are welcome) that is a universal binary for all iOS devices iPad and iPhone. It might be cool to do a tvOS version and allow it to do a demo-mode style for competitions and art exhibits in the future (Apple TV + Ansilove + Television setup). I'm not sure I'll do watchOS since that seems a bit far afield from what someone would view ansi on...

Also, +1 on a reasonable maximum value of 10x scale factor. Hard to imagine anything displaying resolution that big unless we are outputting ansi art for display on a stadium jumbotron šŸ˜†

from ansilove.

fcambus avatar fcambus commented on May 19, 2024

I think Stefan is right, it's better not to break compatiblity. So I propose to keep the -r flag to generate @2x output, and to introduce a -R flag to allow specifying a custom scale factor, I updated the retina branch to do just that.

Ranges can go from 2 to 8, as setting it to 8 produces images larger than a 4k screen so it should be ok for now I guess.

from ansilove.

fcambus avatar fcambus commented on May 19, 2024

If we are happy with this I will merge and tag a new release.

from ansilove.

christianvozar avatar christianvozar commented on May 19, 2024

Thanks for the work @fcambus. Once you merge and increment the version I will get to work including it in the Mac framework. Thanks to @ByteProject for feedback.

from ansilove.

fcambus avatar fcambus commented on May 19, 2024

No worries. I merged the branch and tagged a new version.

Thanks to both of you for the suggestions and feedback.

from ansilove.

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.