-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphics support and unicode input #2
Comments
Hi. You are implementing graphics? Wow! :) As for your question: in my usecase the input was in one of two obscure character encodings (CP852 or the even more obscure "Kamenici"). So a conversion is necessary, I can't just feed individual bytes as-they-are to Cairo. And I preferred to do the conversion in a separate tool. But you are right: The conversion on input can work for text, and for some simple escapes (ESC followed by bytes<128). But if there is an escape containing anything above 127, then this causes a lot of pain. I agree the conversion must be done inside, and only after the escape sequences are decoded. I implemented only the basic functionality I needed and never got to implementing more. I would be glad if you create a pull request so that I can integrate your changes. Then I can add the character conversion (and perhaps clean up the input handling as w/o unicode handling it can be simplified a bit). It would be great if you could also provide test files - for the features you implement. There are some already in the directory |
Hello, I think it would be greate to implement the codepage translation in a similar way as the printer code preprocessor inside of the CairoTTy module |
I agree with your proposal. So, there could be two new methods in
and CairoTTY would be using a converting object (that it would receive in its ctor) to convert these into Did I get your proposal? Unfortunately I'm really busy these days. If you need a solution soon, feel free to implement this. Otherwise I will try to find some time for this during the weekend, but I'm not sure if I manage. :-( |
Nice to hear from you. I implemented something similar. I will rebase some of my changes on your master branch to create a pr for this tomorrow. |
@pkess You may want to look at this project too: https://github.com/nzeemin/ukncbtl-utils/wiki/ESCParser It already renders graphics (but doesn't render overprint/bold) I'm attaching |
Hi @rusq, sorry for my late reply. I just had a look into this project and it seems like it renders the graphics very good. But it does not render all signs correctly like horizontal lines. Thank you for this hint |
Hello there,
i recognized your project last weekend and as you may have seen i already copied and modified the code a bit. As your code looks really good and i think there may be others who can participate from this i would like to share my developments with this.
I really need the graphics feature and my implementation already prints some graphics but there are some points to work on before this can be used.
One big point is the input in form of a converted unicode file. This produces some problems with a file containing graphics commands as the graphics commands are converted with the unicode table as well as the real characters. Can you explain why you don't apply the translation table as part of this program?
The text was updated successfully, but these errors were encountered: