Create PDF - which fonts work?

In one of my apps, I create a PDF with this code:

var d As New PDFDocument
var g As Graphics = d.Graphics

var f as FolderItem
f = SpecialFolder.ApplicationSupport.Child("document.pdf")


In drawPDFContents(g) I try to use different fonts to draw text, like this:

var strFontNameBold as string = "AppleSDGothicNeo-Bold"
var strFontNameRegular as string = "AppleSDGothicNeo-Light"

g.font = new font(strFontNameBold, 16)
g.DrawText("This is the title", 24, 60)

g.font = new font(strFontNameRegular, 12)
g.DrawText("This is the body", 24, 80)

The problem is that the first line of text with the bold font shows in the PDF, the second line doesn’t.
If I use the Bold font on both, both lines will appear. If I use the Light font on both, nothing will show.

I really don’t understand what’s happening. It’s the same with other fonts (for example Arial), where one font weight shows and the other does not. For Helvetica Neue for example all font weights show.

Does anybody have the same problems? Is there something I need to consider when creating the PDF?

Have you tried having only one font name (AppleSDGothicNeo) and using the Boolean property of the “Bold” g object?

Hi @Christoph_Emrich

By now… on iOS only the PDF Standard 14 fonts are supported. Very probably we will be able to support other installed fonts in the future.

Meanwhile, it is possible to use other fonts that are previously added to the iOS project. Some resources you may be interested on about this: