@@ -594,7 +594,9 @@ public CMapEncoding getCmap() {
594
594
* @param metrics metrics[0] contains the glyph index and metrics[2]
595
595
* contains the Unicode code
596
596
* @return the stream representing this CMap or <CODE>null</CODE>
597
+ * @deprecated will be removed in 7.2. Use {@link #getToUnicode(int[])} instead
597
598
*/
599
+ @ Deprecated
598
600
public PdfStream getToUnicode (Object [] metrics ) {
599
601
ArrayList <Integer > unicodeGlyphs = new ArrayList <>(metrics .length );
600
602
for (int i = 0 ; i < metrics .length ; i ++) {
@@ -676,7 +678,9 @@ protected PdfDictionary getFontDescriptor(String fontName) {
676
678
* @param fontName a name of the font
677
679
* @param metrics the horizontal width metrics
678
680
* @return fully initialized CIDFont
681
+ * @deprecated will be removed in 7.2
679
682
*/
683
+ @ Deprecated
680
684
protected PdfDictionary getCidFontType2 (TrueTypeFont ttf , PdfDictionary fontDescriptor , String fontName , int [][] metrics ) {
681
685
PdfDictionary cidFont = new PdfDictionary ();
682
686
makeObjectIndirect (cidFont );
@@ -726,6 +730,10 @@ protected PdfDictionary getCidFontType2(TrueTypeFont ttf, PdfDictionary fontDesc
726
730
return cidFont ;
727
731
}
728
732
733
+ @ Deprecated
734
+ /**
735
+ * @deprecated will be removed in 7.2
736
+ */
729
737
protected void addRangeUni (TrueTypeFont ttf , Map <Integer , int []> longTag , boolean includeMetrics ) {
730
738
if (!subset && (subsetRanges != null || ttf .getDirectoryOffset () > 0 )) {
731
739
int [] rg = subsetRanges == null && ttf .getDirectoryOffset () > 0
@@ -753,16 +761,6 @@ protected void addRangeUni(TrueTypeFont ttf, Map<Integer, int[]> longTag, boolea
753
761
}
754
762
}
755
763
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
-
766
764
private void convertToBytes (Glyph glyph , ByteBuffer result ) {
767
765
int code = glyph .getCode ();
768
766
longTag .add (code );
0 commit comments