You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2021/01/16 13:14:31 UTC
svn commit: r1885563 -
/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java
Author: tilman
Date: Sat Jan 16 13:14:31 2021
New Revision: 1885563
URL: http://svn.apache.org/viewvc?rev=1885563&view=rev
Log:
PDFBOX-3709: remove deprecated method
Modified:
pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java
Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java?rev=1885563&r1=1885562&r2=1885563&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java Sat Jan 16 13:14:31 2021
@@ -630,36 +630,6 @@ public class CmapSubtable implements Cma
return glyphId == null ? 0 : glyphId;
}
- /**
- * Returns the character code for the given GID, or null if there is none.
- *
- * @param gid glyph id
- * @return character code
- *
- * @deprecated the mapping may be ambiguous, see {@link #getCharCodes(int)}. The first mapped value is returned by
- * default.
- */
- @Deprecated
- public Integer getCharacterCode(int gid)
- {
- int code = getCharCode(gid);
- if (code == -1)
- {
- return null;
- }
- // ambiguous mapping
- if (code == Integer.MIN_VALUE)
- {
- List<Integer> mappedValues = glyphIdToCharacterCodeMultiple.get(gid);
- if (mappedValues != null)
- {
- // use the first mapping
- return mappedValues.get(0);
- }
- }
- return code;
- }
-
private int getCharCode(int gid)
{
if (gid < 0 || gid >= glyphIdToCharacterCode.length)