Search in sources :

Example 1 with CmapLookup

use of org.apache.fontbox.ttf.CmapLookup in project pdfbox by apache.

the class TestCMap method testPDFBox3997.

/**
 * PDFBOX-3997: test unicode that is above the basic multilingual plane, here: helicopter
 * symbol, or D83D DE81 in the Noto Emoji font.
 *
 * @throws IOException
 */
public void testPDFBox3997() throws IOException {
    try (TrueTypeFont ttf = new TTFParser().parse("target/pdfs/NotoEmoji-Regular.ttf")) {
        CmapLookup cmap = ttf.getUnicodeCmapLookup(false);
        assertEquals(886, cmap.getGlyphId(0x1F681));
    }
}
Also used : TrueTypeFont(org.apache.fontbox.ttf.TrueTypeFont) CmapLookup(org.apache.fontbox.ttf.CmapLookup) TTFParser(org.apache.fontbox.ttf.TTFParser)

Aggregations

CmapLookup (org.apache.fontbox.ttf.CmapLookup)1 TTFParser (org.apache.fontbox.ttf.TTFParser)1 TrueTypeFont (org.apache.fontbox.ttf.TrueTypeFont)1