Skip to content

How to draw the rich text, and how to get the position of the typing mark? #345

Answered by JimBobSquarePants
Cn-mjt44 asked this question in Q&A

You must be logged in to vote

Why do you expect the library to parse some random syntax you've introduced? <color=\"red\"> is absolutely meaningless.

To draw rich text you need to provide the options with a set of text runs describing what you want.

TextRuns

https://docs.sixlabors.com/api/ImageSharp.Drawing/SixLabors.ImageSharp.Drawing.Processing.RichTextOptions.html#SixLabors_ImageSharp_Drawing_Processing_RichTextOptions_TextRuns

RichTextRun

https://docs.sixlabors.com/api/ImageSharp.Drawing/SixLabors.ImageSharp.Drawing.Processing.RichTextRun.html

Replies: 1 comment 2 replies

You must be logged in to vote
2 replies
@Cn-mjt44

@JimBobSquarePants

Answer selected by Cn-mjt44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants