andrew johnson wroteThis was already discussed on the developers list, that we don't want a
lot of high level overhead and extra depends.. so gecko is probably out,
and mozilla definitely is. And gtkhtml was already discussed and
discarded by Mattias because of its GNOME depends.
In that case you have little choice but to write it yourself. I would suggest a modular approach: A parser with hooks, and a renderer which uses the parser. The parser could go in the FCL.
If it's any help: The FCL contains a RTF reader which I ported some years ago. I wrote a RTF panel that displayed the RTF to go with it (based on TLabel and TCanvas, so that should port easily). If need be I can dig up the code and send that, you can have a look at it for starters.
Come to think of it, having the RTF panel may be a good idea in itself for Lazarus.
Michael.