It is currently June 16th, 2021, 11:05 am

[BUG]Raimeter crashes when using a specific font

Report bugs with the Rainmeter application and suggest features.
User avatar
death.crafter
Posts: 176
Joined: April 24th, 2021, 8:13 pm

[BUG]Raimeter crashes when using a specific font

Post by death.crafter »

With Windows Insider Preview Build 21376, Microsoft added a new font family to Windows named Segoe UI Variable. So when I try to use the Segoe UI Variable Display Semibold typeface, Rainmeter crashes. There are no logs generated so I can't attach them. But here is the font file. You can try it for your self.

Segoe UI Variable:
SegUIVar.zip
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4300
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [BUG]Raimeter crashes when using a specific font

Post by eclectic-tech »

This works for me without crashing. :???:

Code: Select all

[MeterString]
Meter=String
FontFace=Segoe UI Variable
FontWeight=600
Text=Segoe UI Variable Semi Bold
There is only one Family name "Segoe UI Variable" and you can set as Semi Bold using either FontWeight or InlineSetting. InlineSettings
User avatar
death.crafter
Posts: 176
Joined: April 24th, 2021, 8:13 pm

Re: [BUG]Raimeter crashes when using a specific font

Post by death.crafter »

eclectic-tech wrote: May 28th, 2021, 3:13 am This works for me without crashing. :???:

Code: Select all

[MeterString]
Meter=String
FontFace=Segoe UI Variable
FontWeight=600
Text=Segoe UI Variable Semi Bold
There is only one Family name "Segoe UI Variable" and you can set as Semi Bold using either FontWeight or InlineSetting. InlineSettings
Actually the problem here isn't that. I know how to do it. It's just that all the other typefaces in the mentioned font family work perfectly. Just the Semibold one crashes Rainmeter. I thought it was worth reporting since Microsoft is planning to make Segoe UI Variable default(not certain, just mentioned in flight notes).
from the Realm of Death
User avatar
Brian
Developer
Posts: 2140
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [BUG]Raimeter crashes when using a specific font

Post by Brian »

I am assuming you used FontFace=Segoe UI Variable Display Semibold instead of the "preferred" family name of FontFace=Segoe UI Variable as eclectic-tech suggested?

Either way, this shouldn't crash Rainmeter. The problem stems from attempting to create a font object similar to our old rendering system (GDI+). The conversion functions only accept a "type face" name that is less than 32 characters long. We didn't take this into account, which is understandable since the vast majority of fonts do not have that long of names. Since these are Windows API functions, the FontFace option will truncate to 31 characters in some cases.

Anyway, the problem has been fixed. Thanks for reporting!

-Brian
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4300
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [BUG]Raimeter crashes when using a specific font

Post by eclectic-tech »

I didn't have the entire font family on my system to test, so thanks for reporting death.crafter. :great:
As always, thanks for the explanation and fix, Brian.