Subject: Re: bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen

From: Juri Linkov <[email-masked]>
Date: Sun, 20 Oct 2019 19:03:10 +0300

>> > Perhaps we should convert those pixmaps to some scaleable format, and
>> > then autoscale them?
>>
>> You mean, SVG?  We could do that, but we'd like images to display well
>> even if Emacs cannot display SVG.
>>
>> Also, I think fringe bitmaps and other icons we use in the UI cannot
>> be scalable, we need to scale them ourselves.  Not that I'm an expert
>> on that (so don't take my words as definitive and/or final).
>
> At least for the fringe part, what do you think of modifying
> define-fringe-bitmap to take into account scaling factor?
>
> For example, if scaling factor > 1.5 make everything x2, if > 2.5 then
> x3, etc. It seems quite simple to achieve those integer scalings.

Funnily enough, the current fringe bitmaps are too big for me,
so I had to customize them using smaller bitmaps copied from somewhere.
I guess it should be possible to do the same to provide x2 scaled bitmaps:

  (define-fringe-bitmap 'light-down-arrow [32 32 32 32 32 32 168 112 32] nil nil 'bottom)
  (define-fringe-bitmap 'light-up-arrow [32 112 168 32 32 32 32 32 32] nil nil 'top)
  (define-fringe-bitmap 'light-top-left-angle [254 254 128 128 128] nil nil 'top)
  (define-fringe-bitmap 'light-bottom-left-angle [128 128 128 254 254] nil  nil 'bottom)
  (define-fringe-bitmap 'light-left-bracket [254 254 128 128 128 0 0 0 0 128 128 128 254 254] nil nil 'center)
  (define-fringe-bitmap 'light-right-curly-arrow [96 16 8 8 72 80 96 120] nil nil 'bottom)
  (define-fringe-bitmap 'light-left-curly-arrow [8 16 16 16 18 10 6 30] nil nil 'top)
  (define-fringe-bitmap 'light-right-arrow [16 8 252 8 16] nil 11 'center)
  (define-fringe-bitmap 'light-left-arrow [32 64 254 64 32] nil nil 'center)
  (setq-default fringe-indicator-alist
                '((truncation . (light-left-arrow light-right-arrow))
                  (continuation . (light-left-curly-arrow light-right-curly-arrow))
                  (overlay-arrow . right-triangle)
                  (up . light-up-arrow)
                  (down . light-down-arrow)
                  (top . (light-top-left-angle top-right-angle))
                  (bottom . (light-bottom-left-angle bottom-right-angle
                             top-right-angle light-top-left-angle))
                  (top-bottom . (light-left-bracket right-bracket
                                 top-right-angle light-top-left-angle))
                  (empty-line . empty-line)
                  (unknown . question-mark)))