It is currently April 20th, 2024, 3:25 am

Empty "blank" characters not showing when using UseD2D=1

Report bugs with the Rainmeter application and suggest features.
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Empty "blank" characters not showing when using UseD2D=1

Post by Virginityrocks »

I use a blank character (that isn't a space) to add empty space to the end of strings, which is helpful in my skin to show a buffer area on highlighted items. You can see what I'm talking about in this screenshot:

http://img837.imageshack.us/img837/6651/nn6b.png

The blank character I'm speaking of is encapsulated in these brackets [ ]

The characters do not render at all when UseD2D=1. I know it's in development right now, but I just wanted to let you know ahead of the update, as it may negatively affect the functionality of my skin.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by moshi »

i am pretty sure it is a space character you are using.
typography knows more than one: http://en.wikipedia.org/wiki/Space_(punctuation)

if it works with GDI+, well that's a bug in GDI+ then.
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by Virginityrocks »

It's a legitimate character that is simply invisible. It's used for formatting in documents. And in my case it's used as formatting as well. It's used in situations where extra spaces before or after a line would be automatically deleted by the system.

It's an important part of my skin, and it's not a bug. Hell. The concept even has its own wikipedia page. https://en.wikipedia.org/wiki/Non-breaking_space and it is even mentioned in the article you posted. It's called a Non-Breaking Space and is intended to render the same as a normal space but prevents line-wrapping at that position.

Both of the below lines were posted with an empty space before the word. The first began with 10 spaces. The second began with 10 invisible characters. Even your browser doesn't think this is an error. The character can be made with Alt+255.

spaces 1 2 3 4 5
          invisible characters     1     2     3     4     5

Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by moshi »

believe it or not, it is a space character. and trailing whitespace is removed.
ALT+255 is a trick that no longer works.
if you want somebody to change that, you should contact Microsoft.

what works (but probably depending on the font) are Hangul filling characters.
http://www.utf8icons.com/character/4447/hangul-choseong-filler
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Empty "blank" characters not showing when using UseD2D=1

Post by jsmorley »

User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by moshi »

now with Retina displays we are getting closer to print and all these different space characters begin to matter even on an lcd display. Microsoft probably just didn't care when they developed GDI+
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by Virginityrocks »

I've got to say it again, it's an important feature to have blank characters for formatting strings. At the very least I think that string meters should be able to properly use """ """ magic quotes that do not ignore redundant spaces or the like.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Empty "blank" characters not showing when using UseD2D=1

Post by jsmorley »

I would tend to agree with VirginityRocks on this one. I think that having Text="Some spaces are at the end " not ignore the trailing spaces makes a lot of sense when you look at it in the context of using SolidColor on the meter to have a background you control without having to force some W= setting, probably for some wrapping control as well.

In addition, it is inconsistent, as while

Text="Some spaces at the end "

Does not "see" the trailing spaces,

Text=" Some spaces at the beginning"

Does "see" the leading spaces.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Empty "blank" characters not showing when using UseD2D=1

Post by moshi »

i'd rather like SolidColorPadding=4,5,10,5
way more flexible and would work for other meters than strings as well.

i also have some, probably unreasonable, fear that trailing whitespace (that includes tabs and line breaks) may cause all kind of trouble with hardcoded variables and!WriteKeyValue.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Empty "blank" characters not showing when using UseD2D=1

Post by jsmorley »

moshi wrote:i'd rather like SolidColorPadding=4,5,10,5
way more flexible and would work for other meters than strings as well.

i also have some, probably unreasonable, fear that trailing whitespace (that includes tabs and line breaks) may cause all kind of trouble with hardcoded variables and!WriteKeyValue.
Actually, just to add to the inconsistency, tabs actually already do work when they are trailing and enclosed in quotes. Both leading and trailing.

Only things that are seen by D2D as individual space characters don't work when trailing.

Linefeeds don't of course, as there is really no way to get one into the line (other than our #CRLF# variable) without it being seen as well, a linefeed, which breaks the .ini format.