diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-11-18 04:43:16 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-11-18 04:43:16 +0000 |
| commit | 68c9f56688a6f362fb20b5576c459625f505d009 (patch) | |
| tree | 7b22237765619b2bdf432ca7ee4b09ee27c21140 /src/main.cpp | |
| parent | Improve option parsing (diff) | |
| download | inkscape-68c9f56688a6f362fb20b5576c459625f505d009.tar.gz inkscape-68c9f56688a6f362fb20b5576c459625f505d009.zip | |
patch 1219308 for embedding type 1 fonts into ps/eps output
(bzr r1977)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 60050c461..13c052d27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -134,6 +134,7 @@ enum { SP_ARG_EXPORT_EPS, SP_ARG_EXPORT_PDF, SP_ARG_EXPORT_TEXT_TO_PATH, + SP_ARG_EXPORT_FONT, SP_ARG_EXPORT_BBOX_PAGE, SP_ARG_EXTENSIONDIR, SP_ARG_SLIDESHOW, @@ -175,6 +176,7 @@ static gchar *sp_export_ps = NULL; static gchar *sp_export_eps = NULL; static gchar *sp_export_pdf = NULL; static gboolean sp_export_text_to_path = FALSE; +static gboolean sp_export_font = FALSE; static gboolean sp_export_bbox_page = FALSE; static gboolean sp_query_x = FALSE; static gboolean sp_query_y = FALSE; @@ -310,6 +312,11 @@ struct poptOption options[] = { N_("Convert text object to paths on export (EPS)"), NULL}, + {"export-embed-fonts", 'F', + POPT_ARG_NONE, &sp_export_font, SP_ARG_EXPORT_FONT, + N_("Embed fonts on export (Type 1 only) (EPS)"), + NULL}, + {"export-bbox-page", 'B', POPT_ARG_NONE, &sp_export_bbox_page, SP_ARG_EXPORT_BBOX_PAGE, N_("Export files with the bounding box set to the page size (EPS)"), @@ -994,6 +1001,7 @@ static void do_export_ps(SPDocument* doc, gchar const* uri, char const* mime) } bool old_text_to_path = false; + bool old_font_embedded = false; bool old_bbox_page = false; try { @@ -1005,6 +1013,14 @@ static void do_export_ps(SPDocument* doc, gchar const* uri, char const* mime) } try { + old_font_embedded = (*i)->get_param_bool("fontEmbedded"); + (*i)->set_param_bool("fontEmbedded", sp_export_font); + } + catch (...) { + g_warning ("Could not set export-font option for this export."); + } + + try { old_bbox_page = (*i)->get_param_bool("pageBoundingBox"); (*i)->set_param_bool("pageBoundingBox", sp_export_bbox_page); } @@ -1016,6 +1032,7 @@ static void do_export_ps(SPDocument* doc, gchar const* uri, char const* mime) try { (*i)->set_param_bool("textToPath", old_text_to_path); + (*i)->set_param_bool("fontEmbedded", old_font_embedded); (*i)->set_param_bool("pageBoundingBox", old_bbox_page); } catch (...) { |
