@@ -26,14 +26,12 @@ This file is part of the iText (R) project.
26
26
import com .itextpdf .io .font .PdfEncodings ;
27
27
import com .itextpdf .io .font .TrueTypeFont ;
28
28
import com .itextpdf .io .font .otf .Glyph ;
29
- import com .itextpdf .kernel .exceptions .PdfException ;
30
29
import com .itextpdf .kernel .exceptions .KernelExceptionMessageConstant ;
30
+ import com .itextpdf .kernel .exceptions .PdfException ;
31
31
import com .itextpdf .kernel .pdf .PdfDictionary ;
32
32
import com .itextpdf .kernel .pdf .PdfDocument ;
33
33
import com .itextpdf .kernel .pdf .PdfName ;
34
34
import com .itextpdf .kernel .pdf .PdfReader ;
35
- import com .itextpdf .kernel .pdf .PdfWriter ;
36
- import com .itextpdf .kernel .utils .CompareTool ;
37
35
import com .itextpdf .test .ExtendedITextTest ;
38
36
import com .itextpdf .test .annotations .type .UnitTest ;
39
37
@@ -112,4 +110,22 @@ public void appendThreeSurrogatePairsTest() throws IOException {
112
110
type0Font .appendGlyphs (textWithThreeSurrogatePairs , 0 , textWithThreeSurrogatePairs .length () - 1 , glyphs );
113
111
Assert .assertEquals (3 , glyphs .size ());
114
112
}
113
+
114
+ @ Test
115
+ public void getUniMapFromOrderingTest () {
116
+ Assert .assertEquals ("UniCNS-UTF16-H" , PdfType0Font .getUniMapFromOrdering ("CNS1" , true ));
117
+ Assert .assertEquals ("UniCNS-UTF16-V" , PdfType0Font .getUniMapFromOrdering ("CNS1" , false ));
118
+
119
+ Assert .assertEquals ("UniJIS-UTF16-H" , PdfType0Font .getUniMapFromOrdering ("Japan1" , true ));
120
+ Assert .assertEquals ("UniJIS-UTF16-V" , PdfType0Font .getUniMapFromOrdering ("Japan1" , false ));
121
+
122
+ Assert .assertEquals ("UniKS-UTF16-H" , PdfType0Font .getUniMapFromOrdering ("Korea1" , true ));
123
+ Assert .assertEquals ("UniKS-UTF16-V" , PdfType0Font .getUniMapFromOrdering ("Korea1" , false ));
124
+
125
+ Assert .assertEquals ("UniGB-UTF16-H" , PdfType0Font .getUniMapFromOrdering ("GB1" , true ));
126
+ Assert .assertEquals ("UniGB-UTF16-V" , PdfType0Font .getUniMapFromOrdering ("GB1" , false ));
127
+
128
+ Assert .assertEquals ("Identity-H" , PdfType0Font .getUniMapFromOrdering ("Identity" , true ));
129
+ Assert .assertEquals ("Identity-V" , PdfType0Font .getUniMapFromOrdering ("Identity" , false ));
130
+ }
115
131
}
0 commit comments