It is currently March 28th, 2024, 11:30 pm

Using Fonts with Rainmeter

Our most popular Tips and Tricks from the Rainmeter Team and others
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Using Fonts with Rainmeter

Post by jsmorley »

Using fonts with Rainmeter

This guide is intended to describe how best to use fonts with Rainmeter. There are two ways fonts might be made available to a skin. First, you might just use the fonts that come installed with Windows, and second, you might want to include custom fonts with your skin.

Custom fonts can be obtained a bunch of different places, but some of the more popular are:
Fonts come in two standard formats. TrueType Font (.ttf) and OpenType Font (.otf). If you have access to both for a particular font, the .otf format is preferred. Rainmeter fully supports both.

There is one other external tool that can be VERY useful in managing and using custom fonts in Rainmeter. Get the dp4 Font Viewer utility. You will find it a great help in both identifying font "face" names for your skin, and in knowing what "weights" and "typography" your font(s) support. You can go to http://us.fontviewer.de/Download/ to download either a .exe installer or a .zip "portable" version of the tool.

Making your custom fonts available to your skin

All you need to do is place any font .otf or .ttf file(s) in your @Resources\Fonts folder. When the skin is loaded, the fonts in that folder will automatically be visible to your skin.

If you are not familiar what @Resources is, or where the folder should be, please take a minute to review that link above.

Using your font in your String meters

Choosing the font FACE

FontFace=Fira Sans

This option will define the font "Preferred Family Name" or "Family Name". Font families are structured in a couple of different ways, but the simplest way to get this is to double click the font .otf or .ttf file in Windows Explorer, and get the name from the top left of the Windows Font Viewer dialog that will open.
1.jpg
With some fonts, there may be weights like "SemiBold" or other attributes like "Condensed" appended to the font Family name shown in Window Font Viewer. Don't be too concerned about that, as Rainmeter will figure out that a font Family name like "Fira Sans SemiBold" is a part of the Preferred Family of "Fira Sans", and all Fira Sans fonts in @Resources\Fonts will be considered when other font attribute options are used.

Setting the font SIZE

FontSize=15

This simply sets the font size in points.

Setting the font COLOR

FontColor=255,255,255,255

This will set the font color, using the standard RRR,GGG,BBB,AAA RGB or RRGGBBAA Hex forms of the color codes in Rainmeter.

Setting the font WEIGHT

FontWeight=600

This will set the font weight. What works here is dependent on what weights are supported by your font Family. It is certain that 400 (Regular / Normal) will work and is the default, and that even if not supported by the font, 700 (Bold) will be simulated by Rainmeter. Other weights depend on the font supporting them.

It's important to remember that the actual file name of the .otf or .ttf file doesn't mean a thing in this context. Here is a list of the standard weights and common names that fonts use, but nothing says any font author has to follow this. Certainly not in the names of the actual font files, and not even in the SubFamily names that they use internally. That is where our external dp4 Font Viewer tool will be useful, and we will get to that in a minute.
100 - Thin (Hairline)
200 - Extra Light (Ultra Light)
300 - Light
400 - Regular (Normal)
500 - Medium
600 - Semi Bold (Demi Bold)
700 - Bold
800 - Extra Bold (Ultra Bold)
900 - Black (Heavy)
950 - Extra Black (Ultra Black)
One thing to note is that you can't mess this up really. If you specify a weight that is NOT supported by the font, it will use the nearest weight that IS supported, rounding down below 500 and rounding up at 500 and above. So in a sense, if you ask for "100", you are in effect saying "use the lightest weight available". if you ask for "500" you are in effect saying "use the nearest weight bolder than normal available".

Using dp4 Font Viewer

Load this utility, then use the browse / folder button at the top left go to the folder containing your font(s). They will all be listed in the panel on the left.

Then you can check the box labeled "Weight class" and select any of the weights listed in the pull-down menu. Any font .otf or .ttf files that supports the selected weight will then be listed. If there isn't one, that weight won't work with that particular font family.
2.jpg
In this case, our Fira Sans font Family supports a weight of "Thin", and we know we can use FontWeight=100 in our String meter.

There will be lots of interesting and important information in the right panel for your font, in particular you should note any "License" information, to be sure you can legally distribute this font with your skin.
3.jpg
Extra credit: Typography

If you want to see what Typography values are supported by your font, the dp4 Font Viewer is one of the best (and almost only) ways to find out what your font supports. Select the "Glyph substitution" button at the bottom right, and a list of all Typography features your font has will be listed. Then you can use the information found at InlineSetting Typography to find the codes you need to use in the meter.

I hope this is of some help with using fonts.
You do not have the required permissions to view the files attached to this post.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Using Fonts with Rainmeter

Post by pul53dr1v3r »

1) if i don't specify FontFace but use a special character such Image implementing it this way: Text=[\x0x058D], how to know which the font it uses? Is it any (first) found that supports the character or sth else is in question ?

