3

I try to convert Pascal-Code Files to an image (jpg, png) an find pongo-view as a good solution. Is there a way to add syntax-highlighting in the Output files?

I am happy about any hints :) Thanks

1 Answer 1

3

I found an old repo to add syntax highligthing with pango markup (https://github.com/LinuxJedi/pango-syntax-highlighter/). So the new one can now convert Pascal files to images with syntax highligthing.

https://github.com/thiemol/pango-syntax-highlighter

python3 pangosyntaxhighlight.py cpp myfile.cpp output.txt && pango-view --markup --font=mono -qo image.png output.txt

Works with:C,C++,Java, Go', Python,Scala, GLShaderLexer, xml. Now also with Delphi/Pacal, PhP. You can simple add the right lexer.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.