@Test public void convertGlyphToBytesWithEmptyEncodingTest() throws IOException { PdfSimpleFont<FontProgram> fontToTest = new TestSimpleFont(FontEncoding.createEmptyFontEncoding()); byte[] bytes = fontToTest.convertToBytes(E_GLYPH_FONT_SPECIFIC); Assert.assertArrayEquals(new byte[0], bytes); }
@Override public byte[] convertToBytes(String text) { byte[] bytes = fontEncoding.convertToBytes(text); for (byte b : bytes) { shortTag[b & 0xff] = 1; } return bytes; }
PdfSimpleFont extends PdfFont { @Override public byte[] convertToBytes(String text) { byte[] bytes = fontEncoding.convertToBytes(text); for (byte b : bytes) { shortTag[b & 0xff] = 1; } return bytes; } }
PdfSimpleFont extends PdfFont { @Override public byte[] convertToBytes(String text) { byte[] bytes = fontEncoding.convertToBytes(text); for (byte b : bytes) { shortTag[b & 0xff] = 1; } return bytes; } protected  PdfSimpleFont(PdfDictionary fontDictionary); protected  PdfSimpleFont(); }
PdfSimpleFont extends PdfFont { @Override public byte[] convertToBytes(String text) { byte[] bytes = fontEncoding.convertToBytes(text); for (byte b : bytes) { shortTag[b & 0xff] = 1; } return bytes; } protected  PdfSimpleFont(PdfDictionary fontDictionary); protected  PdfSimpleFont(); @Override boolean isBuiltWith(String fontProgram, String encoding); @Override GlyphLine createGlyphLine(String content); @Override int appendGlyphs(String text, int from, int to, List<Glyph> glyphs); @Override int appendAnyGlyph(String text, int from, List<Glyph> glyphs); FontEncoding getFontEncoding(); @Override byte[] convertToBytes(String text); @Override byte[] convertToBytes(GlyphLine glyphLine); @Override byte[] convertToBytes(Glyph glyph); @Override void writeText(GlyphLine text, int from, int to, PdfOutputStream stream); @Override void writeText(String text, PdfOutputStream stream); @Override String decode(PdfString content); @Override GlyphLine decodeIntoGlyphLine(PdfString content); @Override float getContentWidth(PdfString content); boolean isForceWidthsOutput(); void setForceWidthsOutput(boolean forceWidthsOutput); }
PdfSimpleFont extends PdfFont { @Override public byte[] convertToBytes(String text) { byte[] bytes = fontEncoding.convertToBytes(text); for (byte b : bytes) { shortTag[b & 0xff] = 1; } return bytes; } protected  PdfSimpleFont(PdfDictionary fontDictionary); protected  PdfSimpleFont(); @Override boolean isBuiltWith(String fontProgram, String encoding); @Override GlyphLine createGlyphLine(String content); @Override int appendGlyphs(String text, int from, int to, List<Glyph> glyphs); @Override int appendAnyGlyph(String text, int from, List<Glyph> glyphs); FontEncoding getFontEncoding(); @Override byte[] convertToBytes(String text); @Override byte[] convertToBytes(GlyphLine glyphLine); @Override byte[] convertToBytes(Glyph glyph); @Override void writeText(GlyphLine text, int from, int to, PdfOutputStream stream); @Override void writeText(String text, PdfOutputStream stream); @Override String decode(PdfString content); @Override GlyphLine decodeIntoGlyphLine(PdfString content); @Override float getContentWidth(PdfString content); boolean isForceWidthsOutput(); void setForceWidthsOutput(boolean forceWidthsOutput);  }