DynaPDFMBS SetFont problem

Ive been trying to make use of some sample code for turning Rich text into PDF

From an old sample project on the Monkeybread site, I have this extract:

[code] dim style as integer

if sr.Bold then
  Style = style + d.kfsBold
end if

if sr.Italic then
  Style = style + d.kfsItalic
end if

dim font as string = sr.Font
dim fh as integer = d.SetFont(font, style, Size, false, d.kcp1252)[/code]

But Im finding that if the style includes BOLD, the resulting PDF does not get bold text.
When debugging, the style integer does change when bold is present, but the Font after the d.SetFont line does not go bold.

Does anyone else use the SetFont call and has this trouble?

What is font name? Maybe you have no such font in bold?

Also you can update code to pass true for embed And kcpUnicode for the code page.

I’m not sure how to do that.

It shows as bold on screen.
Would Xojo be able to make it bold yet the PDF would not?

It could be any font: its an RTF styled text area