I had the same problem, is there anyway to load custom font file(*.ttf)?
Product Version: GroupDocs.Watermark for NET 23.7.1
1 Like
I am currently testing my program on Win10 and will later deploy it to Linux.
I used fonts that were not installed, is there anyway to load the *.ttf to my program?
@caoyanmin
Unfortunately, API doesn’t support loading custom fonts. However, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WATERMARKNET-1462
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
In GroupDocs.Watermark version 24.4 we added ability to configure folder path with custom folders:
// Specify the folder path where your custom fonts are located
string fontsFolder = @"c:\CustomFonts\";
// Create a Font object by specifying the font name and the fonts folder path
Font font = new Font("Custom Font name", fontsFolder, 36);
// Create the watermark object using the TextWatermark class and provide the text and font
TextWatermark watermark = new TextWatermark("Test watermark", font);
Complete sample can be found in the our GitHub repository.