sp-font.cpp revision 6fd67bd386767141cc557108237de0a257300516
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef ENABLE_SVG_FONTS
#define __SP_FONT_C__
/*
* SVG <font> element implementation
*
* Author:
* Felipe C. da S. Sanches <felipe.sanches@gmail.com>
*
* Copyright (C) 2008, Felipe C. da S. Sanches
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "attributes.h"
#include "sp-font.h"
#include "sp-glyph.h"
#include "sp-missing-glyph.h"
#include "document.h"
#include "helper-fns.h"
#include "display/nr-svgfonts.h"
static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_font_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
// static gchar *sp_font_description(SPItem *item);
static SPObjectClass *parent_class;
GType sp_font_get_type(void)
{
if (!type) {
sizeof(SPFontClass),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(SPFont),
16, /* n_preallocs */
NULL, /* value_table */
};
}
return type;
}
{
}
{
font->horiz_origin_x = 0;
font->horiz_origin_y = 0;
font->horiz_adv_x = 0;
//I think we should have extra stuff here and in the set method in order to set default value as specified at http://www.w3.org/TR/SVG/fonts.html
font->vert_origin_x = 0;
font->vert_origin_y = 0;
font->vert_adv_y = 0;
}
{
}
}
{
if (SP_IS_GLYPH(node)){
g_warning("We have a <glyph> childnode:\n\td=%s\n\tvert-origin-x=%f\n\tvert-origin-y=%f\n\tvert-adv-y=%f", ((SPGlyph*)node)->d, ((SPGlyph*)node)->vert_origin_x, ((SPGlyph*)node)->vert_origin_y, ((SPGlyph*)node)->vert_adv_y );
}
if (SP_IS_MISSING_GLYPH(node)){
g_warning("We have a <missing-glyph> childnode:\n\td=%s\n\thoriz-origin-x=%f\n\thoriz-origin-y=%f\n\thoriz-adv-x=%f", ((SPMissingGlyph*)node)->d, ((SPMissingGlyph*)node)->vert_origin_x, ((SPMissingGlyph*)node)->vert_origin_y, ((SPMissingGlyph*)node)->vert_adv_y );
}
// if (SP_IS_FONT_FACE_SRC(node)){
// }
}
}
/**
* Callback for child_added event.
*/
static void
{
}
/**
* Callback for remove_child event.
*/
static void
{
}
{
//SPFont *font = SP_FONT(object);
}
}
{
double number;
switch (key) {
case SP_ATTR_HORIZ_ORIGIN_X:
}
break;
case SP_ATTR_HORIZ_ORIGIN_Y:
}
break;
case SP_ATTR_HORIZ_ADV_X:
}
break;
case SP_ATTR_VERT_ORIGIN_X:
}
break;
case SP_ATTR_VERT_ORIGIN_Y:
}
break;
case SP_ATTR_VERT_ADV_Y:
}
break;
default:
}
break;
}
}
/**
* Receives update notifications.
*/
static void
{
if (flags & (SP_OBJECT_MODIFIED_FLAG)) {
}
}
}
static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
}
}
}
return repr;
}
#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :