Print error using enscript with Consolas TrueType font
1
vote
1
answer
126
views
I am trying to create with
I am using this command line:
enscript
a PDF source code listing of this Python script:
import numpy as np
def f1(x):
return x * x * np.sin(x)
however I am getting this output:

enscript --filter="cat %s | iconv -f utf-8 -t iso-8859-1" -v -rG --font="Consolas@12" --highlight=python -o - -M Letter --color=0 -X 88591 test_enscript.py | ps2pdf - a.pdf
AFM: scanning path...
AFM: reading font map "/usr/local/share/enscript/afm/font.map"
AFM: reading font map "/home/arrigo/fonts/Consolas/font.map"
downloading font "Consolas"
states: autoloading lang_enscript' from
/usr/local/share/enscript/hl/lang_enscript.st'
states: autoloading style_emacs' from
/usr/local/share/enscript/hl/style_emacs.st'
states: autoloading default_faces' from
/usr/local/share/enscript/hl/default_faces.st'
states: autoloading python' from
/usr/local/share/enscript/hl/python.st'
processing file "test_enscript.py"...
[ 1 page * 1 copy ] left in -
1 character was missing
It looks like the space is not mapped correctly to the iso-8859 encoding. I have installed the Consolas font files as explained here . I think that enscript should be able to render this file. I am running this under Ubuntu 23.10. Any ideas?
Asked by Arrigo
(111 rep)
Nov 28, 2023, 01:00 AM
Last activity: Nov 28, 2023, 04:54 PM
Last activity: Nov 28, 2023, 04:54 PM