Files
Terminal.Gui/UICatalog/Scenarios/CombiningMarks.cs
BDisp aa8b952509 Partially Addresses #2616. Support combining sequences that don't normalize (#2932)
* Fixes #2616. Support combining sequences that don't normalize

* Decouples Application from ConsoleDriver in TestHelpers

* Updates driver tests to match new arch

* Start on making all driver tests test all drivers

* Improves handling if combining marks.

* Fix unit tests fails.

* Fix unit tests fails.

* Handling combining mask.

* Tying to fix this unit test that sometimes fail.

* Add support for combining mask on NetDriver.

* Enable CombiningMarks as List<Rune>.

* Prevents combining marks on invalid runes default and space.

* Formatting for CI tests.

* Fix non-normalized combining mark to add 1 to Col.

* Reformatting for retest the CI.

* Forces non-normalized CMs to be ignored.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-10-29 12:51:23 -06:00

35 lines
1.3 KiB
C#

using Terminal.Gui;
namespace UICatalog.Scenarios {
[ScenarioMetadata (Name: "Combining Marks", Description: "Illustrates how Unicode Combining Marks work (or don't).")]
[ScenarioCategory ("Text and Formatting")]
public class CombiningMarks : Scenario {
public override void Init ()
{
Application.Init ();
ConfigurationManager.Themes.Theme = Theme;
ConfigurationManager.Apply ();
Application.Top.ColorScheme = Colors.ColorSchemes [TopLevelColorScheme];
}
public override void Setup ()
{
Application.Top.DrawContentComplete += (s, e) => {
Application.Driver.Move (0, 0);
Application.Driver.AddStr ("Terminal.Gui only supports combining marks that normalize. See Issue #2616.");
Application.Driver.Move (0, 2);
Application.Driver.AddStr ("\u0301\u0301\u0328<- \"\\u301\\u301\\u328]\" using AddStr.");
Application.Driver.Move (0, 3);
Application.Driver.AddStr ("[a\u0301\u0301\u0328]<- \"[a\\u301\\u301\\u328]\" using AddStr.");
Application.Driver.Move (0, 4);
Application.Driver.AddRune ('[');
Application.Driver.AddRune ('a');
Application.Driver.AddRune ('\u0301');
Application.Driver.AddRune ('\u0301');
Application.Driver.AddRune ('\u0328');
Application.Driver.AddRune (']');
Application.Driver.AddStr ("<- \"[a\\u301\\u301\\u328]\" using AddRune for each.");
};
}
}
}