Comments (12)
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.
Could you check if getopt(3) on OS X supports this or not?
from ansilove.
It looks like option characters followed by two colons ::
is a GNU extension.
from ansilove.
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.
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.
That certainly did the trick.
from ansilove.
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 -r
flag 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.
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.
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.
If we are happy with this I will merge and tag a new release.
from ansilove.
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.
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)
- Output SAUCE Metadata as PNG tEXt Chunks HOT 5
- Wide ANSis are being line-wrapped HOT 8
- Won't build on the Mac HOT 5
- Suppress output? HOT 5
- Error on raspberry pi HOT 8
- Missing files? HOT 2
- Number of comments is passed as a boolean? HOT 1
- Rendering with transparent mode and >=2 scaling factor breaks transparent background HOT 2
- use of undeclared identifier for ANSILOVE_FONT_* HOT 1
- some problems HOT 2
- ansi term gone? HOT 1
- osx fails to build on master HOT 2
- Some characters not rendering properly HOT 2
- Render Failure for .ANS HOT 10
- [Feature] Add option to use SAUCE info for rendering hints HOT 13
- [Q] Can this be used to render terminal output to PNG? HOT 5
- Nerd font characters problem HOT 1
- XBin 512 char font problem HOT 9
- Print log on stderr, i.e. different stream from stdout HOT 1
- read from standard input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansilove.