- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextRun.getFontFamily()
方法的一些代码示例,展示了XSLFTextRun.getFontFamily()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFTextRun.getFontFamily()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFTextRun
类名称:XSLFTextRun
方法名:getFontFamily
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public String getDefaultFontFamily() {
return (_runs.isEmpty() ? "Arial" : _runs.get(0).getFontFamily());
}
代码示例来源:origin: org.apache.poi/poi-ooxml
void copy(XSLFTextRun r){
String srcFontFamily = r.getFontFamily();
if(srcFontFamily != null && !srcFontFamily.equals(getFontFamily())){
setFontFamily(srcFontFamily);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public String getDefaultFontFamily() {
return (_runs.isEmpty() ? "Arial" : _runs.get(0).getFontFamily());
}
代码示例来源:origin: stackoverflow.com
XSLFTextShape[] phs = slide[i].getPlaceholders();
for (XSLFTextShape ts : phs) {
java.util.List<XSLFTextParagraph> tpl = ts.getTextParagraphs();
for(XSLFTextParagraph tp: tpl) {
java.util.List<XSLFTextRun> trs = tp.getTextRuns();
for(XSLFTextRun tr: trs) {
logger.info(tr.getFontFamily());
tr.setFontFamily("SimSun");
}
}
}
代码示例来源:origin: org.apache.poi/poi-examples
System.out.println(" italic: " + r.isItalic());
System.out.println(" underline: " + r.isUnderlined());
System.out.println(" font.family: " + r.getFontFamily());
System.out.println(" font.size: " + r.getFontSize());
System.out.println(" font.color: " + r.getFontColor());
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Replace a tab with the effective number of white spaces.
*
* @return
*/
private String tab2space(){
AttributedString string = new AttributedString(" ");
// user can pass an object to convert fonts via a rendering hint
string.addAttribute(TextAttribute.FAMILY, getFontFamily());
string.addAttribute(TextAttribute.SIZE, (float)getFontSize());
TextLayout l = new TextLayout(string.getIterator(), new FontRenderContext(null, true, true));
double wspace = l.getAdvance();
double tabSz = _p.getDefaultTabSize();
int numSpaces = (int)Math.ceil(tabSz / wspace);
StringBuffer buf = new StringBuffer();
for(int i = 0; i < numSpaces; i++) {
buf.append(' ');
}
return buf.toString();
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
void copy(XSLFTextRun r){
String srcFontFamily = r.getFontFamily();
if(srcFontFamily != null && !srcFontFamily.equals(getFontFamily())){
setFontFamily(srcFontFamily);
}
Color srcFontColor = r.getFontColor();
if(srcFontColor != null && !srcFontColor.equals(getFontColor())){
setFontColor(srcFontColor);
}
double srcFontSize = r.getFontSize();
if(srcFontSize != getFontSize()){
setFontSize(srcFontSize);
}
boolean bold = r.isBold();
if(bold != isBold()) setBold(bold);
boolean italic = r.isItalic();
if(italic != isItalic()) setItalic(italic);
boolean underline = r.isUnderline();
if(underline != isUnderline()) setUnderline(underline);
boolean strike = r.isStrikethrough();
if(strike != isStrikethrough()) setStrikethrough(strike);
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
String buCharacter = getBulletCharacter();
String buFont = getBulletFont();
if(buFont == null) buFont = getTextRuns().get(0).getFontFamily();
if(buCharacter != null && buFont != null && _lines.size() > 0) {
AttributedString str = new AttributedString(buCharacter);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
void copy(XSLFTextRun r){
String srcFontFamily = r.getFontFamily();
if(srcFontFamily != null && !srcFontFamily.equals(getFontFamily())){
setFontFamily(srcFontFamily);
代码示例来源:origin: stackoverflow.com
Color fontColor = null;
String fontFamily = null;
double fontSize = 0.0;
boolean italic = false;
boolean bold = false;
boolean underline = false;
for (XSLFTextParagraph paragraph : autoShape.getTextParagraphs()) {
for (XSLFTextRun text : paragraph.getTextRuns()) {
fontColor = text.getFontColor();
fontFamily = text.getFontFamily();
fontSize = text.getFontSize();
italic = text.isItalic();
bold = text.isBold();
underline = text.isUnderline();
}
}
autoShape.clearText();
XSLFTextParagraph addNewTextParagraph = autoShape.addNewTextParagraph();
XSLFTextRun addNewTextRun = addNewTextParagraph.addNewTextRun();
addNewTextRun.setText(values.get(0)[1]);
addNewTextRun.setFontColor(fontColor);
addNewTextRun.setFontFamily(fontFamily);
addNewTextRun.setFontSize(fontSize);
addNewTextRun.setItalic(italic);
addNewTextRun.setBold(bold);
addNewTextRun.setUnderline(underline);
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
String fontFamily = run.getFontFamily();
if(fontHandler != null) {
fontFamily = fontHandler.getRendererableFont(fontFamily, run.getPitchAndFamily());
在 WPF 中,以下代码返回给定位置中所有字体的列表: foreach (var fontFamily in Fonts.GetFontFamilies(@"C:\Dummy\Fonts\")) {
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextRun.getFontFamily()方法的一些代码示例,展示了XSLFTextRun.getFontF
我想逐段阅读 .docx 文件,并检查每个段落的字体系列、字体大小、边距、对齐方式、颜色等。这是我的 .docx 文件的示例: 这是我的代码: FileInputStream fis = new Fi
我是一名优秀的程序员,十分优秀!