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

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

本文整理了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

  1. /**
  2. * Adds a <CODE>Font</CODE> to be searched for valid characters.
  3. * @param font the <CODE>Font</CODE>
  4. */
  5. public void addFont(Font font) {
  6. if (font.getBaseFont() != null) {
  7. fonts.add(font);
  8. return;
  9. }
  10. BaseFont bf = font.getCalculatedBaseFont(true);
  11. Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
  12. fonts.add(f2);
  13. }

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

  1. /**
  2. * Adds a <CODE>Font</CODE> to be searched for valid characters.
  3. * @param font the <CODE>Font</CODE>
  4. */
  5. public void addFont(Font font) {
  6. if (!isSupported(font)) {
  7. unsupportedFonts.add(font);
  8. return;
  9. }
  10. if (font.getBaseFont() != null) {
  11. fonts.add(font);
  12. return;
  13. }
  14. BaseFont bf = font.getCalculatedBaseFont(true);
  15. Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
  16. fonts.add(f2);
  17. }

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

  1. baseFont = f.getCalculatedBaseFont(false);

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

  1. baseFont = f.getCalculatedBaseFont(false);

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

  1. /**
  2. * Gets the width of the Chunk in points.
  3. *
  4. * @return a width in points
  5. */
  6. public float getWidthPoint() {
  7. if (getImage() != null) {
  8. return getImage().getScaledWidth();
  9. }
  10. return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
  11. font.getCalculatedSize())
  12. * getHorizontalScaling();
  13. }

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

  1. /**
  2. * Gets the width of the Chunk in points.
  3. *
  4. * @return a width in points
  5. */
  6. public float getWidthPoint() {
  7. if (getImage() != null) {
  8. return getImage().getScaledWidth();
  9. }
  10. return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
  11. font.getCalculatedSize())
  12. * getHorizontalScaling();
  13. }

相关文章