在 Java 文档注释中定义 Courier 字体
Defining Courier font in Java Documentation comments
在我的 Enunciate API 文档报告中,我需要将一些评论文本的字体更改为 "Courier New" 字体类型。
有可能吗?
从 1.2 开始,Javadoc 支持 HTML 样式表。您可以对 stylesheet.css(位于 Javadoc HTML 文件的根目录)进行这些更改。
要为左侧框架选择较小的无衬线字体,请更改:
#FrameItemFont { font-size: normal; font-family: normal }
收件人:
#FrameItemFont { font-size: 10pt; font-family: helvetica arial sans-serif }
你可以自己定制你想要的任何字体。
找到了这个功能的方法 -
在注释中使用字体 html 标签,Java 文档代码将其读取为 html 标签并以 courier 字体显示。
/* Sample URL - <font face="courier">https://{Hostname}/programs/FireIn</font>, Replace the host name with the respective environment name</br>
*/
在我的 Enunciate API 文档报告中,我需要将一些评论文本的字体更改为 "Courier New" 字体类型。
有可能吗?
从 1.2 开始,Javadoc 支持 HTML 样式表。您可以对 stylesheet.css(位于 Javadoc HTML 文件的根目录)进行这些更改。
要为左侧框架选择较小的无衬线字体,请更改:
#FrameItemFont { font-size: normal; font-family: normal }
收件人:
#FrameItemFont { font-size: 10pt; font-family: helvetica arial sans-serif }
你可以自己定制你想要的任何字体。
找到了这个功能的方法 - 在注释中使用字体 html 标签,Java 文档代码将其读取为 html 标签并以 courier 字体显示。
/* Sample URL - <font face="courier">https://{Hostname}/programs/FireIn</font>, Replace the host name with the respective environment name</br>
*/