View Issue Details

IDProjectCategoryView StatusLast Update
0002091NoesisGUIC++ SDKpublic2022-12-13 11:48
Reportersatorp Assigned Tojsantos  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Product Version3.0 
Target Version3.2.0Fixed in Version3.2.0 
Summary0002091: i18n for text wrapping and trimming
Description

Current text wrapping and trimming algorithm does not work well with Japanese or other East Asian languages.

  • Line breaks currently occur only on spaces/hypens (word boundaries in English). In Japanese for example, there's no concept of word boundary (basically break can occur anywhere), but there are special rules to prohibit break before or after some punctuation/special characters
  • Line trimming with word ellipsis does not work with Japanese text (all text will be removed)
  • WPF does not seem to have these issues

Our current priority is to support Japanese language. We have a working patch but it involves modifying VGLTextLayout implementation, which is not very pretty. Let me know if you want to have it for reference.

If out-of-the-box support is hard to achieve, another workable option might be to have the line break rule isolated possibly as a callback so it can be implemented by application. For Japanese, it will be possible to determine a break condition by examining the current and previous characters on a line if provided as context to the callback.

PlatformAny

Activities

jsantos

jsantos

2021-08-25 20:33

manager   ~0007384

We started the implementation of supporting RTL languages, as part of these changes we are also going to have a new shaping algorithm that should fix all issues we have right now.

I will also revisit the current line breaking algorithm.

Yes, please, having your modifications will help and also if possible a XAML showcasing the issue.

satorp

satorp

2021-09-08 06:37

reporter   ~0007419

I've added a private note, but maybe you can't see it? I'm not sure how this bug tracker system works.

How should I provide the patch to you? I see that I could upload files here, but I'm not sure if it's ok to post the codes publicly. The private mode does not seem to support uploading files as well.

jsantos

jsantos

2021-09-08 13:43

manager   ~0007420

Hi Sator, yes of course I remember about you. :)

Sorry for the delay, please, send the patch to [email protected]

Thank you very much!

jsantos

jsantos

2022-08-12 18:00

manager   ~0008041

Last edited: 2022-08-12 18:00

We have implemented the Unicode Line Breaking Algorithm (http://www.unicode.org/reports/tr14/) in the Arabic Branch (NoesisSDK/branches/Arabic/). This branch is going to be the official 3.2, planned to be released next month.

When building this branch, make sure to enable shaping in BuildSettings.h because it is disabled for now by default (official release will have it enabled)


#define NS_TEXT_SHAPING 1

I am going to close this ticket, if you find specific problems, please create new tickets with corresponding scenarios and Xamls.

Thank you!

Issue History

Date Modified Username Field Change
2021-08-24 18:05 satorp New Issue
2021-08-24 18:08 sfernandez Assigned To => jsantos
2021-08-24 18:08 sfernandez Status new => assigned
2021-08-24 18:08 sfernandez Target Version => 3.1.1
2021-08-25 20:33 jsantos Note Added: 0007384
2021-09-08 06:37 satorp Note Added: 0007419
2021-09-08 13:43 jsantos Note Added: 0007420
2021-09-15 20:56 jsantos Target Version 3.1.1 => 3.1.2
2021-11-29 14:21 jsantos Target Version 3.1.2 => 3.2.0
2022-08-12 18:00 jsantos Note Added: 0008041
2022-08-12 18:00 jsantos Status assigned => resolved
2022-08-12 18:00 jsantos Resolution open => fixed
2022-08-12 18:00 jsantos Fixed in Version => 3.2.0
2022-08-12 18:00 jsantos Note Edited: 0008041
2022-08-12 18:00 jsantos Note Edited: 0008041
2022-12-13 11:48 jsantos Severity major => feature