public XDDFFont[] getFonts() { LinkedList<XDDFFont> list = new LinkedList<>(); findDefinedProperty(props -> props.isSetCs(), props -> props.getCs()) .map(font -> new XDDFFont(FontGroup.COMPLEX_SCRIPT, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetEa(), props -> props.getEa()) .map(font -> new XDDFFont(FontGroup.EAST_ASIAN, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetLatin(), props -> props.getLatin()) .map(font -> new XDDFFont(FontGroup.LATIN, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetSym(), props -> props.getSym()) .map(font -> new XDDFFont(FontGroup.SYMBOL, font)) .ifPresent(font -> list.add(font)); return list.toArray(new XDDFFont[list.size()]); }
if (props.isSetCs()) { props.unsetCs();
public void setFontFamily(String typeface, byte charset, byte pictAndFamily, boolean isSymbol){ CTTextCharacterProperties rPr = getRPr(); if(typeface == null){ if(rPr.isSetLatin()) rPr.unsetLatin(); if(rPr.isSetCs()) rPr.unsetCs(); if(rPr.isSetSym()) rPr.unsetSym(); } else { if(isSymbol){ CTTextFont font = rPr.isSetSym() ? rPr.getSym() : rPr.addNewSym(); font.setTypeface(typeface); } else { CTTextFont latin = rPr.isSetLatin() ? rPr.getLatin() : rPr.addNewLatin(); latin.setTypeface(typeface); if(charset != -1) latin.setCharset(charset); if(pictAndFamily != -1) latin.setPitchFamily(pictAndFamily); } } }
case COMPLEX_SCRIPT: if (xml == null) { if (props.isSetCs()) { props.unsetCs();
public XDDFFont[] getFonts() { LinkedList<XDDFFont> list = new LinkedList<>(); findDefinedProperty(props -> props.isSetCs(), props -> props.getCs()) .map(font -> new XDDFFont(FontGroup.COMPLEX_SCRIPT, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetEa(), props -> props.getEa()) .map(font -> new XDDFFont(FontGroup.EAST_ASIAN, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetLatin(), props -> props.getLatin()) .map(font -> new XDDFFont(FontGroup.LATIN, font)) .ifPresent(font -> list.add(font)); findDefinedProperty(props -> props.isSetSym(), props -> props.getSym()) .map(font -> new XDDFFont(FontGroup.SYMBOL, font)) .ifPresent(font -> list.add(font)); return list.toArray(new XDDFFont[list.size()]); }
if (props.isSetCs()) { props.unsetCs();
public void setFontFamily(String typeface, byte charset, byte pictAndFamily, boolean isSymbol){ CTTextCharacterProperties rPr = getRPr(); if(typeface == null){ if(rPr.isSetLatin()) rPr.unsetLatin(); if(rPr.isSetCs()) rPr.unsetCs(); if(rPr.isSetSym()) rPr.unsetSym(); } else { if(isSymbol){ CTTextFont font = rPr.isSetSym() ? rPr.getSym() : rPr.addNewSym(); font.setTypeface(typeface); } else { CTTextFont latin = rPr.isSetLatin() ? rPr.getLatin() : rPr.addNewLatin(); latin.setTypeface(typeface); if(charset != -1) latin.setCharset(charset); if(pictAndFamily != -1) latin.setPitchFamily(pictAndFamily); } } }
public void setFontFamily(String typeface, byte charset, byte pictAndFamily, boolean isSymbol){ CTTextCharacterProperties rPr = getRPr(); if(typeface == null){ if(rPr.isSetLatin()) rPr.unsetLatin(); if(rPr.isSetCs()) rPr.unsetCs(); if(rPr.isSetSym()) rPr.unsetSym(); } else { if(isSymbol){ CTTextFont font = rPr.isSetSym() ? rPr.getSym() : rPr.addNewSym(); font.setTypeface(typeface); } else { CTTextFont latin = rPr.isSetLatin() ? rPr.getLatin() : rPr.addNewLatin(); latin.setTypeface(typeface); if(charset != -1) latin.setCharset(charset); if(pictAndFamily != -1) latin.setPitchFamily(pictAndFamily); } } }
case COMPLEX_SCRIPT: if (xml == null) { if (props.isSetCs()) { props.unsetCs();