Hi!
I want the month to be displayed in abbreviated form, my problem is since I couldn't find a desired small font, I made images of month names myself , but I don't know the right code to show up those images in the widget, can anyone share the code please?
Thanks.
It is currently April 24th, 2024, 8:37 pm
Meter Image for Month name
-
- Posts: 7
- Joined: January 6th, 2022, 10:36 am
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Meter Image for Month name
Yuvrajjj wrote: ↑January 6th, 2022, 10:46 am Hi!
I want the month to be displayed in abbreviated form, my problem is since I couldn't find a desired small font, I made images of month names myself , but I don't know the right code to show up those images in the widget, can anyone share the code please?
Thanks.
Code: Select all
[MeasureWeekday]
Measure=Time
Format=%a
[MeterWeekday]
Meter=Image
MeasureName=MeasureWeekday
ImageName=path\to\images\%1.png
; Here %1 will be replaced by Sun, Mon, Tue, etc
; So just replace image path by your image folder
; and name your images as sun.png, mon.png, tue.png, etc.
from the Realm of Death
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Meter Image for Month name
Even if this does work (and it does), I tend not to use the MeasureName and the ImageName options together in the same Image meter. See the Note here.death.crafter wrote: ↑January 6th, 2022, 12:49 pmCode: Select all
[MeasureWeekday] Measure=Time Format=%a [MeterWeekday] Meter=Image MeasureName=MeasureWeekday ImageName=path\to\images\%1.png ; Here %1 will be replaced by Sun, Mon, Tue, etc ; So just replace image path by your image folder ; and name your images as sun.png, mon.png, tue.png, etc.
That's why I'd better use a substitution on the [MeasureWeekday] measure, to get it returning the whole path of the appropriate image. In some cases this could be a not too good approach, for instance if the value returned by the measure has to be used in other parts of the skin as well. However I believe it worth taking into account such a possibility.
An example:
Code: Select all
[MeasureWeekday]
Measure=Time
Format=%a
RegExpSubstitute=1
Substitute="^(.*)$":"path\to\images\\1"
[MeterWeekday]
Meter=Image
MeasureName=MeasureWeekday
;ImageName=#@#%1.png
; Here %1 will be replaced by Sun, Mon, Tue, etc
; So just replace image path by your image folder
; and name your images as sun.png, mon.png, tue.png, etc.
However as said, your approach does work as well.
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Meter Image for Month name
I would say it's just over complication.balala wrote: ↑January 6th, 2022, 5:00 pm Even if this does work (and it does), I tend not to use the MeasureName and the ImageName options together in the same Image meter. See the Note here.
That's why I'd better use a substitution on the [MeasureWeekday] measure, to get it returning the whole path of the appropriate image. In some cases this could be a not too good approach, for instance if the value returned by the measure has to be used in other parts of the skin as well. However I believe it worth taking into account such a possibility.
ImageName is overridden by MeasureName only if Measure has an extension, which is not so in the case.
I guess they could check for image existence and decide more wisely as to what to use, but that's beyond our point of discussion.
But then again that's just me
from the Realm of Death
-
- Posts: 7
- Joined: January 6th, 2022, 10:36 am
Re: Meter Image for Month name
working
Thanks everyone.
Thanks everyone.