emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Scott Otterson <scotto@sharpleaf.org>
To: "Emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Bug: Latex preview overlay scaling not consistent across PPI
Date: Wed, 30 Nov 2016 17:35:33 +0100	[thread overview]
Message-ID: <CAPY3P0SkKahH_KTnjoG-UNn6kbG-k6Wb3YKS_Gh-FXCnO057pw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1662 bytes --]

The size of the latex preview overlay scaling is inconsistent across
screens with different pixel densities.

I've set my customization to use dvipng for the latex previews I see when I
type C-c C-x C-l.  Dvipng is customized as follows:

[image: Inline image 1]

The "Value" is set to (1.0 . 1.0), which I would think means that the font
size in the preview overlay is scaled the same as the font size org
buffer's normal text.

This is more or less true for a Windows 7 machine connected to a 24",
1920x1080 pixel monitor:

[image: Inline image 2]

However, on a Windows 10 machine with a 12.3", 2736x1824 pixel monitor, the
same customization looks like this:

[image: Inline image 3]

On the second computer (a Surface Pro 4) the previews are tiny because the
screen has a much higher pixel density; the normal text is scaled
appropriately but the overlays aren't scaled to match.

I'd like keep the same .emacs file across all the machines I have to use,
so it would be best if the preview scaling was consistent.

Possibly the overlay scaling calculation is done using the function
window-text-width without the *pixelwise *argument, which would return a
width in characters.  To avoid changing the calculation too much, you could
use window-max-chars-per-line, which considers font size and some things
that would be missed by window-text-width even if *pixelwise* was used.

-- my setup
------------------------------------------------------------------------------------------
Emacs  : GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-09-17
Package: Org mode version 9.0.1 (9.0.1-elpaplus @
c:/Users/sotterson/home/.emacs.d/elpa/org-plus-contrib-20161118/)

[-- Attachment #1.2: Type: text/html, Size: 3220 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 12012 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 23159 bytes --]

[-- Attachment #4: image.png --]
[-- Type: image/png, Size: 36392 bytes --]

             reply	other threads:[~2016-11-30 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 16:35 Scott Otterson [this message]
2016-11-30 21:05 ` Bug: Latex preview overlay scaling not consistent across PPI Nicolas Goaziou
2016-12-01  6:31   ` Scott Otterson
2016-12-01 19:45     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPY3P0SkKahH_KTnjoG-UNn6kbG-k6Wb3YKS_Gh-FXCnO057pw@mail.gmail.com \
    --to=scotto@sharpleaf.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).