Skip to content

feat(TextBlock): TextTrimming#22572

Merged
ramezgerges merged 10 commits intounoplatform:masterfrom
ramezgerges:text_trimming
Feb 13, 2026
Merged

feat(TextBlock): TextTrimming#22572
ramezgerges merged 10 commits intounoplatform:masterfrom
ramezgerges:text_trimming

Conversation

@ramezgerges
Copy link
Contributor

@ramezgerges ramezgerges commented Feb 4, 2026

GitHub Issue: closes https://github.com/unoplatform/kahua-private/issues/406, closes #18716

The branch is on top of #22448

Copilot AI review requested due to automatic review settings February 4, 2026 18:30
@github-actions github-actions bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/automation Categorizes an issue or PR as relevant to project automation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Feb 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements TextTrimming support (CharacterEllipsis and WordEllipsis) for TextBlock controls in Skia-based platforms, along with spell checking capabilities and text highlighting features. The implementation builds on PR #22448 for text highlighters and introduces significant infrastructure for font fallback and spell checking.

Changes:

  • Added TextTrimming support with character-level and word-level ellipsis algorithms
  • Implemented spell checking service using Hunspell dictionaries with visual red underlines
  • Added TextHighlighter API for marking text ranges with custom foreground/background colors
  • Introduced font fallback service infrastructure for better Unicode character support

Reviewed changes

Copilot reviewed 133 out of 138 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
UnicodeText.skia.cs Core text layout engine with trimming, spell checking, and font fallback logic
TextBlock.skia.cs Integration of TextHighlighters collection and spell checking support
TextBox.skia.cs Spell checking UI with context menu suggestions
TextHighlighter.cs New API for text highlighting with customizable brushes
TextRange.cs Structure representing text range with start index and length
ISpellCheckingService.cs Interface for spell checking implementations
IFontFallbackService.skia.cs Interface for font fallback providers
FontFallbackService.skia.cs Noto fonts-based fallback implementation
SpellCheckingService.cs Hunspell-based spell checking implementation
FontFallbackPreprocessor Tool to generate font coverage maps from Noto fonts
Uno.WinUI.SpellChecking.csproj New add-in package for spell checking
Resource files Localized strings for spell checking UI (80+ languages)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22572/docs/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22572/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 194743 has failed on Uno.UI - CI.

@github-actions github-actions bot removed platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/automation Categorizes an issue or PR as relevant to project automation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Feb 11, 2026
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22572/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 195889 has failed on Uno.UI - CI.

Copilot AI review requested due to automatic review settings February 12, 2026 15:05
@ramezgerges ramezgerges marked this pull request as ready for review February 12, 2026 15:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/Uno.UI/UI/Xaml/Documents/UnicodeText.skia.cs:786

  • Typo: lineBreakingOpporunities / lineBreakingOpporunity should be lineBreakingOpportunities / lineBreakingOpportunity for readability and consistency.
	private static List<List<BidiRun>> ApplyLineBreaking(float lineWidth, List<BidiRun> logicallyOrderedRuns,
		List<(int endRunIndex, int endIndexInLastRun)> lineBreakingOpporunities, bool rtl,
		TextWrapping textWrapping)
	{
		var lines = new List<List<BidiRun>>();

		(int firstRunIndex, int startingIndexInFirstRun) = (0, 0);
		(int endRunIndex, int endIndexInLastRun)? prevInSameLine = null;

		for (var lineBreakingOpportunityIndex = 0; lineBreakingOpportunityIndex < lineBreakingOpporunities.Count; lineBreakingOpportunityIndex++)
		{
			var lineBreakingOpporunity = lineBreakingOpporunities[lineBreakingOpportunityIndex];


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22572/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22572/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22572/wasm-skia-net9/index.html

@ramezgerges ramezgerges merged commit 416a155 into unoplatform:master Feb 13, 2026
47 checks passed
@ramezgerges ramezgerges deleted the text_trimming branch February 13, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skia ✏️ Categorizes an issue or PR as relevant to Skia

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Skia][Desktop] TextBlock ignores TextTrimming property (CharacterEllipsis and WordEllipsis not working)

4 participants