feature: SlugTextSharp integration for future SlugText operator#1041
Draft
ExtraBinoss wants to merge 1 commit intotixl3d:mainfrom
Draft
feature: SlugTextSharp integration for future SlugText operator#1041ExtraBinoss wants to merge 1 commit intotixl3d:mainfrom
ExtraBinoss wants to merge 1 commit intotixl3d:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for the Slug font rendering algorithm by integrating the SlugSharp library, adding reference HLSL shaders, and providing utility methods for charset parsing and validation. The main changes are grouped into three areas: shader integration, library dependencies, and charset utility helpers.
Context
Since Slug font rendering has been open-source by Eric Lengyel (https://terathon.com/blog/decade-slug.html), I took the time to create a generator for slug files that can be rendered using the provided shaders from Eric.
This library (SlugTextSharp is made by @ExtraBinoss) It is a small library totally 30 KB of data, and has only one dependency : FreeTypeSharp. It is compiled in Dotnet 9.0 and licenced as MIT.
It adds supports for :
It lacks :
These aren't dealbreakers concerning how TiXL needs Text rendering.
Compared to MSDF, Slug provides both advantages and disadvantages.
If you need to test out if the

.slugthat was generated works, you can go onto my port of the same algorithm to Typescript.Website to view the generated slug file
Click
import sluggishand select or drop the slug file into it. You can then render any text.Actions needed
I need someone to help me integrate the Slug rendering algorithm, as I am not familiar on how SharpDX, or how "nested nodes" work. For example, the Text node is an operator coded directly into TiXL.
The rendering shaders are inside this folder :

Thanks !
DETAILS of this PR draft
Slug font rendering integration:
SlugVertexShader.hlsl,SlugPixelShader.hlsl) to the project, providing the core Slug algorithm for GPU-based font rendering. [1] [2]Library dependencies:
SlugText-SharpNuGet package (version 0.1.2) inLib.csprojto enable Slug font rendering and charset parsing capabilities.Charset utility helpers:
SlugCharsetUtilsinUtils/Slug/Charset/SlugCharsetUtils.cs, offering helper methods for loading, parsing, and validating character sets using SlugSharp, including detailed error reporting and validation summaries.