Methods Summary |
---|
public boolean | addGlyph(char uChar)Add glyph to cached Glyph objects in this LinuxFont object.
throw new RuntimeException("Not implemented!");
|
public void | addGlyphs(char uFirst, char uLast)Adds range of existing glyphs to this LinuxFont object
char index = uFirst;
if (uLast < uFirst) {
// awt.09=min range bound value is grater than max range bound
throw new IllegalArgumentException(Messages.getString("awt.09")); //$NON-NLS-1$
}
while (index < uLast) {
addGlyph(index);
index++;
}
|
public boolean | canDisplay(char chr)
// TODO: to improve performance there is a sence to implement get
// unicode ranges to check if char can be displayed without
// native calls in isGlyphExists() method
return isGlyphExists(chr);
|
public void | dispose()Disposes native font handle. If this font peer was created from InputStream
temporary created font resource file is deleted.
String tempDirName;
if (pFont != 0){
pFont = 0;
if (isCreatedFromStream()) {
File fontFile = new File(getTempFontFileName());
tempDirName = fontFile.getParent();
fontFile.delete();
}
}
|
public static java.awt.Font | embedFont(java.lang.String absolutePath)Return Font object if it was successfully embedded in System
throw new RuntimeException("embedFont not implemented!");
|
public org.apache.harmony.awt.gl.font.Glyph | getDefaultGlyph()
throw new RuntimeException("DefaultGlyphs not implemented!");
|
public FontExtraMetrics | getExtraMetrics()Returns initiated FontExtraMetrics instance of this WindowsFont.
throw new RuntimeException("Not implemented!");
|
public java.lang.String | getFamily()
return fontFamilyName;
|
public java.lang.String | getFamily(java.util.Locale l)
// TODO: implement localized family
if (fontType == FontManager.FONT_TYPE_TT){
return this.getFamily();
}
return this.fontFamilyName;
|
public java.lang.String | getFontName()
if ((pFont != 0) && (faceName == null)){
if (this.fontType == FontManager.FONT_TYPE_T1){
faceName = getFamily();
}
}
return faceName;
|
public java.lang.String | getFontName(java.util.Locale l)
if ((pFont == 0) || (this.fontType == FontManager.FONT_TYPE_T1)){
return this.name;
}
return this.getFontName();
|
public org.apache.harmony.awt.gl.font.Glyph | getGlyph(char index)
Glyph result = null;
Object key = new Integer(index);
if (glyphs.containsKey(key)) {
result = (Glyph) glyphs.get(key);
} else {
if (this.addGlyph(index)) {
result = (Glyph) glyphs.get(key);
} else {
result = this.getDefaultGlyph();
}
}
return result;
|
public java.awt.font.LineMetrics | getLineMetrics(java.lang.String str, java.awt.font.FontRenderContext frc, java.awt.geom.AffineTransform at)
// Initialize baseline offsets
nlm.getBaselineOffsets();
LineMetricsImpl lm = (LineMetricsImpl)(this.nlm.clone());
lm.setNumChars(str.length());
if ((at != null) && (!at.isIdentity())){
lm.scale((float)at.getScaleX(), (float)at.getScaleY());
}
return lm;
|
public int | getMissingGlyphCode()
return getDefaultGlyph().getGlyphCode();
|
public java.lang.String | getPSName()
return psName;
|
public int[] | getUnicodeRanges()Returns an array of unicode ranges that are supported by this LinuxFont.
int[] ranges = new int[fontUnicodeRanges.length];
System.arraycopy(fontUnicodeRanges, 0, ranges, 0,
fontUnicodeRanges.length);
return ranges;
|
public void | initAndroidFont()Initializes some native dependent font information, e.g. number of glyphs,
font metrics, italic angle etc.
this.nlm = new AndroidLineMetrics(this, null, " "); //$NON-NLS-1$
this.ascent = nlm.getLogicalAscent();
this.descent = nlm.getLogicalDescent();
this.height = nlm.getHeight();
this.leading = nlm.getLogicalLeading();
this.maxAdvance = nlm.getLogicalMaxCharWidth();
if (this.fontType == FontManager.FONT_TYPE_T1){
this.defaultChar = 1;
} else {
this.defaultChar = 0;
}
this.maxCharBounds = new Rectangle2D.Float(0, -nlm.getAscent(), nlm.getMaxCharWidth(), this.height);
|
public boolean | isGlyphExists(char uIndex)Returns true if specified character has corresopnding glyph, false otherwise.
throw new RuntimeException("DefaultGlyphs not implemented!");
|