From: James P. Ascher Date: Wed, 17 Feb 2021 03:37:18 +0000 (-0500) Subject: update math for text-based terminal X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fpatch_header_text_termina;p=elpher.git update math for text-based terminal Calling (face-font 'default) on a text-based terminal gives nil, throwing an error from face-font that then refuses to render the page. Leaving fill-column the same for text terminals should work. Respectfully submitted, J.P. jpsa@pm.me --- diff --git a/elpher.el b/elpher.el index 4c34f52..ebc2737 100644 --- a/elpher.el +++ b/elpher.el @@ -1372,9 +1372,9 @@ by HEADER-LINE." (2 'elpher-gemini-heading2) (3 'elpher-gemini-heading3) (_ 'default))) - (fill-column (/ (* fill-column + (fill-column (if (face-font 'default) (/ (* fill-column (font-get (font-spec :name (face-font 'default)) :size)) - (font-get (font-spec :name (face-font face)) :size)))) + (font-get (font-spec :name (face-font face)) :size)) fill-column)) (unless (display-graphic-p) (insert (make-string level ?#) " ")) (insert (propertize header 'face face))