File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
fontbox/src/test/java/org/apache/fontbox/ttf Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2020import static org .junit .jupiter .api .Assertions .fail ;
2121
2222import java .io .IOException ;
23+ import java .io .InputStream ;
2324
2425import org .apache .fontbox .ttf .gsub .GSUBTablePrintUtil ;
2526import org .apache .fontbox .ttf .model .GsubData ;
@@ -39,10 +40,10 @@ public class GSUBTableDebugger
3940 @ Test
4041 void printLohitBengaliTTF ()
4142 {
42- try
43+ try (InputStream is1 = GSUBTableDebugger .class .getResourceAsStream (LOHIT_BENGALI_FONT_FILE );
44+ InputStream is2 = GSUBTableDebugger .class .getResourceAsStream (LOHIT_BENGALI_FONT_FILE ))
4345 {
44- RandomAccessReadBuffer randomAccessReadBuffer = new RandomAccessReadBuffer (
45- GSUBTableDebugger .class .getResourceAsStream (LOHIT_BENGALI_FONT_FILE ));
46+ RandomAccessReadBuffer randomAccessReadBuffer = new RandomAccessReadBuffer (is1 );
4647 RandomAccessReadDataStream randomAccessReadBufferDataStream = new RandomAccessReadDataStream (
4748 randomAccessReadBuffer );
4849
@@ -53,8 +54,7 @@ void printLohitBengaliTTF()
5354 glyphSubstitutionTable .read (null , randomAccessReadBufferDataStream );
5455
5556 TrueTypeFont trueTypeFont = new TTFParser ()
56- .parse (new RandomAccessReadBuffer (
57- GSUBTableDebugger .class .getResourceAsStream (LOHIT_BENGALI_FONT_FILE )));
57+ .parse (new RandomAccessReadBuffer (is2 ));
5858
5959 GsubData gsubData = glyphSubstitutionTable .getGsubData ();
6060 new GSUBTablePrintUtil ().printCharacterToGlyph (gsubData ,
You can’t perform that action at this time.
0 commit comments