enscript는 동일한 파일에서 여러 글꼴을 지원합니까?

enscript는 동일한 파일에서 여러 글꼴을 지원합니까?

내 요구 사항은 입력의 특정 부분을 하나의 글꼴(크기, 굵게, 배경 등이 다를 수 있음)로 인쇄하고 다른 글꼴을 유지하는 것입니다. 가능합니까?

답변1

예, 이스케이프 시퀀스는 텍스트에 사용할 수 있으며 명령줄 옵션과 함께 사용하거나 -e활성화 해야 합니다 --escapes.

매뉴얼 페이지( ) man enscript의 "SPECIAL ESCAPES" 섹션을 확인하십시오.

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:

               ^@bgcolor{red 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:

               ^@bggray{gray}

               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:

               ^@color{red green blue}

               where color components red, green and blue are given as decimal numbers between values 0 and 1.

계속하자:

       font    select current font.  The syntax of the escape is:

               ^@font{fontname[: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.

편집하다:

한 가지 예:

me@debian:~$ echo "normal text @color{1 0 0}red text @font{Courier-Bold10}Courier-Bold 10pt @font{Helvetica-BoldOblique12}Helvetica-BoldOblique 12pt @font{default}default 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

Font.map 파일에 정의된 글꼴 ​​이름을 살펴보세요. 글꼴 이름을 선택하고 pt 단위로 크기를 추가하세요.

관련 정보