From 4355a51f227616ee0fd231db1b7619155f188de0 Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Fri, 11 Jul 2008 06:03:47 +0000 Subject: * removed the auxiliary GtkWindow * added font preview to the SvgFonts dialog (bzr r6254) --- src/display/nr-svgfonts.cpp | 33 --------------------------------- src/display/nr-svgfonts.h | 8 ++++---- 2 files changed, 4 insertions(+), 37 deletions(-) (limited to 'src/display') diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp index 7b0b4938b..b59d0569d 100644 --- a/src/display/nr-svgfonts.cpp +++ b/src/display/nr-svgfonts.cpp @@ -22,29 +22,6 @@ #include "inkscape-cairo.h" #include "nr-svgfonts.h" -//***********************************// -// SvgFontDrawingArea Implementation // -//***********************************// -class SvgFontDrawingArea : Gtk::DrawingArea{ -public: -SvgFontDrawingArea(SvgFont* svgfont){ - this->svgfont = svgfont; -} -private: -SvgFont* svgfont; - -bool on_expose_event (GdkEventExpose *event){ - Glib::RefPtr window = get_window(); - Cairo::RefPtr cr = window->create_cairo_context(); - cr->set_font_face( Cairo::RefPtr(new Cairo::FontFace(this->svgfont->get_font_face(), false /* does not have reference */)) ); - cr->set_font_size (100); - cr->move_to (100, 100); - cr->show_text ("A@!A!@A"); - - return TRUE; -} -};//class SvgFontDrawingArea - //*************************// // UserFont Implementation // //*************************// @@ -98,16 +75,6 @@ SvgFont::SvgFont(SPFont* spfont){ this->font = spfont; this->missingglyph = NULL; this->userfont = NULL; - - //This is an auxiliary gtkWindow used only while we do not have proper Pango integration with cairo-user-fonts. - Gtk::Window* window; - SvgFontDrawingArea* font_da; - - window = new Gtk::Window(); - window->set_default_size (1200, 850); - font_da = new SvgFontDrawingArea(this); - window->add((Gtk::Widget&) *font_da); - window->show_all(); } cairo_status_t diff --git a/src/display/nr-svgfonts.h b/src/display/nr-svgfonts.h index 58840e414..ff98f521f 100644 --- a/src/display/nr-svgfonts.h +++ b/src/display/nr-svgfonts.h @@ -14,12 +14,12 @@ */ #include "cairo.h" -#include +//#include #include -#include -#include -#include // for cairo helper functions +//#include +//#include +//#include // for cairo helper functions #include "../sp-glyph.h" #include "../sp-missing-glyph.h" -- cgit v1.2.3