Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Thu Sep 22, 2022 7:27 am
- Code: Select all
ParagraphStyle style = new ParagraphStyle(document);
style.setName("titleStyle");
style.getCharacterFormat().setFontName("宋体");
style.getCharacterFormat().setFontSize(21.5f);
style.getCharacterFormat().setBold(true);
-
whgao116
-
- Posts: 14
- Joined: Mon Sep 19, 2022 2:42 am
Thu Sep 22, 2022 8:53 am
您好,
感谢您的留言。
二号字体对应22磅,您可以参考下面的代码。另外更多“字号”与磅的对应关系,您可以参考下面的截图。
- Code: Select all
ParagraphStyle style = new ParagraphStyle(document);
style.setName("titleStyle");
style.getCharacterFormat().setFontName("宋体");
style.getCharacterFormat().setFontSize(22f);
style.getCharacterFormat().setBold(true);
Sincerely
Abel
E-iceblue support team
Login to view the files attached to this post.
-
Abel.He
-
- Posts: 980
- Joined: Tue Mar 08, 2022 2:02 am
Thu Sep 22, 2022 9:30 am
感谢,可以了。
从18试到21.5 ,再试一次就成功了。
百度查的二号对应的是21
-
whgao116
-
- Posts: 14
- Joined: Mon Sep 19, 2022 2:42 am
Thu Sep 22, 2022 10:26 am
您好,
感谢您的反馈。
Sincerely
Abel
E-iceblue support team
-
Abel.He
-
- Posts: 980
- Joined: Tue Mar 08, 2022 2:02 am