It is currently July 17th, 2019, 7:35 pm

Debugging tips

Tips and Tricks from the Rainmeter Community
kschang
Posts: 1
Joined: April 23rd, 2009, 4:26 am

Debugging tips

kschang » April 23rd, 2009, 9:47 pm

I'm a newbie Rainmeter fan, as I only found it about a month ago, and this is my first Rainmeter project. I've looked for FAQs and such on Rainmeter, but it seems to be a bit lacking. The best reference is the "Manual", but it's mostly a reference, with few samples for the advanced features or debugging, much less error messages. So I'm offering a tip, if you can even call it that, so others don't have to bang their heads against walls like I did. :-D

* Know the X and Y sizes of your meters, so that you don't set improper offsets (X= and Y= stuff) for the other elements. If you set some text that's completely undisplayable (like -100 when the whole meter is only 50 pixels wide), the error message that comes up will say something like "Cannot render font [fontname]", which makes no sense at all.

How did I discover this? I had a CPU meter working, and was working on the HD meter, when I starting running into this message for all five STRING meters I have on display. I commented out all except the first meter, but the error persists, just less. It makes no sense as that section of code was copied from the CPU meter that was working perfectly. Tried different fonts, different sizes, different colors, same error message: Cannot display [fontname].

Then I decided to play with the X and Y offsets just for the HECK of it, and suddenly, it started working, though the text are not in the right positions or perhaps wrong alignments. So I started tweaking the numbers slowly, and realized I had a X offset that's way off to the left (-150r, if I recall correctly) for the text, which would have put it completely off the meter. That would explain the error, even though the error doesn't quite make sense.
sgtevmckay

Re: Debugging tips

sgtevmckay » April 23rd, 2009, 10:16 pm

Thanks for the tip. It is well documented that Rainmeter is not well documented.

It is one of my goals to assemble an in depth code wiki, but it will take time, and is not something I will start on immediately.

Although anyone is welcome to start proper documentation and submit it at anytime.