public boolean equals(Object o) { boolean retVal = true; if(((FontTable)o).getStringCount() == _stringCount) { if(((FontTable)o).getExtraDataSz() == _extraDataSz) { Ffn[] fontNamesNew = ((FontTable)o).getFontNames(); for(int i = 0;i<_stringCount; i++) { if(!(_fontNames[i].equals(fontNamesNew[i]))) retVal = false; } } else retVal = false; } else retVal = false; return retVal; }
/** * Returns the symbol font, if this is a symbol character run. Might return null, if the font index is not found in the font table. * * @see #isSymbol() * @throws IllegalStateException If this is not a symbol character run: call {@link #isSymbol()} first. */ public Ffn getSymbolFont() { if (isSymbol()) { if (_doc.getFontTable() == null) return null; // Fetch all font names Ffn[] fontNames = _doc.getFontTable().getFontNames(); // Try to find the name of the font for our symbol if (fontNames.length <= _props.getFtcSym()) return null; return fontNames[_props.getFtcSym()]; } else throw new IllegalStateException("Not a symbol CharacterRun"); }
/** * Returns the symbol font, if this is a symbol character run. Might return null, if the font index is not found in the font table. * * @see #isSymbol() * @throws IllegalStateException If this is not a symbol character run: call {@link #isSymbol()} first. */ public Ffn getSymbolFont() { if (isSymbol()) { if (_doc.getFontTable() == null) return null; // Fetch all font names Ffn[] fontNames = _doc.getFontTable().getFontNames(); // Try to find the name of the font for our symbol if (fontNames.length <= _props.getFtcSym()) return null; return fontNames[_props.getFtcSym()]; } else throw new IllegalStateException("Not a symbol CharacterRun"); }
for( Ffn f : doc.getFontTable().getFontNames() ) { System.out.println("Font: "+f.getMainFontName()+", "+f.getSize()+", "+f.getWeight());
for( Ffn f : doc.getFontTable().getFontNames() ) { System.out.println("Font: "+f.getMainFontName()+", "+f.getSize()+", "+f.getWeight());