-
Here's a fun one :) The text is accept comes from end-users. Occasionally, they like to slap an emoji along with some text. The text itself might be Font A - but when SixLabors attempts to render it - the emoji is missing because its trying to render everything with Font A. Is there a way to update it so it can use two fonts within a single TextOptions? Or what is the best way to handle this? |
Beta Was this translation helpful? Give feedback.
Answered by
tocsoft
Aug 20, 2024
Replies: 1 comment 6 replies
-
you need to specify We don't have a great sample of this but this line is doing just that (the helperRenderText ) is just creating the text options and then rendering it out.
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will want to move over to our updated
RichTextOptions
type in place of the baseTextOptions
which adds support for aPath
property to render along used while rendering the text along with providing per span overrides often brush/pen used for part of the text. (RichTextRun
)I've just opened a PR to update our samples to cover your use case. SixLabors/Samples#37 which produces an output like this
A direct link to the raw code is https://github.com/SixLabors/Samples/blob/6168903c095f16afe5816c52c34b103f2fba6e77/ImageSharp/DrawingTextAlongAPath/Program.cs