Hi
So I'm working on an options menu for my skin where you can type in the name of the font to change it.
But I want it to throw an error-message to the user if the user misspelled or if the font doesn't exist.
Is this possible? and if yes, how?
Thank you,
Magnumizer
It is currently September 29th, 2024, 9:28 am
IfCondition to display a String when Rainmeter is unable to find Font?
-
- Posts: 21
- Joined: May 23rd, 2013, 2:52 pm
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: IfCondition to display a String when Rainmeter is unable to find Font?
No, it really is not.
Rainmeter does not consider a FontFace that it can't find in memory as an "error", and just quietly replaces it with the default, I think Arial or something.
There is really no way I can think of with Rainmeter alone. FontFace is not based on any file name, so there is really just no way to ask if the font family exists.
Rainmeter does not consider a FontFace that it can't find in memory as an "error", and just quietly replaces it with the default, I think Arial or something.
There is really no way I can think of with Rainmeter alone. FontFace is not based on any file name, so there is really just no way to ask if the font family exists.
-
- Posts: 21
- Joined: May 23rd, 2013, 2:52 pm
Re: IfCondition to display a String when Rainmeter is unable to find Font?
Wouldn't it be possible to do something like:
Code: Select all
IfCondition= (#FontVariable# = Arial)
IfTrueAction=[!SetOption ErrorMessage Text "Unable to find font"][!Redraw]
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: IfCondition to display a String when Rainmeter is unable to find Font?
No, Rainmeter does not keep track of, or expose to the skin, what font it is using.x_magnumse_x wrote:Wouldn't it be possible to do something like:Code: Select all
IfCondition= (#FontVariable# = Arial) IfTrueAction=[!SetOption ErrorMessage Text "Unable to find font"][!Redraw]
I think getting a FontFace from the user via InputText is a bad idea. They are going to get it wrong about 60% of the time. Provide a list of either standard Windows fonts, or ones you include with the skin in @Resources\Fonts, and let them select from the list.
That's just my opinion of course, all I can really do is tell you what is possible, and what you want just isn't.
-
- Posts: 21
- Joined: May 23rd, 2013, 2:52 pm
Re: IfCondition to display a String when Rainmeter is unable to find Font?
Ok. I understand.
Thanks for your help as always!
Love you!
Thanks for your help as always!
Love you!