I am trying to load a TTF font from a PrivateFontCollection. The font is not installed on the system but loaded from a file using the AddFontFile method.
The font is not being used by SyntaxEditor (latest version) unless it is installed as a system font. I can't find any way to get it to work. I have no problem using the Font instance in a label.
var filename = Path.GetTempFileName(); File.WriteAllBytes(filename, Resources.LibreBarcode128Text_Regular); var pfc = new PrivateFontCollection(); pfc.AddFontFile(filename); var fontFamily = pfc.Families; var font = new Font(fontFamily, 32, FontStyle.Regular); label1.Font = font; syntaxEditor1.Font = font;
[Modified 10 months ago]