21 auto font_dict = pdfium::MakeRetain<CPDF_Dictionary>();
22 font_dict->SetNewFor<CPDF_Name>(
"Encoding",
"Identity−H");
25 auto descendant_fonts = pdfium::MakeRetain<CPDF_Array>();
27 auto descendant_font = pdfium::MakeRetain<CPDF_Dictionary>();
28 descendant_font->SetNewFor<CPDF_Name>(
"BaseFont",
"CourierStd");
29 descendant_fonts->Append(
std::move(descendant_font));
31 font_dict->SetFor(
"DescendantFonts",
std::move(descendant_fonts));
34 auto font = pdfium::MakeRetain<CPDF_CIDFont>(&doc,
std::move(font_dict));
35 ASSERT_TRUE(font->Load());
42 }
static constexpr kTestCases[] = {
48 for (
const auto& test_case : kTestCases) {
49 EXPECT_EQ(test_case.glyph,
50 font->GlyphFromCharCode(test_case.charcode,
nullptr));