/** * Gets the font family for the specified font char range. * If fcr is null, the font char range "ascii" is used * * @param fcr the font char range, defaults to "ansi" * @return a string representing the font famil */ public String getFontFamily(FontCharRange fcr) { CTRPr pr = getRunProperties(false); if (pr == null || !pr.isSetRFonts()) { return null; } CTFonts fonts = pr.getRFonts(); switch (fcr == null ? FontCharRange.ascii : fcr) { default: case ascii: return fonts.getAscii(); case cs: return fonts.getCs(); case eastAsia: return fonts.getEastAsia(); case hAnsi: return fonts.getHAnsi(); } }
cellFonts.setEastAsia(tmpFonts.getEastAsia()); cellFonts.setEastAsiaTheme(tmpFonts.getEastAsiaTheme()); cellFonts.setHAnsi(tmpFonts.getHAnsi()); cellFonts.setHAnsiTheme(tmpFonts.getHAnsiTheme());
@Override protected String getFamily( CTFonts fonts ) { return fonts.getHAnsi(); }
@Override protected String getFamily( CTFonts fonts ) { return fonts.getHAnsi(); }
@Override protected String getFamily( CTFonts fonts ) { return fonts.getHAnsi(); }
@Override protected String getFamily( CTFonts fonts ) { return fonts.getHAnsi(); }
/** * Gets the font family for the specified font char range. * If fcr is null, the font char range "ascii" is used * * @param fcr the font char range, defaults to "ansi" * @return a string representing the font famil */ public String getFontFamily(FontCharRange fcr) { CTRPr pr = getRunProperties(false); if (pr == null || !pr.isSetRFonts()) { return null; } CTFonts fonts = pr.getRFonts(); switch (fcr == null ? FontCharRange.ascii : fcr) { default: case ascii: return fonts.getAscii(); case cs: return fonts.getCs(); case eastAsia: return fonts.getEastAsia(); case hAnsi: return fonts.getHAnsi(); } }