com.itextpdf.text.Font.getCalculatedBaseFont()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中com.itextpdf.text.Font.getCalculatedBaseFont()方法的一些代码示例,展示了Font.getCalculatedBaseFont()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Font.getCalculatedBaseFont()方法的具体详情如下:
包路径:com.itextpdf.text.Font
类名称:Font
方法名:getCalculatedBaseFont

Font.getCalculatedBaseFont介绍

[英]Gets the BaseFont this class represents. For the built-in fonts a BaseFont is calculated.
[中]获取此类表示的BaseFont。对于内置字体,将计算BaseFont

代码示例

代码示例来源:origin: com.itextpdf/itextg

/**
 * Adds a <CODE>Font</CODE> to be searched for valid characters.
 * @param font the <CODE>Font</CODE>
 */
public void addFont(Font font) {
  if (font.getBaseFont() != null) {
    fonts.add(font);
    return;
  }
  BaseFont bf = font.getCalculatedBaseFont(true);
  Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
  fonts.add(f2);
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Adds a <CODE>Font</CODE> to be searched for valid characters.
 * @param font the <CODE>Font</CODE>
 */
public void addFont(Font font) {
  if (!isSupported(font)) {
    unsupportedFonts.add(font);
    return;
  }
  if (font.getBaseFont() != null) {
    fonts.add(font);
    return;
  }
  BaseFont bf = font.getCalculatedBaseFont(true);
  Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
  fonts.add(f2);
}

代码示例来源:origin: com.itextpdf/itextpdf

baseFont = f.getCalculatedBaseFont(false);

代码示例来源:origin: com.itextpdf/itextg

baseFont = f.getCalculatedBaseFont(false);

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Gets the width of the Chunk in points.
 *
 * @return a width in points
 */
public float getWidthPoint() {
  if (getImage() != null) {
    return getImage().getScaledWidth();
  }
  return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
      font.getCalculatedSize())
      * getHorizontalScaling();
}

代码示例来源:origin: com.itextpdf/itextg

/**
 * Gets the width of the Chunk in points.
 *
 * @return a width in points
 */
public float getWidthPoint() {
  if (getImage() != null) {
    return getImage().getScaledWidth();
  }
  return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
      font.getCalculatedSize())
      * getHorizontalScaling();
}

相关文章