It is currently March 28th, 2024, 4:39 pm

Fira Sans font for your Rainmeter skins

Tips and Tricks from the Rainmeter Community
Post Reply
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Fira Sans font for your Rainmeter skins

Post by jsmorley »

https://www.fontsquirrel.com/fonts/fira-sans

InlineSetting=Face | Fira Sans
https://docs.rainmeter.net/manual/meters/string/inline/

This is a great sans-serif font that looks good at any size, has tons of weights (use InlineSetting(N)=Weight | xxx), lots of Typography features (use InlineSetting(N)=Typography | xxx) and support for a wide array of Unicode characters. The font is open-source, and can be freely distributed with your skins.
1.jpg
Obviously you won't want to include all 30+ Megabytes of font files with a .rmksin. Here are the .otf files and the corresponding Weight settings to get a pretty full range of functionality. You can just include the ones you want to use:

Code: Select all

100 - FiraSans-Thin.otf
200 - FiraSans-UltraLight.otf
300 - FiraSans-Light.otf
400 - FiraSans-Regular.otf
500 - FiraSans-Medium.otf
600 - FiraSans-SemiBold.otf
700 - FiraSans-Bold.otf
800 - FiraSans-ExtraBold.otf
900 - FiraSans-Heavy.otf
950 - FiraSans-Ultra.otf

400 - FiraMono-Regular.otf
500 - FiraMono-Medium.otf
700 - FiraMono-Bold.otf
There are also Italic, Compressed and Condensed variants of the fonts, if you need those.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Fira Sans font for your Rainmeter skins

Post by CyberTheWorm »

Thanks for that, need this for the degree symbol which does not work for most Windows fonts. :thumbup:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fira Sans font for your Rainmeter skins

Post by jsmorley »

CyberTheWorm wrote:Thanks for that, need this for the degree symbol which does not work for most Windows fonts. :thumbup:
I kinda resist that. the degree symbol is a standard ANSI (Extended ASCII) character, decimal number 248 ° and should be supported in most fonts, certainly any font built-into Windows.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Fira Sans font for your Rainmeter skins

Post by eclectic-tech »

Very versatile font!

Thanks for sharing! :thumbup:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fira Sans font for your Rainmeter skins

Post by jsmorley »

CyberTheWorm wrote:Thanks for that, need this for the degree symbol which does not work for most Windows fonts. :thumbup:
As far as I know, every single font that comes with Windows, with the possible exception of a couple of "wingdings / webdings" type fonts, support the ° character.

It is likely that you are pasting the ° character into your skin .ini file without first changing the encoding of the .ini file to UTF-16 Little Endian. The issue is that if you are using a default encoding of ANSI, when you paste in an Extended ASCII character, one that is above 128 in the ASCII/Extended ASCII character set, then the file will be saved as UTF-8 w/o BOM, and that isn't going to work right with Rainmeter. That ° character, ASCII 248, will be replaced by some weird symbol.

Inside baseball: ANSI and UTF-8 are exactly the same thing as long as the file contains only characters from the ASCII set from 0-128 in decimal. When characters from 129-255 are used, then it will be seen as UTF-8 w/o BOM. UTF-8 is fine for the web, and is the standard there. Windows, and Rainmeter, hate it.

I strongly suggest that ALL Rainmeter skin .ini files be encoded as UTF-16 LIttle Endian. This will allow you to use any of the characters from the ASCII / Extended ASCII set, as well as any Unicode characters. Unicode of course has the additional imitation that the font you are using in the skin must support the character(s), but most decent fonts support a wide range of Unicode characters. This is one of those situations where doing it this way can never hurt, but not doing it can lead to confusion and problems. Just get in the habit. Note that the new "Create new skin" functionality in Rainmeter's Manage dialog will always create new .ini files as UTF-16 Little Endian.

https://docs.rainmeter.net/tips/unicode-in-rainmeter/

The encoding you want in different text editors:
  • Unicode (Windows Notepad.exe)
  • UCS-2 LE BOM (Notepad++)
  • UTF-16 LE (Sublime Text)
http://www.asciitable.com/
Note that the characters in the Extended ASCII set, those from 129-255, may be different depending on your Language / Locale in Windows, to support language characters other than standard Latin / English. Having said that, in my experience 176 is always the degree symbol °, as that is something pretty much every language uses.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Fira Sans font for your Rainmeter skins

Post by CyberTheWorm »

jsmorley wrote:
The encoding you want in different text editors:
  • Unicode (Windows Notepad.exe)
  • UCS-2 LE BOM (Notepad++)
  • UTF-16 LE (Sublime Text)
OK I was missing that, thanks for that list :thumbup: . This now solves my degree issue I was having. Easy to miss such a simple thing,
Post Reply