It is currently April 19th, 2024, 5:01 am

Custom simple sentence 2:

General topics related to Rainmeter.
matthewh133
Posts: 10
Joined: July 20th, 2010, 12:26 pm

Custom simple sentence 2:

Post by matthewh133 »

Hey guys, I was wondering how I can tweak the coding of simple sentence 2 (by white-baron) (standard from download), to look more like this take on it:

Image

I really like the way the text isn't overlapped and font looks awesome. Any help would be greatly appreciated. Mine currently is in the building stages and looks like this:

Image

Uploaded with ImageShack.us
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom simple sentence 2:

Post by jsmorley »

As we discussed in another thread, it's all about the X, Y, W and H settings on the meters. You can easily move things around by playing with those.
matthewh133
Posts: 10
Joined: July 20th, 2010, 12:26 pm

Re: Custom simple sentence 2:

Post by matthewh133 »

Yeah sorry, I got that worked out, just trying to figure out the font now.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom simple sentence 2:

Post by jsmorley »

I don't have the original skin, but let's look at some general advice:

If you don't have the font in that skin installed, you will need to do that. It might be included in the archive of the suite where you got it, or you can look in the .ini files, probably under [Variables] and find FontFace=xxxx and see what xxxx is. Then see if you can't get the font from dafonts.com. I'm betting it is there. Then install the .ttf file by right clicking it and saying "install".

Now you can use that font in your version of the skin by finding out where FontFace is being defined. As I said, probably in Variables, but might be a FontFace= statement on each meter. If on the meters it says FontFace=#xxxx#, with leading and trailing # chars, it is defined either up in Variables or in an @inlcude file. Don't change the individual meters in this case, find the place where FontFace is defined and change it there.

As to the overlapping and positioning in general, here is my take:

Unless the string meter has a "StringAlign=" statement on it which is either CENTER or RIGHT, you are better off without W= and H= statements on the meter. Just remove them. That, along with DynamicWindowSize=1 in [Rainmeter], will solve the "cutting off" stuff. As to the vertical spacing, it is best to NOT hard code the Y= statements on string meters that appear above and below each other. The problem with saying Y=50 or whatever is that if you change the font or the font size, things can really get messed up.

What you want to do is use "relative positioning" instead. There are two versions of this... Relative to the beginning of the previous meter, or relative to the end of the previous meter. You set this by adding either an "r" (from the beginning) or "R" (from the end) to the meters, and they will automatically position Y=xxR pixels from the previous meter. This works with X= too of course, but from the look of your skin X= isn't the issue.

Example:

[MeterOne]
Meter=String
X=0
Y=0
FontSize=10
Text=I'm meter one

[MeterTwo]
Meter=String
X=0
Y=5R
FontSize=10
Text=I'm meter two

Now MeterTwo will always be 5 pixels below the bottom of MeterTwo. Even if you change FontSize=10 to FontSize=12, the second meter will move down to adapt.

Play with this concept in your skin, and I'm betting that you can get it looking as you like.
matthewh133
Posts: 10
Joined: July 20th, 2010, 12:26 pm

Re: Custom simple sentence 2:

Post by matthewh133 »

Thanks for the help again! Sorry, for the late reply, just been in bed ;)
matthewh133
Posts: 10
Joined: July 20th, 2010, 12:26 pm

Re: Custom simple sentence 2:

Post by matthewh133 »

Got it going perfectly, thanks a bunch! It seems the main problem, including the cut-off problems from the other threat were a result of not having the font installed that was there in variables, which also happened to be the font I was looking for haha.