2) And if a character from Unicode 7.0 or higher is being used in an older Windows OS (for inst. Win 7) with Rainmeter and it shows just a square box instead of the character, what to do in that case since me myself don't have and older OS to test it?
Could System update help there since Windows 7 is pretty older than Unicode 7.0 (in case it ain't up to date already)?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using Fonts with Rainmeter

Post by jsmorley »

Pul53dr1v3r wrote: November 4th, 2019, 12:17 pm 1) if i don't specify FontFace but use a special character such Image implementing it this way: Text=[\x0x058D], how to know which the font it uses? Is it any (first) found that supports the character or sth else is in question ?
The default font in Rainmeter is Arial.

BTW, you just need Text=[\x058D].

I'm not sure on 2).
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Using Fonts with Rainmeter

Post by pul53dr1v3r »

jsmorley wrote: November 4th, 2019, 12:27 pm The default font in Rainmeter is Arial.

BTW, you just need Text=[\x058D].

I'm not sure on 2).
right, but it would be too easy answer if i'm not using, for example, U+23F7 same way and it's been working flawlessly but the character (as some others) haven't been included in Arial font. Date of the font is 2019-03-19 so the newest is in question.

Image
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using Fonts with Rainmeter

Post by jsmorley »

I don't know. All characters in the Unicode Basic Multilingual Plane (hex from x0 to xFFFE) I have ever used just always work for me. I would think the most certain results would be with Segoe UI, which is a very robust Unicode font, but my understanding is that all the normal text fonts that ship with Windows support Unicode.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterOne]
Meter=String
FontSize=50
FontWeight=400
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
Text=[\x058D] [\x23F7]

1.jpg


I tried Arial, Segoe UI, and Times New Roman, and while they look slightly different, they all work. I actually kinda like the representation of that first symbol that Times New Roman has...


2.jpg


3.jpg



I find it very, very hard to work up even minimal interest in how anything works in Windows 7. It's not 2009 anymore.
It's time to get rid of that 3.5" floppy drive, that printer that uses a parallel cable, and Windows 7.
You do not have the required permissions to view the files attached to this post.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Using Fonts with Rainmeter

Post by pul53dr1v3r »

jsmorley wrote: November 4th, 2019, 2:16 pm
it does work for me as well. Have never had an issue with it and the issue is not happening to me but to an user of Rainformer suite who uses Windows 7 OS.
Also, you probably misundestood the meaning of my first post where the symbol U+058D is jus an example of an Unicode 7.0 character and it does perist in Arial font.
But U+23F6 and U+23F7 don't. No metter OS, as Rainmeter's default font is Arial, i'm just having been intrugued in from what the font i get the characters if they don't persist in Arial as default. Isn't it interesting? :???:


As to the guy and his issue, he sent a pic to me what it looks like Image , so the issue is there. And i'm just trying to help him to fix that small issue if possible on his really old OS.
I suggested him earlier today to use Segoe Symbol font but still no answer.

And, there are many good songs from that age. The newer doesn't always mean the better. I don't rememeber thyt any older Win had so many ibugs as Win 10 has.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using Fonts with Rainmeter

Post by jsmorley »

I don't know what you are getting. Both of those Unicode characters work fine for me.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterOne]
Meter=String
FontSize=50
FontWeight=400
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
Text=[\x23F6] [\x23F7]

1.jpg


https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list

Maybe Windows is doing some kind of font substitution automatically if a particular glyph is not included in a particular font. Again, talking about Windows 10 here, I don't know, and honestly don't care, what Windows 7 does.
You do not have the required permissions to view the files attached to this post.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Using Fonts with Rainmeter

Post by pul53dr1v3r »

jsmorley wrote: November 4th, 2019, 3:48 pm
i'm getting the same othewise i wouldn't use it in my suite. But seems it's always better to specify the font name, just in case.

Will try some other options with the user, but neither i plan to tackle with Win 7 as i don't have it at hand .

Thanks (at least a bit in this case).
User avatar
AnimaliX
Posts: 33
Joined: August 22nd, 2016, 9:22 pm

Re: Using Fonts with Rainmeter

Post by AnimaliX »

hello,
and what to do if you want same fonts in multiple different skins ? it is a very inefficient solution to have the same fonts in, for example, five resource folders
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Using Fonts with Rainmeter

Post by Yincognito »

AnimaliX wrote: October 9th, 2023, 6:04 am hello,
and what to do if you want same fonts in multiple different skins ? it is a very inefficient solution to have the same fonts in, for example, five resource folders
If you're using the said fonts for most of your skins, you could simply install those fonts in Windows and be done with it. If it's just a few (related, yet different) skins, then including them in a skin suite - where the resources folder is common to all skins in the suite - can be an alternative. If the skins are both a minority of all your skins, different and unrelated to each other, well, you'll just have to live with this system, at least until a Rainmeter-wide common location for such fonts is considered for implementation by the developers (similar to how plugins are handled).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth