1

How can I print a buffer exactly as it looks on screen, including the use of variable-pitch fonts?

(I'm also curious why htmlfontify-buffer ignores variable-pitch-mode.)

I am using org-mode and use variable-pitch fonts. However, the latter are ignored when I generate HTML for printing via htmlfontify-buffer. Is there a work around?

Also tried htmlize, but that was even worse usually not including any special fonts.

Drew
  • 75,699
  • 9
  • 109
  • 225
Harmeling
  • 111
  • 2
  • Have you tried adding links to a custom css? I usually export html to file and then print from web browser for best results. – Melioratus Feb 18 '18 at 19:48
  • Haven't tried custom css. However, even having a simple file test.org with two lines and nothing fancy, and running htmlfontify-buffer generates an html file with the correct fonts but then the content is set inside
     tags, so the font information is ignored...
    – Harmeling Feb 21 '18 at 09:04
  • After reading about htmlfontify again, I think I understand. It may be treating the entire buffer as code which is why it wraps text in pre tags. I’m not sure if this will help but take a look at [org-html-themes](https://github.com/fniessen/org-html-themes) and [pandoc](http://pandoc.org/). I’ve used both to export or convert org files into nice looking documents. – Melioratus Feb 21 '18 at 15:11

0 Answers0