summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-13 11:32:36 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-13 11:32:36 -0700
commit98367f3ef7dc76c856db1c8a3721bef5f9b7adfc (patch)
treeb0f9533e42d1d2383bc3667db84095b53a971ac8 /samples/pdfium_test.cc
parentd8b5e73d8609b74e6a995ee1768d20d47bd4b089 (diff)
downloadpdfium-98367f3ef7dc76c856db1c8a3721bef5f9b7adfc.tar.xz
Revert "Allow external font-path configuration from pdfium_test."
This reverts commit d8b5e73d8609b74e6a995ee1768d20d47bd4b089. Broke corpus tests TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1292153002 .
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc26
1 files changed, 3 insertions, 23 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 5a171c3933..0d76b63f26 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -46,7 +46,6 @@ struct Options {
std::string scale_factor_as_string;
std::string exe_path;
std::string bin_directory;
- std::string font_directory;
};
// Reads the entire contents of a file into a newly malloc'd buffer.
@@ -348,15 +347,7 @@ bool ParseCommandLine(const std::vector<std::string>& args,
return false;
}
options->output_format = OUTPUT_PNG;
- } else if (cur_arg.size() > 11 &&
- cur_arg.compare(0, 11, "--font-dir=") == 0) {
- if (!options->font_directory.empty()) {
- fprintf(stderr, "Duplicate --font-dir argument\n");
- return false;
- }
- options->font_directory = cur_arg.substr(11);
}
-
#ifdef _WIN32
else if (cur_arg == "--emf") {
if (options->output_format != OUTPUT_NONE) {
@@ -569,9 +560,8 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
static const char usage_string[] =
"Usage: pdfium_test [OPTION] [FILE]...\n"
- " --bin-dir=<path> - override path to v8 external data\n"
- " --font-dir=<path> - override path to external fonts\n"
- " --scale=<number> - scale output size by number (e.g. 0.5)\n"
+ " --bin-dir=<path> - override path to v8 external data\n"
+ " --scale=<number> - scale output size by number (e.g. 0.5)\n"
#ifdef _WIN32
" --bmp - write page images <pdf-name>.<page-number>.bmp\n"
" --emf - write page meta files <pdf-name>.<page-number>.emf\n"
@@ -609,17 +599,7 @@ int main(int argc, const char* argv[]) {
v8::V8::SetSnapshotDataBlob(&snapshot);
#endif // V8_USE_EXTERNAL_STARTUP_DATA
- if (!options.font_directory.empty()) {
- const char* path_array[2];
- path_array[0] = options.font_directory.c_str();
- path_array[1] = nullptr;
- FPDF_LIBRARY_CONFIG config;
- config.version = 1;
- config.m_pUserFontPaths = path_array;
- FPDF_InitLibraryWithConfig(&config);
- } else {
- FPDF_InitLibrary();
- }
+ FPDF_InitLibrary();
UNSUPPORT_INFO unsuppored_info;
memset(&unsuppored_info, '\0', sizeof(unsuppored_info));