Vladislav Voronenkov <[email protected]> writes:

> Hello and thank you very much for your reply, Arash,

Thanks, and again, sorry for being late.

> The previews at 100% scale are acceptable, however, already pixelated
> compared to the source images and the main text font.  At 200% the
> previews look like the resolution is 2x lower than the resolution at
> 100%, and are blurry, making it hard to recognize smaller features
> like subscript letters.

I'm still wondering about the results of `frame-monitor-attributes' you
sent in your first message.  If I push that list through the body of
`preview-get-dpi' like this:

--8<---------------cut here---------------start------------->8---
(let ((list '((200% (geometry 0 0 1920 1080) (mm-size 530 300))
              (166% (geometry 0 0 2304 1296) (mm-size 530 300))
              (150% (geometry 0 0 2560 1440) (mm-size 530 300))
              (133% (geometry 0 0 2880 1620) (mm-size 530 300))
              (125% (geometry 0 0 3072 1728) (mm-size 530 300))
              (100% (geometry 0 0 1920 1080) (mm-size 530 300))))
      result)
  (dolist (elt list result)
    (let* ((scale (car elt))
           (monitor-attrs (cdr elt))
           (mm-dims (cdr (assoc 'mm-size monitor-attrs)))
           (mm-width (or (and (integerp (nth 0 mm-dims))
                              (> (nth 0 mm-dims) 0)
                              (nth 0 mm-dims))
                         1))
           (mm-height (or (and (integerp (nth 1 mm-dims))
                               (> (nth 1 mm-dims) 0)
                               (nth 1 mm-dims))
                          1))
           (pixel-dims (cl-cdddr (assoc 'geometry monitor-attrs)))
           (pixel-width (nth 0 pixel-dims))
           (pixel-height (nth 1 pixel-dims)))
      (push (cons scale (list (/ (* 25.4 pixel-width) mm-width)
                              (/ (* 25.4 pixel-height) mm-height)))
            result))))
--8<---------------cut here---------------end--------------->8---

I get:

--8<---------------cut here---------------start------------->8---
((100% 92.01509433962264 91.44)
 (125% 147.2241509433962 146.304)
 (133% 138.02264150943395 137.16)
 (150% 122.68679245283019 121.92)
 (166% 110.41811320754717 109.72800000000001)
 (200% 92.01509433962264 91.44))
--8<---------------cut here---------------end--------------->8---

At 200%, it calculates the same values as for 100%.  This can't right,
or am I missing something?  I mean this is the direct result of the
values for `geometry' above.

> I'm not sure, where the possible root of the problem is hidden.
>  
> The problem arises even at standard 100% scaling:
>  
> (1) External monitor, 24" 1920x1080
>  
> Previews have correct sizes.
>  
> (preview-get-dpi) returns correct dpi value:
> (92.01509433962264 . 91.44)
>  
> and the (preview-scale-from-face) returns
> #[0 "\300\302    !\245\207" [12.0 preview-document-pt-list 
> preview-hook-enquiry] 3]
> that corresponds to the value 1.2 scaling.

This is what I see as return value of `preview-scale-from-face'

--8<---------------cut here---------------start------------->8---
#[nil ((/ d (preview-document-pt))) ((d . 11.0))]
--8<---------------cut here---------------end--------------->8---
  
> (2) Built-in laptop monitor, 14" 1920x1200
>  
> Preview are too large.
>  
> (preview-get-dpi) return correct dpi value:
> (162.56 . 160.42105263157896)
>  
> however,  (preview-scale-from-face) returns the same value as for external 
> monitor:
> #[0 "\300\302    !\245\207" [12.0 preview-document-pt-list 
> preview-hook-enquiry] 3]
>  
> Setting the scaling value manually with
> (setq preview-scale-function (lambda () 0.66))
> fixes the problem for this monitor.
>  
> Is there any additional information on my part that may help in
> identifying the cause of the problem?

I admit I'm little lost here since I'm not a preview-latex user and not
really familiar with the options and the code.  I hope other preview
users would chime in.

Best, Arash



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to