public interface FontInfo
If an implementation doesn't provide a property, the getter will return null
- if the value is unset, a default value will be returned.
Setting a unsupported property results in an UnsupportedOperationException
.
Modifier and Type | Method and Description |
---|---|
default FontCharset |
getCharset() |
default java.util.List<? extends FontFacet> |
getFacets()
If font facets are embedded in the document, return the list of embedded facets.
(如果字体分面嵌入在文档中,则返回嵌入分面的列表。)
|
default FontFamily |
getFamily() |
default java.lang.Integer |
getIndex()
Get the index within the collection of Font objects
(获取 Font 对象集合中的索引)
|
default byte[] |
getPanose() |
default FontPitch |
getPitch() |
java.lang.String |
getTypeface() |
default void |
setCharset(FontCharset charset)
Sets the charset
(设置字符集)
|
default void |
setFamily(FontFamily family)
Sets the font family class
(设置字体系列类)
|
default void |
setIndex(int index)
Sets the index within the collection of Font objects
(设置 Font 对象集合中的索引)
|
default void |
setPanose(byte[] panose)
Set the panose in binary form
(以二进制形式设置 panose)
|
default void |
setPitch(FontPitch pitch)
Set the font pitch
(设置字体间距)
|
default void |
setTypeface(java.lang.String typeface)
Sets the font name
(设置字体名称)
|
default java.lang.Integer getIndex()
default void setIndex(int index)
index
- the index within the collection of Font objects
(index - Font 对象集合中的索引)
java.lang.UnsupportedOperationException
- if unsupported
(java.lang.UnsupportedOperationException - 如果不支持)
java.lang.String getTypeface()
default void setTypeface(java.lang.String typeface)
typeface
- the full name of the font, when
null
removes the font definition - removal is implementation specific
(typeface - 字体的全名,当 null 删除字体定义时 - 删除是特定于实现的)
default FontCharset getCharset()
default void setCharset(FontCharset charset)
charset
- the charset
(charset - 字符集)
default FontFamily getFamily()
default void setFamily(FontFamily family)
family
- the font family class
(字体系列类)
default FontPitch getPitch()
null
if unsupported
(字体间距,如果不支持,则为 null)
default void setPitch(FontPitch pitch)
pitch
- the font pitch
(pitch - 字体间距)
java.lang.UnsupportedOperationException
- if unsupported
(java.lang.UnsupportedOperationException - 如果不支持)
default byte[] getPanose()
null
if unknown
(panose 二进制形式的信息,如果未知,则为 null)
default void setPanose(byte[] panose)
panose
- the panose bytes
(panose - panose 字节)
@Beta default java.util.List<? extends FontFacet> getFacets()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.