42 auto font_file_stream = doc.NewIndirect<CPDF_Stream>(
45 pdfium::MakeRetain<CPDF_Dictionary>());
46 ASSERT_TRUE(font_file_stream);
47 const uint32_t stream_object_number = font_file_stream->GetObjNum();
48 ASSERT_GT(stream_object_number, 0u);
50 auto font_descriptor_dict = pdfium::MakeRetain<CPDF_Dictionary>();
51 font_descriptor_dict->SetFor(
"FontFile", pdfium::MakeRetain<CPDF_Reference>(
52 &doc, stream_object_number));
54 auto font_dict = pdfium::MakeRetain<CPDF_Dictionary>();
55 font_dict->SetNewFor<CPDF_Name>(
"BaseFont",
"CHEESE+Swiss");
56 font_dict->SetFor(
"FontDescriptor",
std::move(font_descriptor_dict));
58 auto font = pdfium::MakeRetain<TestSimpleFont>(&doc,
std::move(font_dict));
59 ASSERT_TRUE(font->Load());
60 EXPECT_EQ(
"Swiss", font->GetBaseFontName());