diff options
Diffstat (limited to 'src/sp-font.cpp')
| -rw-r--r-- | src/sp-font.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sp-font.cpp b/src/sp-font.cpp index 0a7c63e33..d7eafe84e 100644 --- a/src/sp-font.cpp +++ b/src/sp-font.cpp @@ -23,7 +23,7 @@ #include "display/nr-svgfonts.h" -G_DEFINE_TYPE(SPFont, sp_font, SP_TYPE_OBJECT); +G_DEFINE_TYPE(SPFont, sp_font, G_TYPE_OBJECT); static void sp_font_class_init(SPFontClass *fc) { @@ -43,8 +43,9 @@ CFont::CFont(SPFont* font) : CObject(font) { CFont::~CFont() { } -static void sp_font_init(SPFont *font) -{ +SPFont::SPFont() : SPObject() { + SPFont* font = this; + font->cfont = new CFont(font); font->typeHierarchy.insert(typeid(SPFont)); @@ -59,6 +60,11 @@ static void sp_font_init(SPFont *font) font->vert_adv_y = FNT_UNITS_PER_EM; } +static void sp_font_init(SPFont *font) +{ + new (font) SPFont(); +} + void CFont::build(SPDocument *document, Inkscape::XML::Node *repr) { CObject::build(document, repr); |
