|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faceless.pdf2.PDFFont
org.faceless.pdf2.StandardCJKFont
public final class StandardCJKFont
A subclass of PDFFont representing the "standard" Chinese, Japanese and Korean fonts which are supplied by default with Acrobat 5.0 or later, or with a supplementary "language pack" for earlier releases. It's safe to assume that some version of these characters will be available for most PDF viewing applications (although see below for details). The following fonts are available:
STSONG. Support for the range of glyphs covered in
Unicode 3.0/ISO 10646-1:2000 requires at least Java 1.5, PDF Library 2.2.6 and
Acrobat 6.0. Support for the Yi character set requires at least the PDF library
2.10.4 and Acrobat 8.0.
MHEI and MSUNG. Support for HKSCS:2001 requires at least
Java 1.5, the PDF Library 2.2.6 and Acrobat 6.0. Support for HKSCS:2004 requires
the PDF Library 2.10.4 and Acrobat 8.0.
HEISEIMIN and HEISEIKAKUGO. We'd
recommend at least Acrobat 5.0 for display of Japanese text. To support JIS X
0213:2004 you'll need Acrobat 7.0 or later and the PDF Library 2.2.6.
HYGOTHIC and HYSMYEONGJO. Korean support
has been largely static in Acrobat, and any reasonably recent version of the PDF
library and Acrobat should support the full range of characters.
| Field Summary | |
|---|---|
static int |
BOLD
A "style" parameter to the constructor requesting a bold font |
static int |
HEISEIKAKUGO
Represents the Heisei Kaku Gothic W5 font, a Japanese font with fixed width strokes |
static int |
HEISEIMIN
Represents the Heisei Mincho W3 font, a Japanese font with variable width strokes |
static int |
HYGOTHIC
Represents the HY Gothic Medium font, a Korean font with fixed width strokes |
static int |
HYSMYEONGJO
Represents the HYS Myeongjo Medium font, a Korean font with variable width strokes |
static int |
ITALIC
A "style" parameter to the constructor requesting an italic font |
static int |
MHEI
Represents the MHei Medium font, a Traditional Chinese font with fixed width strokes |
static int |
MSUNG
Represents the MSung Light font, a Traditional Chinese font with variable width strokes |
static int |
REGULAR
A "style" parameter to the constructor requesting a regular font - ie. not bold or italic. |
static int |
STSONG
Represents the ST Song Light font, a Simplified Chinese font with variable width strokes |
| Constructor Summary | |
|---|---|
StandardCJKFont(int font,
int style)
Create a new CJK Font. |
|
| Method Summary | |
|---|---|
float |
getAscender()
Get the Ascender for the font (the maximum height above the baseline the font extends), as a proportion of the point size. |
float |
getDefaultLeading()
Get the default leading for this font - the preferred distance between two successive baselines of text. |
float |
getDescender()
Get the Descender for the font (the maximum height below the baseline the font extends), as a proportion of the point size. |
float |
getStrikeoutPosition()
Get the strikeout position, as a proportion of the font size. |
float |
getStrikeoutThickness()
Get the strikeout thickness, as a proportion of the font size. |
float |
getSubscriptPosition()
Get the recommended position of a sub-script version of this font, as a proportion of the sub-scripted font size. |
float |
getSubscriptSize()
Get the recommended size of a super/sub script version of this font, as a proportion of the normal font size. |
float |
getSuperscriptPosition()
Get the recommended position of a super-script version of this font, as a proportion of the sub-scripted font size. |
float |
getUnderlinePosition()
Get the underline position, as a proportion of the font size. |
float |
getUnderlineThickness()
Get the underline thickness, as a proportion of the font size. |
float |
getXHeight()
Get the X-Height of the font - normally the height of a lower-case 'x' character |
boolean |
isMonospace()
Return true if every character has the same width (like Courier), false if every character is potentially a different width (like Times-Roman) |
String |
toString()
|
PDFFont |
versionBold()
Return a bold version of the current font, if available. |
PDFFont |
versionItalic()
Return an italic version of the current font, if available. |
PDFFont |
versionNonBold()
Return a non-bold version of the current font, if available. |
PDFFont |
versionNonItalic()
Return a non-italic version of the current font, if available. |
PDFFont |
versionRegular()
Return a non-bold, non-italic version of the current font, if available. |
| Methods inherited from class org.faceless.pdf2.PDFFont |
|---|
getAvailableFeatures, getBaseName, getBottom, getCharWidth, getCharWidth, getFeature, getKerning, getKerning, getLeft, getRight, getTop, isDefined, isDefined, isHorizontal, ligaturize, ligaturize, requote, requote, setFeature |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STSONG
public static final int MSUNG
public static final int MHEI
public static final int HEISEIMIN
public static final int HEISEIKAKUGO
public static final int HYGOTHIC
public static final int HYSMYEONGJO
public static final int REGULAR
public static final int BOLD
public static final int ITALIC
| Constructor Detail |
|---|
public StandardCJKFont(int font,
int style)
font - The font to create. Can be one of STSONG, MHEI,
MSUNG, HEISEIMIN, HEISEIKAKUGO, HYGOTHIC,
or HYSMYEONGJO.style - a logical-OR of any of BOLD, ITALIC or REGULAR| Method Detail |
|---|
public float getDefaultLeading()
PDFFontGet the default leading for this font - the preferred distance between two successive baselines of text. Values are a ratio of the font size, and are typically between 1 and 1.3
Note that the values of the different spacing-between-lines methods have
changed - in versions 1.0.4 and earlier this routine normally returned 1
and the spacing was set by the PDFStyle.setTextLineSpacing(float) method.
Since 1.1, the values for these two methods are effectively reversed. See
the relevant method comments in the PDFStyle class for more
information.
getDefaultLeading in class PDFFontpublic float getDescender()
PDFFont
getDescender in class PDFFontpublic float getAscender()
PDFFont
getAscender in class PDFFontpublic float getXHeight()
PDFFont
getXHeight in class PDFFontpublic float getUnderlinePosition()
PDFFontgetDescender() method, the returned value is almost
always negative, indicating below the baseline.
getUnderlinePosition in class PDFFontpublic float getUnderlineThickness()
PDFFont
getUnderlineThickness in class PDFFontpublic float getStrikeoutPosition()
PDFFont
getStrikeoutPosition in class PDFFontpublic float getStrikeoutThickness()
PDFFont
getStrikeoutThickness in class PDFFontpublic float getSuperscriptPosition()
PDFFontGet the recommended position of a super-script version of this font, as a proportion of the sub-scripted font size. Value is always positive.
For some fonts (like CJK or barcode fonts) where there is no concept of super or subscript, this value is entirely arbitrary.
getSuperscriptPosition in class PDFFontpublic float getSubscriptPosition()
PDFFontGet the recommended position of a sub-script version of this font, as a proportion of the sub-scripted font size. Value is almost always zero or negative.
For some fonts (like CJK or barcode fonts) where there is no concept of super or subscript, this value is entirely arbitrary.
getSubscriptPosition in class PDFFontpublic float getSubscriptSize()
PDFFontGet the recommended size of a super/sub script version of this font, as a proportion of the normal font size. Typical value is around 0.6.
For some fonts (like CJK or barcode fonts) where there is no concept of super or subscript, this value is entirely arbitrary.
getSubscriptSize in class PDFFontpublic boolean isMonospace()
PDFFont
isMonospace in class PDFFontpublic PDFFont versionBold()
PDFFont
versionBold in class PDFFontpublic PDFFont versionItalic()
PDFFont
versionItalic in class PDFFontpublic PDFFont versionNonItalic()
PDFFont
versionNonItalic in class PDFFontpublic PDFFont versionNonBold()
PDFFont
versionNonBold in class PDFFontpublic PDFFont versionRegular()
PDFFont
versionRegular in class PDFFontpublic String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||