Does enscript support multiple font on same file

Clash Royale CLAN TAG#URR8PPP
My requirement is to print some portion of input in one font( can also be of different size,bold,bg etc) & remaining with another. Is it possible?
enscript
add a comment |
My requirement is to print some portion of input in one font( can also be of different size,bold,bg etc) & remaining with another. Is it possible?
enscript
add a comment |
My requirement is to print some portion of input in one font( can also be of different size,bold,bg etc) & remaining with another. Is it possible?
enscript
My requirement is to print some portion of input in one font( can also be of different size,bold,bg etc) & remaining with another. Is it possible?
enscript
enscript
asked Feb 13 at 6:58
mathewsnjoymathewsnjoy
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Yes, it is possible with escape sequences in the text which must be activated with command line option -e or --escapes.
Have a look at the "SPECIAL ESCAPES" section in the man page (man enscript).
SPECIAL ESCAPES
Enscript supports special escape sequences which can be used to add some page formatting commands to ASCII
documents. As a default, special escapes interpretation is off, so all ASCII files print out as everyone
expects. Special escapes interpretation is activated by giving option -e, --escapes to enscript.
All special escapes start with the escape character. The default escape character is ^@ (octal 000); escape
character can be changed with option -e, --escapes. Escape character is followed by escape's name and
optional options and arguments.
Currently enscript supports following escapes:
bgcolor change the text background color. The syntax of the escape is:
^@bgcolorred green blue
where the color components red, green, and blue are given as decimal numbers between values 0 and 1.
bggray change the text background color. The syntax of the escape is:
^@bggraygray
where gray is the new text background gray value. The default value is 1.0 (white).
color change the text color. The syntax of the escape is:
^@colorred green blue
where color components red, green and blue are given as decimal numbers between values 0 and 1.
and further down it says:
font select current font. The syntax of the escape is:
^@fontfontname[:encoding]
where fontname is a standard font specification. Special font specification default can be used to
select the default body font (enscript's default or the one specified by the command line option -f,
--font).
The optional argument encoding specifies the encoding that should be used for the new font. Currently
the encoding can only be the enscript's global input encoding or ps.
Edit:
An example:
me@debian:~$ echo "normal text @color1 0 0red text @fontCourier-Bold10Courier-Bold 10pt @fontHelvetica-BoldOblique12Helvetica-BoldOblique 12pt @fontdefaultdefault font again" > text.txt
me@debian:~$ enscript -v -e@ text.txt -o text.ps
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
processing file "text.txt"...
[ 1 page * 1 copy ] left in text.ps
Have a look at the font names defined your font.map file. Take a font name and add the size (in pt) to it.
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500327%2fdoes-enscript-support-multiple-font-on-same-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, it is possible with escape sequences in the text which must be activated with command line option -e or --escapes.
Have a look at the "SPECIAL ESCAPES" section in the man page (man enscript).
SPECIAL ESCAPES
Enscript supports special escape sequences which can be used to add some page formatting commands to ASCII
documents. As a default, special escapes interpretation is off, so all ASCII files print out as everyone
expects. Special escapes interpretation is activated by giving option -e, --escapes to enscript.
All special escapes start with the escape character. The default escape character is ^@ (octal 000); escape
character can be changed with option -e, --escapes. Escape character is followed by escape's name and
optional options and arguments.
Currently enscript supports following escapes:
bgcolor change the text background color. The syntax of the escape is:
^@bgcolorred green blue
where the color components red, green, and blue are given as decimal numbers between values 0 and 1.
bggray change the text background color. The syntax of the escape is:
^@bggraygray
where gray is the new text background gray value. The default value is 1.0 (white).
color change the text color. The syntax of the escape is:
^@colorred green blue
where color components red, green and blue are given as decimal numbers between values 0 and 1.
and further down it says:
font select current font. The syntax of the escape is:
^@fontfontname[:encoding]
where fontname is a standard font specification. Special font specification default can be used to
select the default body font (enscript's default or the one specified by the command line option -f,
--font).
The optional argument encoding specifies the encoding that should be used for the new font. Currently
the encoding can only be the enscript's global input encoding or ps.
Edit:
An example:
me@debian:~$ echo "normal text @color1 0 0red text @fontCourier-Bold10Courier-Bold 10pt @fontHelvetica-BoldOblique12Helvetica-BoldOblique 12pt @fontdefaultdefault font again" > text.txt
me@debian:~$ enscript -v -e@ text.txt -o text.ps
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
processing file "text.txt"...
[ 1 page * 1 copy ] left in text.ps
Have a look at the font names defined your font.map file. Take a font name and add the size (in pt) to it.
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
add a comment |
Yes, it is possible with escape sequences in the text which must be activated with command line option -e or --escapes.
Have a look at the "SPECIAL ESCAPES" section in the man page (man enscript).
SPECIAL ESCAPES
Enscript supports special escape sequences which can be used to add some page formatting commands to ASCII
documents. As a default, special escapes interpretation is off, so all ASCII files print out as everyone
expects. Special escapes interpretation is activated by giving option -e, --escapes to enscript.
All special escapes start with the escape character. The default escape character is ^@ (octal 000); escape
character can be changed with option -e, --escapes. Escape character is followed by escape's name and
optional options and arguments.
Currently enscript supports following escapes:
bgcolor change the text background color. The syntax of the escape is:
^@bgcolorred green blue
where the color components red, green, and blue are given as decimal numbers between values 0 and 1.
bggray change the text background color. The syntax of the escape is:
^@bggraygray
where gray is the new text background gray value. The default value is 1.0 (white).
color change the text color. The syntax of the escape is:
^@colorred green blue
where color components red, green and blue are given as decimal numbers between values 0 and 1.
and further down it says:
font select current font. The syntax of the escape is:
^@fontfontname[:encoding]
where fontname is a standard font specification. Special font specification default can be used to
select the default body font (enscript's default or the one specified by the command line option -f,
--font).
The optional argument encoding specifies the encoding that should be used for the new font. Currently
the encoding can only be the enscript's global input encoding or ps.
Edit:
An example:
me@debian:~$ echo "normal text @color1 0 0red text @fontCourier-Bold10Courier-Bold 10pt @fontHelvetica-BoldOblique12Helvetica-BoldOblique 12pt @fontdefaultdefault font again" > text.txt
me@debian:~$ enscript -v -e@ text.txt -o text.ps
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
processing file "text.txt"...
[ 1 page * 1 copy ] left in text.ps
Have a look at the font names defined your font.map file. Take a font name and add the size (in pt) to it.
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
add a comment |
Yes, it is possible with escape sequences in the text which must be activated with command line option -e or --escapes.
Have a look at the "SPECIAL ESCAPES" section in the man page (man enscript).
SPECIAL ESCAPES
Enscript supports special escape sequences which can be used to add some page formatting commands to ASCII
documents. As a default, special escapes interpretation is off, so all ASCII files print out as everyone
expects. Special escapes interpretation is activated by giving option -e, --escapes to enscript.
All special escapes start with the escape character. The default escape character is ^@ (octal 000); escape
character can be changed with option -e, --escapes. Escape character is followed by escape's name and
optional options and arguments.
Currently enscript supports following escapes:
bgcolor change the text background color. The syntax of the escape is:
^@bgcolorred green blue
where the color components red, green, and blue are given as decimal numbers between values 0 and 1.
bggray change the text background color. The syntax of the escape is:
^@bggraygray
where gray is the new text background gray value. The default value is 1.0 (white).
color change the text color. The syntax of the escape is:
^@colorred green blue
where color components red, green and blue are given as decimal numbers between values 0 and 1.
and further down it says:
font select current font. The syntax of the escape is:
^@fontfontname[:encoding]
where fontname is a standard font specification. Special font specification default can be used to
select the default body font (enscript's default or the one specified by the command line option -f,
--font).
The optional argument encoding specifies the encoding that should be used for the new font. Currently
the encoding can only be the enscript's global input encoding or ps.
Edit:
An example:
me@debian:~$ echo "normal text @color1 0 0red text @fontCourier-Bold10Courier-Bold 10pt @fontHelvetica-BoldOblique12Helvetica-BoldOblique 12pt @fontdefaultdefault font again" > text.txt
me@debian:~$ enscript -v -e@ text.txt -o text.ps
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
processing file "text.txt"...
[ 1 page * 1 copy ] left in text.ps
Have a look at the font names defined your font.map file. Take a font name and add the size (in pt) to it.
Yes, it is possible with escape sequences in the text which must be activated with command line option -e or --escapes.
Have a look at the "SPECIAL ESCAPES" section in the man page (man enscript).
SPECIAL ESCAPES
Enscript supports special escape sequences which can be used to add some page formatting commands to ASCII
documents. As a default, special escapes interpretation is off, so all ASCII files print out as everyone
expects. Special escapes interpretation is activated by giving option -e, --escapes to enscript.
All special escapes start with the escape character. The default escape character is ^@ (octal 000); escape
character can be changed with option -e, --escapes. Escape character is followed by escape's name and
optional options and arguments.
Currently enscript supports following escapes:
bgcolor change the text background color. The syntax of the escape is:
^@bgcolorred green blue
where the color components red, green, and blue are given as decimal numbers between values 0 and 1.
bggray change the text background color. The syntax of the escape is:
^@bggraygray
where gray is the new text background gray value. The default value is 1.0 (white).
color change the text color. The syntax of the escape is:
^@colorred green blue
where color components red, green and blue are given as decimal numbers between values 0 and 1.
and further down it says:
font select current font. The syntax of the escape is:
^@fontfontname[:encoding]
where fontname is a standard font specification. Special font specification default can be used to
select the default body font (enscript's default or the one specified by the command line option -f,
--font).
The optional argument encoding specifies the encoding that should be used for the new font. Currently
the encoding can only be the enscript's global input encoding or ps.
Edit:
An example:
me@debian:~$ echo "normal text @color1 0 0red text @fontCourier-Bold10Courier-Bold 10pt @fontHelvetica-BoldOblique12Helvetica-BoldOblique 12pt @fontdefaultdefault font again" > text.txt
me@debian:~$ enscript -v -e@ text.txt -o text.ps
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
processing file "text.txt"...
[ 1 page * 1 copy ] left in text.ps
Have a look at the font names defined your font.map file. Take a font name and add the size (in pt) to it.
edited Feb 13 at 12:43
answered Feb 13 at 9:56
FreddyFreddy
1,3099
1,3099
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
add a comment |
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Thanks, this helps. For setting bold, can you provide an example? Any reference link/document where we can get examples for reference apart from man page is helpful as well.
– mathewsnjoy
Feb 13 at 12:16
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Fonts added to the example.
– Freddy
Feb 13 at 12:43
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
Thanks @Freddy. This solves my problem.
– mathewsnjoy
Feb 13 at 13:14
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500327%2fdoes-enscript-support-multiple-font-on-same-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown