mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 20:37:51 +00:00
Fix dpi calculation when previewing LaTeX snippets
* lisp/org.el (org--get-display-dpi): Fix docstring. (org-create-formula-image): Use function above. Reported-by: Scott Otterson <scotto@sharpleaf.org> <http://permalink.gmane.org/gmane.emacs.orgmode/110526>
This commit is contained in:
parent
c3146209ec
commit
e336f39ce7
|
@ -19458,9 +19458,8 @@ inspection."
|
|||
|
||||
(defun org--get-display-dpi ()
|
||||
"Get the DPI of the display.
|
||||
|
||||
Assumes that the display has the same pixel width in the
|
||||
horizontal and vertical directions."
|
||||
The function assumes that the display has the same pixel width in
|
||||
the horizontal and vertical directions."
|
||||
(if (display-graphic-p)
|
||||
(round (/ (display-pixel-height)
|
||||
(/ (display-mm-height) 25.4)))
|
||||
|
@ -19503,12 +19502,11 @@ a HTML file."
|
|||
(texfilebase (make-temp-name
|
||||
(expand-file-name "orgtex" tmpdir)))
|
||||
(texfile (concat texfilebase ".tex"))
|
||||
(font-height (face-attribute 'default :height nil))
|
||||
(image-size-adjust (or (plist-get processing-info :image-size-adjust)
|
||||
'(1.0 . 1.0)))
|
||||
(scale (* (if buffer (car image-size-adjust) (cdr image-size-adjust))
|
||||
(or (plist-get options (if buffer :scale :html-scale)) 1.0)))
|
||||
(dpi (* scale (floor (if buffer font-height 140.0))))
|
||||
(dpi (* scale (if buffer (org--get-display-dpi) 140.0)))
|
||||
(fg (or (plist-get options (if buffer :foreground :html-foreground))
|
||||
"Black"))
|
||||
(bg (or (plist-get options (if buffer :background :html-background))
|
||||
|
|
Loading…
Reference in a new issue