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

letters

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

No, I can't think of any approach that helps. While you can certainly use individual frames of a bitmap in a Bitmap meter this way, there is no way to get around needing a meter per letter.

Not sure using a bitmap buys you much in this case. Why not just separate letters as a.png, b.png, c.png etc. files, and then use Image meters with relative positioning?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

dvo wrote:oke i will cut them up could you help with the script for that ? :D
There is no Rainmeter script that can do that.
Letters.zip
I just used ImageMagick with the following command while in the folder with letters.png in a command (cmd.exe) window.

convert letters.png -crop 64x64 separate.png

That will create files with the names separate-0.png through separate-25.png which you can rename as you like.

http://www.imagemagick.org/script/index.php
http://www.bensnider.com/imagemagick-split-and-join-a-sprite-sheet.html

It's kinda borked though, as your letters.png bitmap is not right. It has a ton of extra space at the end of it.
1.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

dvo wrote:i didn't mean helping with cutting up :) i read that part already.. ( still spitting in the docs )
but the script for make it work... string converting to the images ... or is that even not possible with the cut ups... :???:
No good way really to take a string like "DVODESIGNS" and have Rainmeter split that into separate image meters. Probably some moderately complicated Lua that tears apart the string, assigns a file name to each letter, presumably just d.png, v.png, o.png and so on, then uses !SetOption to set the ImageName options of the meters.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

dvo wrote: so if i have string="balala and JSMolrey" that it can show up to 50 char. like a title or /and artist of a song... ;-)
Yeah, this would take some Lua as noted above. So in addition to what I already said, you are going to have to first create 50 images meters in the skin, all hidden. Then the Lua can count the letters in the string, assign filenames to the individual letters, set the Image meters ImageName with !SetOption, and then unhide the right number of meters. Not rocket science, but not trivial either.

First we need properly monspaced individual letters. Hard to work with that letters.png you provided, as it is messed up and causes weird spacing issues.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

dvo wrote:uhm damn i can't create lua scripting that's the worse part of rainmeter for me didn't figer it out how it works :jawdrop
so that's not really a option 4 me ...
It's the only thing that is going to work really.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: letters

Post by jsmorley »

I actually don't think you want monspaced letters for this effort. That is going to look really weird, when you have a string like DVODESIGNS where the spacing for the I between the S and the G is going to look odd.
2.png
I think you want the letters cropped to the exact width of the actual letter, with no spacing, and then when you create the Image meters you use relative positioning to add the desired space between each letter.
You do not have the required permissions to view the files attached to this post.