private BoundingBox generateBoundingBox() throws IOException { if (getFontDescriptor() != null) { PDRectangle bbox = getFontDescriptor().getFontBoundingBox(); if (bbox != null && (Float.compare(bbox.getLowerLeftX(), 0) != 0 || Float.compare(bbox.getLowerLeftY(), 0) != 0 || Float.compare(bbox.getUpperRightX(), 0) != 0 || Float.compare(bbox.getUpperRightY(), 0) != 0)) { return new BoundingBox(bbox.getLowerLeftX(), bbox.getLowerLeftY(), bbox.getUpperRightX(), bbox.getUpperRightY()); } } return ttf.getFontBBox(); }
private TrueTypeFont findFontOrSubstitute() throws IOException { TrueTypeFont ttfFont; CIDFontMapping mapping = FontMappers.instance() .getCIDFont(getBaseFont(), getFontDescriptor(), getCIDSystemInfo()); if (mapping.isCIDFont()) { ttfFont = mapping.getFont(); } else { ttfFont = (TrueTypeFont)mapping.getTrueTypeFont(); } if (mapping.isFallback()) { LOG.warn("Using fallback font " + ttfFont.getName() + " for CID-keyed TrueType font " + getBaseFont()); } return ttfFont; }
PDFontDescriptor fd = getFontDescriptor(); if (trueTypeFont != null)
private BoundingBox generateBoundingBox() throws IOException { if (getFontDescriptor() != null) { PDRectangle bbox = getFontDescriptor().getFontBoundingBox(); if (bbox != null && (Float.compare(bbox.getLowerLeftX(), 0) != 0 || Float.compare(bbox.getLowerLeftY(), 0) != 0 || Float.compare(bbox.getUpperRightX(), 0) != 0 || Float.compare(bbox.getUpperRightY(), 0) != 0)) { return new BoundingBox(bbox.getLowerLeftX(), bbox.getLowerLeftY(), bbox.getUpperRightX(), bbox.getUpperRightY()); } } return ttf.getFontBBox(); }
private BoundingBox generateBoundingBox() throws IOException { if (getFontDescriptor() != null) { PDRectangle bbox = getFontDescriptor().getFontBoundingBox(); if (bbox != null && (bbox.getLowerLeftX() != 0 || bbox.getLowerLeftY() != 0 || bbox.getUpperRightX() != 0 || bbox.getUpperRightY() != 0)) { return new BoundingBox(bbox.getLowerLeftX(), bbox.getLowerLeftY(), bbox.getUpperRightX(), bbox.getUpperRightY()); } } return ttf.getFontBBox(); }
private TrueTypeFont findFontOrSubstitute() throws IOException { TrueTypeFont ttfFont; CIDFontMapping mapping = FontMappers.instance() .getCIDFont(getBaseFont(), getFontDescriptor(), getCIDSystemInfo()); if (mapping.isCIDFont()) { ttfFont = mapping.getFont(); } else { ttfFont = (TrueTypeFont)mapping.getTrueTypeFont(); } if (mapping.isFallback()) { LOG.warn("Using fallback font " + ttfFont.getName() + " for CID-keyed TrueType font " + getBaseFont()); } return ttfFont; }
private TrueTypeFont findFontOrSubstitute() throws IOException { TrueTypeFont ttfFont; CIDFontMapping mapping = FontMappers.instance() .getCIDFont(getBaseFont(), getFontDescriptor(), getCIDSystemInfo()); if (mapping.isCIDFont()) { ttfFont = mapping.getFont(); } else { ttfFont = (TrueTypeFont)mapping.getTrueTypeFont(); } if (mapping.isFallback()) { LOG.warn("Using fallback font " + ttfFont.getName() + " for CID-keyed TrueType font " + getBaseFont()); } return ttfFont; }
PDFontDescriptor fd = getFontDescriptor(); if (trueTypeFont != null)
PDFontDescriptor fd = getFontDescriptor(); if (trueTypeFont != null)