/** * @since 2.1.5 * Override to allow special handling for fonts that don't specify width of space character * @see com.itextpdf.text.pdf.DocumentFont#getWidth(int) */ @Override public int getWidth(int char1) { if (char1 == ' ') return spaceWidth != 0 ? spaceWidth : defaultWidth; return super.getWidth(char1); }
/** * @since 2.1.5 * Override to allow special handling for fonts that don't specify width of space character * @see com.itextpdf.text.pdf.DocumentFont#getWidth(int) */ @Override public int getWidth(int char1) { if (char1 == ' ') return spaceWidth != 0 ? spaceWidth : defaultWidth; return super.getWidth(char1); }
private void initFont() { processToUnicode(); try { //if (toUnicodeCmap == null) processUni2Byte(); spaceWidth = super.getWidth(' '); if (spaceWidth == 0){ spaceWidth = computeAverageWidth(); } if (cjkEncoding != null) { byteCid = CMapCache.getCachedCMapByteCid(cjkEncoding); cidUni = CMapCache.getCachedCMapCidUni(uniMap); } } catch (Exception ex) { throw new ExceptionConverter(ex); } } /**
private void initFont() { processToUnicode(); try { //if (toUnicodeCmap == null) processUni2Byte(); spaceWidth = super.getWidth(' '); if (spaceWidth == 0){ spaceWidth = computeAverageWidth(); } if (cjkEncoding != null) { byteCid = CMapCache.getCachedCMapByteCid(cjkEncoding); cidUni = CMapCache.getCachedCMapCidUni(uniMap); } } catch (Exception ex) { throw new ExceptionConverter(ex); } } /**