It is currently March 29th, 2024, 3:20 pm

[Feature Suggestion] Custom fonts/cursors folders

Report bugs with the Rainmeter application and suggest features.
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

[Feature Suggestion] Custom fonts/cursors folders

Post by Nickson »

I would love to have a way to specify custom folders for fonts/cursors.

I guess it would be the best to add it to the Settings-Rainmeter Section, for example:

Code: Select all

[Rainmeter]
FontPath=#@#Assets\Fonts\
CursorPath=#@#Assets\Cursors\
I dont know if its possible to use #@# there, but absolute paths would be great too.

It would allow to remove clutter from the base resources folder.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by SilverAzide »

Nickson wrote: January 14th, 2023, 5:08 pm I would love to have a way to specify custom folders for fonts/cursors.

I guess it would be the best to add it to the Settings-Rainmeter Section, for example:

Code: Select all

[Rainmeter]
FontPath=#@#Assets\Fonts\
CursorPath=#@#Assets\Cursors\
I dont know if its possible to use #@# there, but absolute paths would be great too.

It would allow to remove clutter from the base resources folder.
Is this not enough? :confused:
Gadgets Wiki GitHub More Gadgets...
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by Nickson »

No, these are the default folders. In my case, I want to put them in an "Assets" folder as indicated in my example
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by balala »

Nickson wrote: January 15th, 2023, 6:11 pm No, these are the default folders. In my case, I want to put them in an "Assets" folder as indicated in my example
Why? Doesn't really make sense, at least I don't see a case in which the default Fonts and Cursors folders are not enough.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by SilverAzide »

Agree with balala on this one. The "@Resources" folder *is* the "Assets" folder for Rainmeter, so I don't see the point of nesting these types of items one level deeper.
Gadgets Wiki GitHub More Gadgets...
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by Nickson »

Well, my case is enough that I want an option to specify custom folders.

And based on your answers, I now suspect that you've never worked on larger projects where a good folder structure is a key element to locating the things you need, or that you just don't care about a good folder structure.

And it opens up the possibilities... maybe you already have a custom font/cursor folder somewhere else and don't want to copy everything as that would be redundant and redundancy is another key element that has no place in a good structure.
User avatar
Jeff
Posts: 326
Joined: September 3rd, 2018, 11:18 am

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by Jeff »

I believe balala and Silver are recommending you to use the hardcoded @Resources\Fonts because of this single detail on the @Resources page.
  TrueType (.ttf) or OpenType (.otf) fonts in the @Resources\Fonts folder are automatically loaded and can be used with the FontFace option in string meters.  
In case of any errors, the user dosen't need to install the fonts in order to get them to work for the end user, additionally, if you load a skin that has fonts inside @Resources\Fonts, you'll notice the list of Fonts in that folder is recognized and printed in the Rainmeter Log (and those names are also what Rainmeter will recognize with FontFace too, prety cool). After that, just doing FontFace=Roboto Regular should work, without adding any prefix or sufix to the options' value.

The folder exists entirely to create less hassle as it's programmed to work in your favor.

Also @Resources kinda exists so you don't need to create an extra Assets folder, it is already understood by it's existence, @Resources stores resources you need like files/assets.

Popular big projects (in file size and complexity) like JaxCore's whole suite and Cardi's Droptop just use @Resources\Fonts, for comparison.

That being said, if you wanna continue with whatever you have, you can use the depracated LocalFont and you can just do

Code: Select all

LocalFont=#@#Assets\Fonts\Atami-Display-Regular.otf
LocalFont2=#@#Assets\Fonts\Roboto-Regular.ttf
LocalFont3=#@#Assets\Fonts\MaterialIcons-Regular.ttf
;etc.
FontFace=Roboto Regular
since it still works.

This dosen't apply for cursors, you don't have LocalCursor option.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by balala »

Nickson wrote: January 17th, 2023, 4:55 pm And it opens up the possibilities... maybe you already have a custom font/cursor folder somewhere else and don't want to copy everything as that would be redundant and redundancy is another key element that has no place in a good structure.
Since the @Resources\Fonts folder is contained in the config, when you create a skin installer, this folder (along with its content) is included into it, without having you to worry not to forget it. The fonts contained into this folder can be freely used in the skin, without having to install them.
Creating sub-folders of the @Resources folder (for instance #@#Assets\Fonts\, as asked in the original request) doesn't make too much sense, because these folders are still contained into the config (even more, in its @Resources folder), so usually these are not the some custom folders you might have somewhere on your hard disk. If on the other hand you'd like to use an "external" folder to keep the fonts in, this would complicate things, because when you create the skin installer, these fonts should be added manually. Most skin creators would forget adding them, and this way they couldn't be used by the skin, when it is installed.
Nickson wrote: January 17th, 2023, 4:55 pm And based on your answers, I now suspect that you've never worked on larger projects where a good folder structure is a key element to locating the things you need, or that you just don't care about a good folder structure.
Believe me, I did worked on quite large Rainmeter projects. The folder structure of a Rainmeter config, beside the location of Fonts folder, is bound, you can't modify it freely.
A dev would be needed here, to tell his opinion, but in any case this is how I see this question. Still sustain, there is no reason to use the fonts placed outside of the @Resources\Fonts folder, or the default and comon fonts, installed to most / all computers.
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by Nickson »

Ok, I see the installer point, that would definitely be a problem.

How about abstracting the functionality of LocalFont and doing something like this in a skin:

Code: Select all

[Rainmeter]
LocalFontPath=Assets\Fonts\
LocalCursorPath=Assets\Cursors\
Doesnt need to be LocalFontPath, could also just be FontPath

This would have multiple benefits:
  1. Overrides the default path, but would keep the base at @Resources so you cant put it anywhere.
  2. You dont have to bother defining each font/cursor manually, like with LocalFont.
  3. Fonts arent loaded into skins where they arent needed, such as images or visualizers
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Feature Suggestion] Custom fonts/cursors folders

Post by balala »

Nickson wrote: January 17th, 2023, 7:47 pm Ok, I see the installer point, that would definitely be a problem.

How about abstracting the functionality of LocalFont and doing something like this in a skin:
Definitely a dev is needed here, to tell his opinion. I can't help more on this question, since I'm not a dev.
Nickson wrote: January 17th, 2023, 7:47 pm
  1. Overrides the default path, but would keep the base at @Resources so you cant put it anywhere.
  2. You dont have to bother defining each font/cursor manually, like with LocalFont.
  3. Fonts arent loaded into skins where they arent needed, such as images or visualizers
If the fonts are added to the default location (so into the Fonts folder), you don't have to define each font manually (to be honest I don't really follow what you mean by defining them manually), you have to use their name in the FontFace option (same for cursors). And if in a skin of the config you1re not using one of the included fonts, it is not loaded into that skin (however I'm not entirely sure here, I might be wrong at this point).
Devs are expected...