summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/pdfinput/pdf-input.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-04-15 21:26:22 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-04-15 21:26:22 +0000
commit7aa6a983d699472239c2be4b39540799f9291379 (patch)
tree1d018339725e6e74880bca3c7e184ff28431f55f /src/extension/internal/pdfinput/pdf-input.cpp
parentMinor French translation update. (diff)
downloadinkscape-7aa6a983d699472239c2be4b39540799f9291379.tar.gz
inkscape-7aa6a983d699472239c2be4b39540799f9291379.zip
patch 179589 with UI added: optionally, try to replace a font name specified in PDF with the closest-named local installed font (since we do not extract any fonts, nor can we embed them into svg)
(bzr r7718)
Diffstat (limited to 'src/extension/internal/pdfinput/pdf-input.cpp')
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index e34c76cb1..4a8a1eb4b 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -117,6 +117,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar *uri)
_textHandlingCombo = Gtk::manage(new class Gtk::ComboBoxText());
_textHandlingCombo->append_text(_("Import text as text"));
_textHandlingCombo->set_active_text(_("Import text as text"));
+ _localFontsCheck = Gtk::manage(new class Gtk::CheckButton(_("Replace PDF fonts by closest-named installed fonts")));
hbox5 = Gtk::manage(new class Gtk::HBox(false, 4));
_embedImagesCheck = Gtk::manage(new class Gtk::CheckButton(_("Embed images")));
@@ -211,6 +212,10 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar *uri)
_labelText->set_selectable(false);
hbox5->pack_start(*_labelText, Gtk::PACK_SHRINK, 0);
hbox5->pack_start(*_textHandlingCombo, Gtk::PACK_SHRINK, 0);
+ _localFontsCheck->set_flags(Gtk::CAN_FOCUS);
+ _localFontsCheck->set_relief(Gtk::RELIEF_NORMAL);
+ _localFontsCheck->set_mode(true);
+ _localFontsCheck->set_active(true);
_embedImagesCheck->set_flags(Gtk::CAN_FOCUS);
_embedImagesCheck->set_relief(Gtk::RELIEF_NORMAL);
_embedImagesCheck->set_mode(true);
@@ -219,6 +224,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar *uri)
vbox3->pack_start(*hbox6, Gtk::PACK_SHRINK, 0);
vbox3->pack_start(*_labelPrecisionWarning, Gtk::PACK_SHRINK, 0);
vbox3->pack_start(*hbox5, Gtk::PACK_SHRINK, 4);
+ vbox3->pack_start(*_localFontsCheck, Gtk::PACK_SHRINK, 0);
vbox3->pack_start(*_embedImagesCheck, Gtk::PACK_SHRINK, 0);
alignment4->add(*vbox3);
_labelImportSettings->set_alignment(0.5,0.5);
@@ -269,6 +275,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar *uri)
_labelText->show();
_textHandlingCombo->show();
hbox5->show();
+ _localFontsCheck->show();
_embedImagesCheck->show();
vbox3->show();
alignment4->show();
@@ -364,6 +371,11 @@ void PdfImportDialog::getImportSettings(Inkscape::XML::Node *prefs) {
}
sp_repr_set_svg_double(prefs, "approximationPrecision",
_fallbackPrecisionSlider->get_value());
+ if (_localFontsCheck->get_active()) {
+ prefs->setAttribute("localFonts", "1");
+ } else {
+ prefs->setAttribute("localFonts", "0");
+ }
if (_embedImagesCheck->get_active()) {
prefs->setAttribute("embedImages", "1");
} else {