@@ -594,7 +594,9 @@ public CMapEncoding getCmap() {
594594 * @param metrics metrics[0] contains the glyph index and metrics[2]
595595 * contains the Unicode code
596596 * @return the stream representing this CMap or <CODE>null</CODE>
597+ * @deprecated will be removed in 7.2. Use {@link #getToUnicode(int[])} instead
597598 */
599+ @ Deprecated
598600 public PdfStream getToUnicode (Object [] metrics ) {
599601 ArrayList <Integer > unicodeGlyphs = new ArrayList <>(metrics .length );
600602 for (int i = 0 ; i < metrics .length ; i ++) {
@@ -676,7 +678,9 @@ protected PdfDictionary getFontDescriptor(String fontName) {
676678 * @param fontName a name of the font
677679 * @param metrics the horizontal width metrics
678680 * @return fully initialized CIDFont
681+ * @deprecated will be removed in 7.2
679682 */
683+ @ Deprecated
680684 protected PdfDictionary getCidFontType2 (TrueTypeFont ttf , PdfDictionary fontDescriptor , String fontName , int [][] metrics ) {
681685 PdfDictionary cidFont = new PdfDictionary ();
682686 makeObjectIndirect (cidFont );
@@ -726,6 +730,10 @@ protected PdfDictionary getCidFontType2(TrueTypeFont ttf, PdfDictionary fontDesc
726730 return cidFont ;
727731 }
728732
733+ @ Deprecated
734+ /**
735+ * @deprecated will be removed in 7.2
736+ */
729737 protected void addRangeUni (TrueTypeFont ttf , Map <Integer , int []> longTag , boolean includeMetrics ) {
730738 if (!subset && (subsetRanges != null || ttf .getDirectoryOffset () > 0 )) {
731739 int [] rg = subsetRanges == null && ttf .getDirectoryOffset () > 0
@@ -753,16 +761,6 @@ protected void addRangeUni(TrueTypeFont ttf, Map<Integer, int[]> longTag, boolea
753761 }
754762 }
755763
756- private boolean containsUnicodeGlyph (String text , int from ) {
757- int ch ;
758- if (TextUtil .isSurrogatePair (text , from )) {
759- ch = TextUtil .convertToUtf32 (text , from );
760- } else {
761- ch = text .charAt (from );
762- }
763- return getFontProgram ().getGlyph (ch ) != null ;
764- }
765-
766764 private void convertToBytes (Glyph glyph , ByteBuffer result ) {
767765 int code = glyph .getCode ();
768766 longTag .add (code );
0 commit comments