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

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

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

Font.getCalculatedLeading介绍

[英]Gets the leading that can be used with this font.
[中]获取可用于此字体的前导字符。

代码示例

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

  1. /**
  2. * Gets the leading of this phrase.
  3. *
  4. * @return the linespacing
  5. */
  6. public float getLeading() {
  7. if (Float.isNaN(leading) && font != null) {
  8. return font.getCalculatedLeading(1.5f);
  9. }
  10. return leading;
  11. }

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

  1. /**
  2. * Gets the leading of this phrase.
  3. *
  4. * @return the linespacing
  5. */
  6. public float getLeading() {
  7. if (Float.isNaN(leading) && font != null) {
  8. return font.getCalculatedLeading(1.5f);
  9. }
  10. return leading;
  11. }

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

  1. /**
  2. * Gets the total leading.
  3. * This method is based on the assumption that the
  4. * font of the Paragraph is the font of all the elements
  5. * that make part of the paragraph. This isn't necessarily
  6. * true.
  7. * @return the total leading (fixed and multiplied)
  8. */
  9. public float getTotalLeading() {
  10. float m = font == null ?
  11. Font.DEFAULTSIZE * multipliedLeading : font.getCalculatedLeading(multipliedLeading);
  12. if (m > 0 && !hasLeading()) {
  13. return m;
  14. }
  15. return getLeading() + m;
  16. }

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

  1. /**
  2. * Gets the total leading.
  3. * This method is based on the assumption that the
  4. * font of the Paragraph is the font of all the elements
  5. * that make part of the paragraph. This isn't necessarily
  6. * true.
  7. * @return the total leading (fixed and multiplied)
  8. */
  9. public float getTotalLeading() {
  10. float m = font == null ?
  11. Font.DEFAULTSIZE * multipliedLeading : font.getCalculatedLeading(multipliedLeading);
  12. if (m > 0 && !hasLeading()) {
  13. return m;
  14. }
  15. return getLeading() + m;
  16. }

相关文章