DynaPDF: Formatted text in table cell?

In a DynaPDF table, I can see that it’s possible to set the font, style, size etc. for a table cell as a whole. Then you can use Table.SetCellText to add text to that cell.

What I’d like to do, however, is vary the formatting within the text in a single cell. Some text in italic, some in regular. In an ordinary text block, as opposed to in a table cell, it would be no problem to do this with WriteFText. But Table.SetCellText seems to accept plain text only.

Is there something I’ve missed?

I don’t think you missed something.

But I can ask Jens. Maybe a good idea for a feature request.

Thanks Christian - I’d appreciate it.

Did you try it?
Jens said it is already there and should work fine.

[code] dim t as string

t = “\FT[ArialMT]Just a test with \FT[Arial-ItalicMT]italic\FT[ArialMT] in-between”

call tbl.SetCellText rowNum, 0, pdf.ktaLeft, tbl.kcoTop, t[/code]

seems to work fine.

It’s working for me too now - I had tried it but inadvertently used a forward slash instead of a backslash for the \FT tags, which is why it didn’t work!

For the benefit of others reading this thread - the font name in the square brackets in Christian’s example above is the PostScript name for the font. On Windows it’s not too easy to determine using tools provided with the OS, but the Xojo example file shipped with DynaPDF called Table Showing All Fonts" will list all installed fonts together with their corresponding PostScript name. I had initially wondered if only PostScript fonts would have a PostScript name, but that’s not the case - TrueType and OpenType fonts have them too.

Thanks Christian for super-quick response.