I'm using WPF GdViewer and I'm wondering if it's possible to use custom font when adding new TextAnnotation. I would like to use FontAwesome or another custom font to display simple images within text.
TextAnnotation seems to only have FontName property instead of FontFamily. I wonder if I can register custom fonts for the AnnotationManager/GdViewer so that TextAnnotation can use them without forcing user to install the fonts? Perhaps using PrivateFontCollection class somehow?
Code sample of how I add the annotation: (Doesn't work because I haven't installed the font on user's computer)
Code: Select all
var anno = GdViewer.GetAnnotationManager().AddTextAnnot(3, 3, 100, 20, "\uf0ca" + " text annotation"); anno.FontName = "Font Awesome 5 Free Solid";