I am experimenting with character variables in the Rainmeter 4.1 beta, and have come across a problem with displaying different fonts in a single string. I am using Google's Material Icons and Google's Roboto in a test skin. As you can clearly see, using the different fonts in a single line will result in an unavoidable "fudging" of the Roboto text to be below the Material Icons.
I assume this either has to do with the Direct2D vs. GDI+ fudging that jsmorley talked about a while back when introducing the FontWeight option, or with the Material Icons font itself being wonky. But is there a way to work around this without creating two separate strings?
It is currently April 26th, 2024, 7:40 pm
Fudging problems with inline character variables
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Fudging problems with inline character variables
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 2686
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Fudging problems with inline character variables
Unfortunately there is no vertical adjustment available within a string at this point, so your best option is to use separate string meters. This issue came up recently.
The only way this would work with 1 string meter is if you found 2 fonts (or 1 font with icons and text) that used matching baselines.
-Brian
The only way this would work with 1 string meter is if you found 2 fonts (or 1 font with icons and text) that used matching baselines.
-Brian
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: Fudging problems with inline character variables
That’s unfortunate. It won’t matter much for checkboxes, but I was really hoping to use it for the up/down arrows in ModernGadgets. Disks Meter has 104 separate meters for the up/down arrows and the text to go with them. If this had worked, I could have reduced that number to 52.Brian wrote:Unfortunately there is no vertical adjustment available within a string at this point, so your best option is to use separate string meters. This issue came up recently.
The only way this would work with 1 string meter is if you found 2 fonts (or 1 font with icons and text) that used matching baselines.
-Brian
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Fudging problems with inline character variables
You might want to look at FontAwesome instead of Google Material Icons. I think there is a better match on the baselines with Roboto.raiguard wrote:That’s unfortunate. It won’t matter much for checkboxes, but I was really hoping to use it for the up/down arrows in ModernGadgets. Disks Meter has 104 separate meters for the up/down arrows and the text to go with them. If this had worked, I could have reduced that number to 52.
Download site: http://fontawesome.io
Reference site: http://fontawesome.io/cheatsheet/
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
[MeterString]
Meter=String
FontFace=Roboto
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
InlineSetting=Face | FontAwesome
InlinePattern=[\xf046]
Text=Hello World [\xf046]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: Fudging problems with inline character variables
I think it’s ironic that Google’s in-house font and in-house character font don’t have matching baselines. That seems like a huge oversight.jsmorley wrote:You might want to look at FontAwesome instead of Google Material Icons. I think there is a better match on the baselines with Roboto.
Download site: http://fontawesome.io
Reference site: http://fontawesome.io/cheatsheet/
1.pngCode: Select all
[Rainmeter] Update=1000 DynamicWindowSize=1 AccurateText=1 [Variables] [MeterString] Meter=String FontFace=Roboto FontSize=13 FontWeight=400 FontColor=255,255,255,255 SolidColor=47,47,47,255 Padding=5,5,5,5 AntiAlias=1 DynamicVariables=1 InlineSetting=Face | FontAwesome InlinePattern=[\xf046] Text=Hello World [\xf046]
I’ll give FontAwesome a try and see if it works out better.
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: Fudging problems with inline character variables
So I tried fontawesome, and although the chevrons were still pretty wonky, I found a neat alternative for the up/down arrows. I think I'm gonna stick with Material's checkboxes, but I'll definitely be using FA for the arrows. Thanks!
EDIT: Here's the new arrows in Disks Meter against the old ones. With this I can eliminate 78 meters from the skin, 52 of which were images!
EDIT: Here's the new arrows in Disks Meter against the old ones. With this I can eliminate 78 meters from the skin, 52 of which were images!
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA