It is currently December 12th, 2019, 8:33 pm

help making lines vertical

Get help with installing and using Rainmeter.
RGBisLyf
Posts: 13
Joined: January 8th, 2019, 10:36 am

help making lines vertical

RGBisLyf » November 28th, 2019, 12:57 am

here i am again can someone help me to align the text vertically i want it to look like this rather than this "ジャン・カルロ" sorry for being a noob for this thing








[Rainmeter]
Author=howtogeek

[QuoteStyle]
FontColor=ff69b4
FontFace=Ink Free
FontSize=40
AntiAlias=1
StringStyle=BOLD
Stringeffect=SHADOW
Meter=STRING
MeterStyle=QuoteStyle
Text= "ジャン・カルロ"
mak_kawa
Posts: 371
Joined: December 30th, 2015, 9:47 am

Re: help making lines vertical

mak_kawa » November 28th, 2019, 4:21 am

My idea is... if you are using Windows of Japanese version, rotation of string meter with "vertical writing (Tategaki)" font as @メイリオ to 90 degree probably would get result as you want (see the attachment).
Untitled-2.png
So I tried.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=128,128,128,192
SkinWidth=150
SkinHeight=150

[Variables]
ShowString=ジャン・カルロ

[MeterShowString]
Meter=String
X=5
Y=5
FontFace=メイリオ
FontSize=12
Text=#ShowString#

[MeterShowStringVertical]
Meter=String
X=40
Y=30
FontFace=@メイリオ
FontSize=12
Angle=(Rad(90))
Text=#ShowString#
Untitled-1.png
Unfortunately, my try was failed as shown above. Probably string meter of Rainmeter does not support Japanese vertical writing font with "@" prefix, but not sure. Sorry.
You do not have the required permissions to view the files attached to this post.
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: help making lines vertical

Jeff » November 28th, 2019, 8:14 am

Code: Select all

[MeasureString]
Measure=String
String=#ShowString#
Substitute=".":"\0\n"
RegExpSubstitute=1

[TheStringMeter]
Meter=String
MeasureName=MeasureString
FontFace=メイリオ
FontSize=12
thus should work as a substitue until an expert explains why @ fonts don't work
RGBisLyf
Posts: 13
Joined: January 8th, 2019, 10:36 am

Re: help making lines vertical

RGBisLyf » November 28th, 2019, 10:31 am

mak_kawa wrote:
November 28th, 2019, 4:21 am
My idea is... if you are using Windows of Japanese version, rotation of string meter with "vertical writing (Tategaki)" font as @メイリオ to 90 degree probably would get result as you want (see the attachment).
Untitled-2.png
So I tried.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=128,128,128,192
SkinWidth=150
SkinHeight=150

[Variables]
ShowString=ジャン・カルロ

[MeterShowString]
Meter=String
X=5
Y=5
FontFace=メイリオ
FontSize=12
Text=#ShowString#

[MeterShowStringVertical]
Meter=String
X=40
Y=30
FontFace=@メイリオ
FontSize=12
Angle=(Rad(90))
Text=#ShowString#
Untitled-1.png
Unfortunately, my try was failed as shown above. Probably string meter of Rainmeter does not support Japanese vertical writing font with "@" prefix, but not sure. Sorry.
thank you for helping also i dont understand what you're trying to say also im completely a noob as in literally i don't know anything in this but thank you XD
RGBisLyf
Posts: 13
Joined: January 8th, 2019, 10:36 am

Re: help making lines vertical

RGBisLyf » November 28th, 2019, 10:33 am

Jeff wrote:
November 28th, 2019, 8:14 am

Code: Select all

[MeasureString]
Measure=String
String=#ShowString#
Substitute=".":"\0\n"
RegExpSubstitute=1

[TheStringMeter]
Meter=String
MeasureName=MeasureString
FontFace=メイリオ
FontSize=12
thus should work as a substitue until an expert explains why @ fonts don't work
Thanks and also . i don't understand what youare triny to say im so noob in this thing i mean like youre trying to explain me how to create an atomic bomb literally i dont understand a thing here but thanks a lot XD
mak_kawa
Posts: 371
Joined: December 30th, 2015, 9:47 am

Re: help making lines vertical

mak_kawa » November 28th, 2019, 1:06 pm

Hi RGBisLyf

Ah...What I did try is very simple. But this try has no meaning at all if you don't use Japanese-version Windows...

In Japanese version of Windows, characters in horizontal string with "vertical writing" font rotate 90 degree anti-clockwise as my first attached image (screenshot of Japanese version of Wordpad). So, when I rotate that string 90 degree clockwise using Angle=(Rad(90)) option of string meter, I ought to have gotten vertical string with 0 degree rotation characters as you want.

But Rainmeter string meter doesn't seem to support the "vertical writing" font of Japanese version Windows, and displays string as if it is with normal font (second attached image). Consequently, my try was ended with fail.

PS. I, too, am not sure about what Jeff said, probably because I am novice about RegExp.
mak_kawa
Posts: 371
Joined: December 30th, 2015, 9:47 am

Re: help making lines vertical

mak_kawa » November 28th, 2019, 1:38 pm

Now I feel I do understand what Jeff said. It means that when replace each character one by one followed by new line character, the string is displayed as if it is vertical string...

But at least for me, the RegExp substitution should be Substitute="(.)":"\0#CRLF#" to work, instead of Substitute=".":"\0\n". Is this right?
User avatar
jsmorley
Developer
Posts: 19864
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: help making lines vertical

jsmorley » November 28th, 2019, 1:45 pm

mak_kawa wrote:
November 28th, 2019, 1:38 pm
Now I feel I do understand what Jeff said. It means that when replace each character one by one followed by new line character, the string is displayed as if it is vertical string...

But at least for me, the RegExp substitution should be Substitute="(.)":"\0#CRLF#" to work, instead of Substitute=".":"\0\n". Is this right?
Correct. Rainmeter does not understand how to display the unix \n linefeed character. It can be used as "input" to the regular expression when needed, but can't be used in the "output".

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureString]
Measure=String
String=HELLO
RegExpSubstitute=1
Substitute="(.)":"\0#CRLF#"

[MeterString]
Meter=String
MeasureName=MeasureString
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1

1.png

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureAddLinefeeds]
Measure=String
String=HELLO
RegExpSubstitute=1
Substitute="(.)":"\0#CRLF#"

[MeasureRemoveLinefeeds]
Measure=String
String=[MeasureAddLinefeeds]
DynamicVariables=1
RegExpSubstitute=1
Substitute="\n":""

[MeterString]
Meter=String
MeasureName=MeasureAddLinefeeds
MeasureName2=MeasureRemoveLinefeeds
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1#CRLF#%2

2.png

Using #CRLF# instead of \n in the "input" part of the regular expression will also work...

Code: Select all

[MeasureRemoveLinefeeds]
Measure=String
String=[MeasureAddLinefeeds]
DynamicVariables=1
RegExpSubstitute=1
Substitute="#CRLF#":""
The point is that Rainmeter can and will always turn #CRLF# into \n, but can't and won't ever turn \n into #CRLF#. #CRLF# is more of a "function" than a straight-up variable. A function that when evaluated will add a Windows Carriage Return / Linefeed sequence to whatever string it is found in. #CRLF# is more like the built-in variables like #CURRENTCONFIGX# that actually "do some work", and are not just replacements.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 9258
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help making lines vertical

balala » November 28th, 2019, 6:37 pm

EDIT: Sorry mak_kawa, I missed your previous post. You beat me.
Jeff wrote:
November 28th, 2019, 8:14 am

Code: Select all

[MeasureString]
Measure=String
String=#ShowString#
Substitute=".":"\0\n"
RegExpSubstitute=1

[TheStringMeter]
Meter=String
MeasureName=MeasureString
FontFace=メイリオ
FontSize=12
thus should work as a substitue until an expert explains why @ fonts don't work
Unfortunately nothing is working as should on this code, because the substitution isn't properly made. See jsmorley's code and check the Substitute option there. That is a proper substitution: Substitute="(.)":"\0#CRLF#". Note that the new line character in Rainmeter is #CRLF#, not \n. Also the dot in the first part of the substitution has to be included into parenthesis to capture it.
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: help making lines vertical

Jeff » November 28th, 2019, 6:38 pm

jsmorley wrote:
November 28th, 2019, 1:45 pm
Correct. Rainmeter does not understand how to display the unix \n linefeed character. It can be used as "input" to the regular expression when needed, but can't be used in the "output".
Whoops