Hi,
I have a custom font. The font's embeddability is set to Preview/Print. I've tested the font is able to render in PDF by converting a word document using the font into a PDF.
I've tried various ways to embed this font but have failed to get it working:
Private Function CreatePdfFont(ByVal FontSize As Integer, ByVal FontStyle As Drawing.FontStyle) As PdfFont
Const fontFilePath As String = "c:\\Windows\\Fonts\\Duke-Fill.ttf"
C:\Windows\Fonts Dim fnt = New Font(fontFilePath, FontSize, FontStyle)
Dim objTrueTypeFont = New PdfTrueTypeFont(fnt, False)
Dim objTTFont As PdfFont = objTrueTypeFont
Return objTTFont
End Function
and
Private Function CreatePdfFont(ByVal FontSize As Integer, ByVal FontStyle As Drawing.FontStyle) As PdfFont
Dim FontName = "Duke Fill"
Dim objFont As New Font(FontName, FontSize, FontStyle)
Dim objTrueTypeFont = New PdfTrueTypeFont(objFont, False)
Dim objTTFont As PdfFont = objTrueTypeFont
Return objTTFont
End Function
I've tried various ways. I've played around with the fontName and the path but nothing seems to work.
To help diagnose this I've attached screenshots of the properties for the file and the font itself.
Any help you can give will be much appreciated.
Attachment:
Untitled1_8de7dec.zip