Hello,
Thank you for your message.
Regarding the Font property you mentioned, the difference arises due to the distinct frameworks between the .NET version and the .NET Framework version. Due to these framework differences, we adjust some dependencies and API usages accordingly. We apologize for any inconvenience this may have caused you and hope you can understand.
For the use of CharacterFormat in .NET 8.0, please refer to the following code. Additionally, I noticed that the version you updated to is 12.1.5. Currently, our latest version is 12.11.7. Our newer versions are all iterative builds upon previous ones, incorporating more bug fixes than the older versions. I have attached the changelog for each of our versions for your reference. Once again, we apologize and appreciate your understanding.
If you have any further questions or need assistance with migrating to the newer version, please do not hesitate to reach out. We are here to support you through this transition.
Our change logs:
https://www.e-iceblue.com/news/spire-doc.htmlnuget download:
https://www.nuget.org/packages/Spire.Doc/12.11.7- Code: Select all
Document doc = new Document();
Section sec = doc.AddSection();
CharacterFormat characterFormat = new CharacterFormat(doc);
// Set font
characterFormat.FontName = "Times New Roman";
characterFormat.FontSize = 18;
TextRange tr = sec.AddParagraph().AppendText("Hello Spire.Doc");
tr.ApplyCharacterFormat(characterFormat);
doc.SaveToFile("TestNet8_7.0.docx");
Sincerely,
Doris
E-iceblue support team