public class HwmfFont extends java.lang.Object implements FontInfo, GenericRecord
Modifier and Type | Class and Description |
---|---|
static class |
HwmfFont.WmfClipPrecision
ClipPrecision Flags specify clipping precision, which defines how to clip characters that are partially outside a clipping region.
(ClipPrecision 标志指定剪辑精度,它定义了如何剪辑部分位于剪辑区域之外的字符。)
|
static class |
HwmfFont.WmfFontQuality
The output quality defines how carefully to attempt to match the logical font attributes to those of an actual physical font.
(输出质量定义了尝试将逻辑字体属性与实际物理字体匹配的仔细程度。)
|
static class |
HwmfFont.WmfOutPrecision
The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, pitch, and font type.
(输出精度定义输出必须与请求字体的高度、宽度、字符方向、转义、间距和字体类型匹配的程度。)
|
Modifier and Type | Field and Description |
---|---|
protected FontCharset |
charSet
An 8-bit unsigned integer that defines the character set.
(定义字符集的 8 位无符号整数。)
|
protected HwmfFont.WmfClipPrecision |
clipPrecision
An 8-bit unsigned integer that defines the clipping precision.
(定义裁剪精度的 8 位无符号整数。)
|
protected int |
escapement
A 16-bit signed integer that defines the angle, in tenths of degrees, between the escapement vector and the x-axis of the device.
(一个 16 位有符号整数,用于定义擒纵矢量和设备 x 轴之间的角度,以十分之一度为单位。)
|
protected java.lang.String |
facename
A null-terminated string of 8-bit Latin-1 [ISO/IEC-8859-1] ANSI characters that specifies the typeface name of the font.
(一个以 null 结尾的 8 位 Latin-1 [ISO/IEC-8859-1] ANSI 字符字符串,用于指定字体的字体名称。)
|
protected FontFamily |
family
Font families specify the look of fonts in a general way and are intended for specifying fonts when the exact typeface wanted is not available.
(字体系列以一般方式指定字体的外观,并用于在所需的确切字体不可用时指定字体。)
|
protected double |
height
A 16-bit signed integer that specifies the height, in logical units, of the font's character cell.
(一个 16 位有符号整数,以逻辑单位指定字体字符单元格的高度。)
|
protected boolean |
italic
A 8-bit Boolean value that specifies the italic attribute of the font.
(一个 8 位布尔值,用于指定字体的斜体属性。)
|
protected int |
orientation
A 16-bit signed integer that defines the angle, in tenths of degrees, between each character's base line and the x-axis of the device.
(一个 16 位有符号整数,用于定义每个字符的基线和设备的 x 轴之间的角度,以十分之一度为单位。)
|
protected HwmfFont.WmfOutPrecision |
outPrecision
An 8-bit unsigned integer that defines the output precision.
(定义输出精度的 8 位无符号整数。)
|
protected FontPitch |
pitch
A property of a font that describes the pitch (MSB 2 bits)
(描述音高的字体属性(MSB 2 位))
|
protected int |
pitchAndFamily
A PitchAndFamily object that defines the pitch and the family of the font.
(定义字体间距和字体系列的 PitchAndFamily 对象。)
|
protected HwmfFont.WmfFontQuality |
quality
An 8-bit unsigned integer that defines the output quality.
(定义输出质量的 8 位无符号整数。)
|
protected boolean |
strikeOut
An 8-bit Boolean value that specifies the strike out attribute of the font.
(一个 8 位布尔值,用于指定字体的删除属性。)
|
protected boolean |
underline
An 8-bit Boolean value that specifies the underline attribute of the font.
(一个 8 位布尔值,用于指定字体的下划线属性。)
|
protected int |
weight
A 16-bit signed integer that defines the weight of the font in the range 0 through 1000.
(一个 16 位有符号整数,用于定义 0 到 1000 范围内的字体粗细。)
|
protected int |
width
A 16-bit signed integer that defines the average width, in logical units, of characters in the font.
(一个 16 位有符号整数,用于定义字体中字符的平均宽度(以逻辑单位表示)。)
|
Constructor and Description |
---|
HwmfFont() |
Modifier and Type | Method and Description |
---|---|
FontCharset |
getCharset() |
HwmfFont.WmfClipPrecision |
getClipPrecision() |
int |
getEscapement() |
FontFamily |
getFamily() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
double |
getHeight() |
int |
getOrientation() |
HwmfFont.WmfOutPrecision |
getOutPrecision() |
FontPitch |
getPitch() |
int |
getPitchAndFamily() |
HwmfFont.WmfFontQuality |
getQuality() |
java.lang.String |
getTypeface() |
int |
getWeight() |
int |
getWidth() |
int |
init(LittleEndianInputStream leis, long recordSize) |
void |
initDefaults() |
boolean |
isItalic() |
boolean |
isStrikeOut() |
boolean |
isUnderline() |
protected int |
readString(LittleEndianInputStream leis, java.lang.StringBuilder sb, int limit) |
protected int |
readString(LittleEndianInputStream leis, java.lang.StringBuilder sb, int limit, java.nio.charset.Charset charset) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFacets, getIndex, getPanose, setCharset, setFamily, setIndex, setPanose, setPitch, setTypeface
getGenericChildren, getGenericRecordType
protected double height
protected int width
protected int escapement
protected int orientation
protected int weight
protected boolean italic
protected boolean underline
protected boolean strikeOut
protected FontCharset charSet
FontCharset
Enumeration. The DEFAULT_CHARSET value MAY be used to allow the name and size of a font to fully describe the logical font. If the specified font name does not exist, a font in another character set MAY be substituted. The DEFAULT_CHARSET value is set to a value based on the current system locale. For example, when the system locale is United States, it is set to ANSI_CHARSET. If a typeface name in the FaceName field is specified, the CharSet value MUST match the character set of that typeface.
(定义字符集的 8 位无符号整数。它应该设置为 FontCharset 枚举中的一个值。 DEFAULT_CHARSET 值可用于允许字体的名称和大小完全描述逻辑字体。如果指定的字体名称不存在,则可以替换另一个字符集中的字体。 DEFAULT_CHARSET 值设置为基于当前系统区域设置的值。例如,当系统区域设置为美国时,它设置为 ANSI_CHARSET。如果在 FaceName 字段中指定了字体名称,则 CharSet 值必须与该字体的字符集匹配。)
protected HwmfFont.WmfOutPrecision outPrecision
protected final HwmfFont.WmfClipPrecision clipPrecision
HwmfFont.WmfClipPrecision
protected HwmfFont.WmfFontQuality quality
protected int pitchAndFamily
protected FontFamily family
protected FontPitch pitch
protected java.lang.String facename
public int init(LittleEndianInputStream leis, long recordSize) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public void initDefaults()
public double getHeight()
public int getWidth()
public int getEscapement()
public int getOrientation()
public int getWeight()
public boolean isItalic()
public boolean isUnderline()
public boolean isStrikeOut()
public HwmfFont.WmfOutPrecision getOutPrecision()
public HwmfFont.WmfClipPrecision getClipPrecision()
public HwmfFont.WmfFontQuality getQuality()
public int getPitchAndFamily()
public FontFamily getFamily()
public FontPitch getPitch()
public java.lang.String getTypeface()
getTypeface
in interface
FontInfo
(接口 FontInfo 中的 getTypeface)
public FontCharset getCharset()
getCharset
in interface
FontInfo
(接口 FontInfo 中的 getCharset)
public java.lang.String toString()
toString
in class
java.lang.Object
protected int readString(LittleEndianInputStream leis, java.lang.StringBuilder sb, int limit)
protected int readString(LittleEndianInputStream leis, java.lang.StringBuilder sb, int limit, java.nio.charset.Charset charset)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.