Score:-2

is it possible to print txt file using vim but change the font in which the text will be printed

cu flag

my question is fully described in the title "is it possible to print txt file using vim but change the font in which the text will be printed". I found the documentation for vim where it says that this is possible, but it's not clear how to set everything up correctly

muru avatar
us flag
First result on searching for `font` in the page you linked to: "Printer output is controlled by the ['printfont'](https://vimdoc.sourceforge.net/htmldoc/options.html#'printfont') and ['printoptions'](https://vimdoc.sourceforge.net/htmldoc/options.html#'printoptions') [options](https://vimdoc.sourceforge.net/htmldoc/options.html#options)." and at [`'printfont'`](https://vimdoc.sourceforge.net/htmldoc/options.html#'printfont'): "The name of the font that will be used for |:hardcopy|."
Максим Однорал avatar
cu flag
can you please write a specific use case for example with a font "libration herif" size 14
Score:0
it flag

Yes it is. Read man a2ps, and explore all the a2ps --list= topics.

a2ps will let you specify the font, font size, as it converts ASCII to Postscript. It can even queue the print request for you, or write it's output to a file.

Invoke with:

:w !a2ps ...
Максим Однорал avatar
cu flag
can you please give a direct example, for example, set the font FreeSans 12 size
Максим Однорал avatar
cu flag
Unfortunately, this method is not suitable, I just made a post of a creak file and there were some errors, I use unicode in this file, so most likely the problem is in it
Максим Однорал avatar
cu flag
but as far as I know there is a gtk tool that allows you to print files as I need but I would like to do it through the terminal and not call PrintUnixDialog
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.