#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/*
* SVG <font> element implementation
*
* Author:
* Felipe C. da S. Sanches <juca@members.fsf.org>
* Abhishek Sharma
*
* 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 "display/nr-svgfonts.h"
//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
this->horiz_origin_x = 0;
this->horiz_origin_y = 0;
this->horiz_adv_x = FNT_DEFAULT_ADV;
this->vert_origin_y = FNT_DEFAULT_ASCENT;
this->vert_adv_y = FNT_UNITS_PER_EM;
}
}
this->readAttr( "horiz-origin-x" );
this->readAttr( "horiz-origin-y" );
this->readAttr( "horiz-adv-x" );
this->readAttr( "vert-origin-x" );
this->readAttr( "vert-origin-y" );
this->readAttr( "vert-adv-y" );
}
/**
* Callback for child_added event.
*/
}
/**
* Callback for remove_child event.
*/
}
}
// TODO these are floating point, so some epsilon comparison would be good
switch (key) {
case SP_ATTR_HORIZ_ORIGIN_X:
{
if (number != this->horiz_origin_x){
this->horiz_origin_x = number;
}
break;
}
case SP_ATTR_HORIZ_ORIGIN_Y:
{
if (number != this->horiz_origin_y){
this->horiz_origin_y = number;
}
break;
}
case SP_ATTR_HORIZ_ADV_X:
{
if (number != this->horiz_adv_x){
this->horiz_adv_x = number;
}
break;
}
case SP_ATTR_VERT_ORIGIN_X:
{
if (number != this->vert_origin_x){
this->vert_origin_x = number;
}
break;
}
case SP_ATTR_VERT_ORIGIN_Y:
{
if (number != this->vert_origin_y){
this->vert_origin_y = number;
}
break;
}
case SP_ATTR_VERT_ADV_Y:
{
if (number != this->vert_adv_y){
this->vert_adv_y = number;
}
break;
}
default:
break;
}
}
/**
* Receives update notifications.
*/
if (flags & (SP_OBJECT_MODIFIED_FLAG)) {
this->readAttr( "horiz-origin-x" );
this->readAttr( "horiz-origin-y" );
this->readAttr( "horiz-adv-x" );
this->readAttr( "vert-origin-x" );
this->readAttr( "vert-origin-y" );
this->readAttr( "vert-adv-y" );
}
}
Inkscape::XML::Node* SPFont::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
}
// All the below COPY_ATTR funtions are directly using
// the XML Tree while they shouldn't
}
return repr;
}
/*
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 :