/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ public int codeToCID(int code) { return descendantFont.codeToCID(code); }
@Override public boolean hasExplicitWidth(int code) throws IOException { return widths.get(codeToCID(code)) != null; }
/** * Returns the y-component of the vertical displacement vector (w1). * * @param code character code * @return w1y */ public float getVerticalDisplacementVectorY(int code) { int cid = codeToCID(code); Float w1y = verticalDisplacementY.get(cid); if (w1y == null) { w1y = dw2[1]; } return w1y; }
@Override public Vector getPositionVector(int code) { int cid = codeToCID(code); Vector v = positionVectors.get(cid); if (v == null) { v = getDefaultPositionVector(cid); } return v; }
@Override public float getWidth(int code) throws IOException { // these widths are supposed to be consistent with the actual widths given in the CIDFont // program, but PDFBOX-563 shows that when they are not, Acrobat overrides the embedded // font widths with the widths given in the font dictionary return getWidthForCID(codeToCID(code)); }
/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ public int codeToCID(int code) { return descendantFont.codeToCID(code); }
/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ public int codeToCID(int code) { return descendantFont.codeToCID(code); }
tab[index][1] = descendantFont.codeToCID(code); tab[index][2] = descendantFont.codeToGID(code); tab[index][3] = parentFont.toUnicode(code);
@Override public boolean hasExplicitWidth(int code) throws IOException { return widths.get(codeToCID(code)) != null; }
/** * Returns the y-component of the vertical displacement vector (w1). * * @param code character code * @return w1y */ public float getVerticalDisplacementVectorY(int code) { int cid = codeToCID(code); Float w1y = verticalDisplacementY.get(cid); if (w1y == null) { w1y = dw2[1]; } return w1y; }
/** * Returns the y-component of the vertical displacement vector (w1). * * @param code character code * @return w1y */ public float getVerticalDisplacementVectorY(int code) { int cid = codeToCID(code); Float w1y = verticalDisplacementY.get(cid); if (w1y == null) { w1y = dw2[1]; } return w1y; }
@Override public float getWidth(int code) throws IOException { // these widths are supposed to be consistent with the actual widths given in the CIDFont // program, but PDFBOX-563 shows that when they are not, Acrobat overrides the embedded // font widths with the widths given in the font dictionary return getWidthForCID(codeToCID(code)); }
@Override public float getWidth(int code) throws IOException { // these widths are supposed to be consistent with the actual widths given in the CIDFont // program, but PDFBOX-563 shows that when they are not, Acrobat overrides the embedded // font widths with the widths given in the font dictionary return getWidthForCID(codeToCID(code)); }
@Override public Vector getPositionVector(int code) { int cid = codeToCID(code); Vector v = positionVectors.get(cid); if (v == null) { v = getDefaultPositionVector(cid); } return v; }
@Override public Vector getPositionVector(int code) { int cid = codeToCID(code); Vector v = positionVectors.get(cid); if (v == null) { v = getDefaultPositionVector(cid); } return v; }