Can you read Rich Text Format in godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gerson0410

So i’ve been searching on how to read text file in godot and when i try to use the code it printed out a strange text and then i realize that the file is rtf, so i’m searching on how rtf encoding works but i still don’t know how to read the file(Rich Text Format) in godot.

I’m sorry because of my bad english.

BTW this is my code to open Rich Text Format file:

var f = File.new()
if f.file_exists("res://content.rtf"):
	f.open("res://content.rtf", File.READ)
	$content.bbcode_text = f.get_as_text()
	f.close()
:bust_in_silhouette: Reply From: exuin

Godot doesn’t have a way to read RTF files by default. You’ll have to write your own parser or just don’t save your files as RTF.