RTF differences

I’m experimenting with RTF in one of my apps, that takes an image and turns into ascii text.
In Xojo it looks good. However if I save the results to rtf file or just copy and past into Textedit the color and what not is a bit off from what it looks like in my XOJO app.

Is this a XOJO issue or TextEdit issue or something else?

Thanks
Xojo App:

in TextEdit:

Apps trying to automatically determine color are making changes.

That’s just coloring letters as pixels. Ascii art uses negative space and character shape to create an image. Not color.

Funny. Color being inconsistently available is why we have ascii art to begin with.

I’m not an RTF expert but I would think the colors should be the same in Xojo’s text area and TextEdit, I am using StyledText.RTFData.

The HTML version matches whats displayed in XOJO and a web browser as for plain text… well its just plain text. :laughing:

Colorizing “ascii art” isn’t new, there are other apps out there that do it.
Anyway I’m just experimenting with RTF. :smiling_face_with_sunglasses: :grin:

This makes it sound even more like TextEdit is trying to compensate for dark mode. What happens if you switch to light mode before you open the document in TextEdit?

Cool idea for an app!

If you share the RTF I could take a look at it on Windows and see what it looks like.

The usual trick to circumvent macOS being clever is to use off-white or off-black as color.

After some testing it does appear to be an issue TextEdit and darkmode.
I might be missing something from rtf as well.. perhaps highlight command.

Not a big deal being this is experimental .

thanks

The Xojo RTF classes do not have highlight capabilities, if that’s what you were seeking. As custom Xojo-code implementations in the framework, RTF support is rather limited.

In theory though, AI could be able to help you extend RTF capabilities since it really is just long-standing, well documented text/string manipulation.

Ah, I see. Too bad about limited support of rtf in xojo.
I think I read somewhere the some rtf viewers/editors might not support all rtf features as well.

Oh well, no big deal. Was fun experiment, though in the end, might not be worth it.

Thanks.