It is currently March 29th, 2024, 9:39 am

InlinePattern Query

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

InlinePattern Query

Post by Mor3bane »

Hello RM groupies :)

I have a string meter and I am using the following code to display it.
The characterspacing setting works fine but between 2 odd characters the spacing appears too wide, esthetically speaking that is.
Is there an in InlinePattern that can manage that specifically?

The output is the word "SKYFALL" but it looks like "SKYF ALL"

Any help is appreciated.

Code: Select all

[CentreText]
Meter=String
MeasureName=MeasureUserName
X=955
Y=1025
StringAlign=Center
Text=%1
InlineSetting=Case | Upper
InlineSetting2=CharacterSpacing | .5 | .5
FontColor=#UserName#
FontFace=EmporiumCapitals
FontSize=30
This is super pedantic :D so if nothing can do it, no biggy.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: InlinePattern Query

Post by jsmorley »

The issue is with that Emporium Capitals font, which has that big lower-left "flourish" on the A character. So the spacing is correct, but it's accommodating that flourish.

If you know which characters give you trouble, you can deal with their character spacing individually .

Code: Select all

[CentreText]
Meter=String
FontSize=30
FontColor=109,255,135,255
FontFace=EmporiumCapitals
InlineSetting=Case | Upper
InlineSetting2=CharacterSpacing | 0.5 | 0.5
InlineSetting3=CharacterSpacing | -3.5 | 2.0
InlinePattern3=(?i)A
Text=skyfall
1.jpg
Do note that InlinePattern3 will work on the original string values before the "Case" setting is applied, so in my example you want to test for "a" and not "A".

I use a case-insensitive directive (?i) on he regular expression just to be sure. We can't know what particular case any character might be in when returned by some measure.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: InlinePattern Query

Post by jsmorley »

Code: Select all

[CentreText]
Meter=String
FontSize=30
ClipStringW=500
ClipString=2
FontColor=109,255,135,255
FontFace=EmporiumCapitals
InlineSetting=Case | Upper
Text=ABCDEFGH IJKLMNOPQ RSTUVWXYZ
2.jpg
Looks to me like A K and R might need a tweak, but A is the big offender...

These decorative fonts can be tricky to get right. For instance, you might not want the leading character spacing on the "A" if it is the first character, but do want it if it follows any (or some) other characters. Regular expression can solve this if needed, by specifying different settings for ^a and \sa and \wa. Might take some trial and error to get things exactly right.
You do not have the required permissions to view the files attached to this post.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: InlinePattern Query

Post by Mor3bane »

jsmorley wrote: Looks to me like A K and R might need a tweak, but A is the big offender...

These decorative fonts can be tricky to get right. For instance, you might not want the leading character spacing on the "A" if it is the first character, but do want it if it follows any (or some) other characters. Regular expression can solve this if needed, by specifying different settings for ^a and \sa and \wa. Might take some trial and error to get things exactly right.
Yep, I looked at RegExp first, then InlineSetting as it seemed more reasonable to figure out.

Thanks for showing me that. It wasn't clear to me to have an additional InlineSetting so the InlinePattern could take effect.

Cheers :) My OCD is happy now :thumbup:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.