Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 482

[BUG] DirectWrite font enumeration breaks Face InLineSetting when FontFace is invalid and @Resources/Fonts folder exists

$
0
0
Intriguing title isn't it?

This bug was introduced with this commit https://github.com/rainmeter/rainmeter/commit/766663f9e0e6db940c25f2d6639a920baa31b08d

This bug only happens on InLineSetting = Face and not on FontFace.

Steps to reproduce
  • Download MaterialIcons-Regular.tff and install it like you would any font, locally on your PC
  • Create a new config and the necessary .ini file to load it
  • Inside the .ini, paste the following

    Code:

    [StringStyle]Y=R;=====Settings=====FontColor      = FFFFFFInLineSetting  = Size | 40InlineSetting3 = Shadow | 0 | 0 | 1 | 000000InlineSetting4 = Shadow | 2 | 2 | 2 | 000000AAAntiAlias      = 1[StringNormal]Meter          = StringMeterStyle     = StringStyleText           = Normal: [\xE545]FontFace       = Material Icons[StringBug]Meter          = StringMeterStyle     = StringStyleText           = Flower bugged: [\xE545]FontFace       = Bowser's Inside Story Medium w/ Euro-Technic MediumInLineSetting2 = Face | Material IconsInlinePattern2 = [\xE545]
  • Load the skin, if you have Material Icons installed, you will see a cute flower
  • Go in the root config folder
  • Create the @Resources folder and inside it create the Fonts folder
  • Refresh the skin, now the flower transforms into □
  • Delete the @Resources folder and refresh the skin, the flower now appears back
  • Wonder what happened
Of note is that the existance of that folder breaks InLineSetting on all sub-configs a config might have. From what I can gather, when you have FontFace and InLineSetting, FontFace is done first, after which InLineSetting is done.
In our case, the FontFace is invalid, that font dosen't exist in @Resources/Fonts or on our PC, could have been a chord progressing typed at random for all I care, even with the invalid font InLineSetting comes after and dose the necessary things.
This process breaks however if you have an invalid FontFace and a valid InLineSetting, if you create just the folder @Resources/Fonts it breaks because.... ??????????????? I have no idea, maybe wrong order of operations? Maybe the FontFace error exits out too early?

Bonus Bug
This font (FontFace=Bowser's Inside Story Medium w/ Euro-Technic) is unusable in Rainmeter because of the / in the name and you're unable to get its' full name from Windows' Notepad.

Bonus Bug 2
If you delete @Resources/Fonts for the flower to show, but change InlinePattern2 to InlinePattern7, Rainmeter panics out. This is already visible on [StringNormal], but Rainmeter renders the very first character (which dosen't exist in the Material Icons font), then invisible characters (which is correct as they are nilled out in the font file), then : (which dosen't exist in the Material Icons font), then the flower (which is correct).

Statistics: Posted by Jeff — Today, 12:51 am — Replies 0 — Views 25



Viewing all articles
Browse latest Browse all 482

Trending Articles