rFonts.setAscii( fontScheme.getMajorFont().getLatin().getTypeface() ); } else if (lvlPPr.getDefRPr().getLatin().getTypeface().startsWith("+mn") ) { rFonts.setAscii( fontScheme.getMinorFont().getLatin().getTypeface() );
rFonts.setAscii( fontScheme.getMajorFont().getLatin().getTypeface() ); } else if (lvlPPr.getDefRPr().getLatin().getTypeface().startsWith("+mn") ) { rFonts.setAscii( fontScheme.getMinorFont().getLatin().getTypeface() );
protected static DocDefaults generateDocDefaults(FontScheme fontScheme) { ObjectFactory factory = Context.getWmlObjectFactory(); DocDefaults docDefaults = factory.createDocDefaults(); RPrDefault rPrDefault = factory.createDocDefaultsRPrDefault(); docDefaults.setRPrDefault(rPrDefault); // <w:rPr> RPr rPr = factory.createRPr(); rPrDefault.setRPr(rPr); // <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" /> RFonts rFonts = factory.createRFonts(); rFonts.setAscii( fontScheme.getMinorFont().getLatin().getTypeface() ); rPr.setRFonts(rFonts); return docDefaults; }
private FontCollection getMinorFontCollection() throws Docx4JException { if (minorFontCollectionInitialised) return minorFontCollection; if (this.getContents().getThemeElements()!=null && this.getContents().getThemeElements().getFontScheme()!=null) { minorFontCollection = this.getContents().getThemeElements().getFontScheme().getMinorFont(); } minorFontCollectionInitialised = true; return minorFontCollection; }
protected static DocDefaults generateDocDefaults(FontScheme fontScheme) { ObjectFactory factory = Context.getWmlObjectFactory(); DocDefaults docDefaults = factory.createDocDefaults(); RPrDefault rPrDefault = factory.createDocDefaultsRPrDefault(); docDefaults.setRPrDefault(rPrDefault); // <w:rPr> RPr rPr = factory.createRPr(); rPrDefault.setRPr(rPr); // <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" /> RFonts rFonts = factory.createRFonts(); rFonts.setAscii( fontScheme.getMinorFont().getLatin().getTypeface() ); rPr.setRFonts(rFonts); return docDefaults; }
private FontCollection getMinorFontCollection() throws Docx4JException { if (minorFontCollectionInitialised) return minorFontCollection; if (this.getContents().getThemeElements()!=null && this.getContents().getThemeElements().getFontScheme()!=null) { minorFontCollection = this.getContents().getThemeElements().getFontScheme().getMinorFont(); } minorFontCollectionInitialised = true; return minorFontCollection; }