[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the proper way to scale fringe-bitmaps for high-DPI displays

From: Eli Zaretskii
Subject: Re: What is the proper way to scale fringe-bitmaps for high-DPI displays?
Date: Wed, 20 Mar 2019 21:44:33 +0200

> Cc: address@hidden
> From: Clément Pit-Claudel <address@hidden>
> Date: Wed, 20 Mar 2019 15:34:26 -0400
> > Instead, I think when a frame is created, we should record its
> > high-DPI state in the frame structure, or maybe in the frame's
> > parameters, and then use that when we prepare the fringe bitmaps for
> > display.
> That would be nice.  In fact, we already have code to detect high-DPI 
> displays in C, in x_get_scale_factor in xterm.c (used to scale wavy 
> underlines).  Would the way to go be to record the value returned by this 
> function in the frame's parameters?

The frame's parameters is a better way if we think such a parameter
will be useful to Lisp programs, and calling a function for that is
too much overhead.  Otherwise, a simple field of 'struct frame' will
be somewhat less hassle, because you don't need to mess with the likes
of frame-parameter to teach them about this new parameter.  But either
way, the job is not hard.

> I guess that another approach would be to support scalable images in the 
> fringe, rather than bitmaps.  If the fringe image was SVG instead of a 
> bitmap, for example, we could make it fill the whole width of the fringe.
> Do you have a sense of how hard that would be?

No, I don't, sorry.

And in any case, I don't think we should rely on SVG support for a
feature as basic as fringe bitmaps, since we use that in the most
basic display on GUI frames, whereas some people intentionally build
Emacs without SVG support.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]