It is currently October 19th, 2020, 9:28 pm

Inline Pattern Handling for ° symbol [solved]

Help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Inline Pattern Handling for ° symbol [solved]

Post by CodeCode »

Hello, I have a custom font and I cannot figure out where in the alphanumerics the ° symbol is referenced.
So I am trying to use inline setting and pattern.

The following is my third failed attempt to set that font to Segoe Script to enable the degrees symbol. I am using <alt>248 to type here and in my ini but I am getting the wrong extended ascii that looks like a capital A with a ~ over it.

Or if there is a better way, I am open to suggestions.

Code: Select all

Text=Max 100°
InlineSetting=Face | Segoe Script
InlinePattern=Max .* 100(.*)
Thanks.

EDIT: Turned out to be an encoding issue.
Can't fix it if it ain't broke - unless it is in code.
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Re: Inline Pattern Handling for ° symbol [solved]

Post by CodeCode »

Final Successful Inline options:

Code: Select all

Text=Max 100°
InlineSetting=Face | Calibri
InlinePattern=Max.* 100(.*)
InlineSetting2=Size | 22
InlinePattern2=Max.*100(.*)
InlineSetting3=Color | 55,106,129,255
InlinePattern3=Max(.*)
Can't fix it if it ain't broke - unless it is in code.
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Pattern Handling for ° symbol [solved]

Post by balala »

CodeCode wrote: October 13th, 2020, 12:03 am Or if there is a better way, I am open to suggestions.
Instead of using a ° symbol, I recommend to use this: [\x00B0]. So for instance the above Text option should be: Text=Max 100[\x00B0]. On a skin this is displayed as Text=Max 100° and the following InlineSetting / InlinePattern does work:

Code: Select all

[MeterString]
...
Text=Text=Max 100[\x00B0]
InlineSetting=Face | Segoe Script
InlinePattern=Max 100(.*)
User avatar
jsmorley
Developer
Posts: 21421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inline Pattern Handling for ° symbol [solved]

Post by jsmorley »

This would also work...

Code: Select all

[MeterString]
...
Text=Text=Max 100[\x00B0]
InlineSetting=Face | Segoe Script
InlinePattern=[\x00B0]
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Re: Inline Pattern Handling for ° symbol [solved]

Post by CodeCode »

balala wrote: October 13th, 2020, 10:53 am Instead of using a ° symbol, I recommend to use this: [\x00B0]. So for instance the above Text option should be: Text=Max 100[\x00B0]. On a skin this is displayed as Text=Max 100° and the following InlineSetting / InlinePattern does work:

Code: Select all

[MeterString]
...
Text=Text=Max 100[\x00B0]
InlineSetting=Face | Segoe Script
InlinePattern=Max 100(.*)
jsmorley wrote: October 13th, 2020, 10:57 am This would also work...

Code: Select all

[MeterString]
...
Text=Text=Max 100[\x00B0]
InlineSetting=Face | Segoe Script
InlinePattern=[\x00B0]
Thanks for the [\x00B0] ! Is there a list of these, or what are they called by and I can google a list?
Is it Hex? Or Octal? etc?
Thanks.

NB: the Text=Text is a typo. :oops:
Can't fix it if it ain't broke - unless it is in code.
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Pattern Handling for ° symbol [solved]

Post by balala »

CodeCode wrote: October 13th, 2020, 7:53 pm NB: the Text=Text is a typo. :oops:
Right, it obviously is. In fact is a copy / paste mistake. Sorry for it...
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Re: Inline Pattern Handling for ° symbol [solved]

Post by CodeCode »

balala wrote: October 13th, 2020, 8:11 pm Right, it obviously is. In fact is a copy / paste mistake. Sorry for it...
LOL no, I am sure I posted it that way? NVM. Wasn't being pedantic, I genuinely thought it ws MY typo!
Can't fix it if it ain't broke - unless it is in code.
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Re: Inline Pattern Handling for ° symbol [solved]

Post by CodeCode »

CodeCode wrote: October 13th, 2020, 7:53 pm Thanks for the [\x00B0] ! Is there a list of these, or what are they called by and I can google a list?
Is it Hex? Or Octal? etc?
Thanks.
I looked it up, and from what I made of the many Code Point types it is HEX?

I may need to have this option in the future for other symbols to use in rainmeter scripting.
Can't fix it if it ain't broke - unless it is in code.
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Pattern Handling for ° symbol [solved]

Post by balala »

CodeCode wrote: October 13th, 2020, 8:16 pm LOL no, I am sure I posted it that way? NVM. Wasn't being pedantic, I genuinely thought it ws MY typo!
No, it was mine. In your code the typo doesn't exist yet, being introduced in my code.
Sorry again...
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Pattern Handling for ° symbol [solved]

Post by balala »

CodeCode wrote: October 13th, 2020, 8:21 pm I may need to have this option in the future for other symbols to use in rainmeter scripting.
You might take a look here: https://docs.rainmeter.net/manual/variables/character-variables/.