PDFsharp 无法识别的字符显示为“?”

PDFsharp Unrecognized Characters Display as "?"

我正在尝试将组合框的内容转换为 PDFsharp 中的文本以便打印。不幸的是,所有的“✓”都变成了“?”。我试过使用 Unicode,但没有任何变化。

这是我正在使用的;

For Each cbx In Crt.Controls.OfType(Of ComboBox)
        If cbx.Visible = True Then
            Using Gra As XGraphics = XGraphics.FromPdfPage(Pg(Doc.PageCount - 1))
                Dim tf As Layout.XTextFormatter = New Layout.XTextFormatter(Gra)
                Dim x = cbx.Location.X * WScale
                Dim y = cbx.Location.Y * HScale
                Dim w = cbx.Width * WScale
                Dim h = cbx.Height * HScale
                Dim Brush As XBrush = New XSolidBrush(XColor.FromArgb(cbx.BackColor.ToArgb))
                Dim xrect As New XRect(x, y, w, h)
                Gra.DrawRectangle(Brush, xrect)
                Dim options As XPdfFontOptions = New XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always)
                Dim xFt As New XFont("Times New Roman", 7, XFontStyle.Regular, options)
                tf.Alignment = Drawing.Layout.XParagraphAlignment.Justify
                tf.DrawString(cbx.Text, xFt, XBrushes.Black, xrect, XStringFormats.TopLeft)
            End Using
        End If
    Next

您 select 的 "Times New Roman" 字体中可能不包含字符“✓”,因此不会显示。

仅使用 "Times New Roman" 中包含的字符,或者如果需要“✓”,请使用适当的字体。