RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text
Andy Goryachev
angorya at openjdk.org
Thu Jan 25 23:47:54 UTC 2024
On Thu, 25 Jan 2024 23:23:42 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Regarding other whitespace characters.
>> Using \u2003 em space, pasting the following text
>>
>> AAA BBB CCC
>>
>>
>> the results as seen with MS Word 16.78 (23100802) on macOS 14.2.1 indicate that it treats em space as whitespace:
>>
>> 
>> 
>
>> Regarding other whitespace characters. Using \u2003 em space, pasting the following text
>
> I think we can use `Character.isWhitespace`. For the most part it aligns with "is this a breaking space". It's not perfect, but we can do more when there are complaints. Here's my test:
>
>
> char isWhiteSpace (breaking space)?
> \u0009 true
> \u0020 true
> \u00a0 false
> \u1680 true
> \u180e false <- unexpected
> \u2001 true
> \u2002 true
> \u2003 true
> \u2004 true
> \u2005 true
> \u2006 true
> \u2007 false
> \u2008 true
> \u2009 true
> \u200a true
> \u200b false <- unexpected
> \u200c false <- unexpected
> \u200d false <- unexpected
> \u202f false
> \u205f true
> \u3000 true
thank you @hjohn ! this PR has been out for a while, could you sync it up with the master please?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1236#issuecomment-1911176710
More information about the openjfx-dev
mailing list