It is currently March 28th, 2024, 10:24 pm

[Feature] ClipString and line spacing/line height

Report bugs with the Rainmeter application and suggest features.
mistic100
Posts: 35
Joined: October 12th, 2014, 5:27 pm

[Feature] ClipString and line spacing/line height

Post by mistic100 »

Hello,

It would be very useful to be able to control the spacing between lines when using a String meter with ClipString=2
It could be a absolute spacing in FontSize unit (like Photoshop) or value relative to the default line spacing of the font (0.5 for half spacing for example).

Thank you.
User avatar
Jeff
Posts: 326
Joined: September 3rd, 2018, 11:18 am

Re: [Feature] ClipString and line spacing/line height

Post by Jeff »

D2D dosen't seem to have anything related to line spacing, oddly and sadly.
In the meanwhile, you could try

Code: Select all

InlineSetting = Size | 100
InLinePattern = #CRLF#
which just changes the newline and return character size to how many pixels you want
Sadly it doesn't work in reverse like you suggest and making the size 0 still remains the same. :(
If it helps, try adding AccurateText=1 to the [Rainmeter] section which should make padding and stuff like that smaller
mistic100
Posts: 35
Joined: October 12th, 2014, 5:27 pm

Re: [Feature] ClipString and line spacing/line height

Post by mistic100 »

AccurateText doesn't change anything.

Well if the underlying language does not support it, it's more or less a dead-end. Too bad.
User avatar
Jeff
Posts: 326
Joined: September 3rd, 2018, 11:18 am

Re: [Feature] ClipString and line spacing/line height

Post by Jeff »

You can use 3rd party plugins like MagickMeter to try and achieve that though, MagickMeter which uses ImageMagick for almost everything you can produce with it, and for the Text effects he has inline spacing that can go negative and postivie and much more options (that I still wish Rainmeter borrowed)
https://github.com/khanhas/MagickMeter/wiki/Text#linespacing

Code: Select all

[TimeToStealYourInfo]
Measure = Plugin
Plugin  = WebNowPlaying
TrackChangeAction = [!CommandMeasure MagickAlbumStuff "Reload Image1"][!UpdateMeasureGroup MusicStuff]

[Artist]
Group = MusicStuff
Measure    = Plugin
Plugin     = WebNowPlaying
PlayerType = Artist
UpdateDevider = -1

[Title]
Group = MusicStuff
Measure    = Plugin
Plugin     = WebNowPlaying
PlayerType = Title
UpdateDevider = -1

[Album]
Group = MusicStuff
Measure    = Plugin
Plugin     = WebNowPlaying
PlayerType = Album
UpdateDevider = -1

[MagickAlbumStuff]
Measure = Plugin
Plugin  = MagickMeter
Image   = Text [Artist]-[Title]-[Album] | ClipStringW 300 | LineSpacing 30
DynamicVariables = 1
UpdateDevider    = -1

[MagickMeter]
Meter       = Image
MeasureName = MagickAlbumStuff
SolidColor=0,0,0,1
did it for me
Last edited by Jeff on March 30th, 2019, 1:03 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Feature] ClipString and line spacing/line height

Post by jsmorley »

That MagickMeter plugin is impressive indeed.

khanhas rightly recognized that actually ALL meters in Rainmeter are in fact "images", drawn on a single skin "canvas", and took very creative advantage of that.