ocodo-svg-modelines
ocodo-svg-modelines copied to clipboard
HiDPI support?
This package doesn't seem to pick up the Xft.dpi setting on Linux, so I end up with a much smaller font than expected in the modeline.
Any chance of fixing that?
Please Note that sabof/svg-mode-lines-themes is doing the lower level stuff.
But I think Librsvg seems to be responsible for this particular problem.
I'll leave this issue open fir discussion.
@sabof, any ideas on this?
Can you make the font size customizable in the meantime? I've been using a modified version of one of your earlier snippets with larger font size but can't switch to this package because of this issue.
I should also mention that the fatter initial versions work way better in a HiDPI setting.
Font size is customisable.
You will need to override any style you find in the themes, and have them eval after the theme has been initially loaded.
I'll keep this in mind, although I don't see any immediate solutions.
@osener an example style override:
Add to your .emacs
or .emacs.d/init.el
(defun ocodo-mesh-aqua-buffer-name-style (widget)
(list :font-weight "normal"
:font-size "8pt" ;; Change font size to whatever you'd like.
:font-family "sans-serif"
:fill (if (smt/window-active-p) "#FFFFFF" "#666666")))
Note that you can use conditional settings, as is being done here with :fill
when the window is active.
You could determine the HiDPI'ness of your display and use that condition to set different font-sizes.
The main problem with support is that different enviroments will determine HiDPI in different ways, and I don't know what they all are. If you can post an example of detection for your environment, and any reference resources, that would be helpful.
Thanks for the tips, guys. The manual theme override is working for me, so it's a good solution for now.
I did find a detection that works for me (Gtk on Linux X11). I just found it through apropos
I don't know how generally implemented it is across platforms, so this is by no means an expert suggestion.
(defun dpi () (/ (display-pixel-width) (/ (display-mm-width) 25.4)))
Interesting, my OSX display is reported as 93.97~dpi