From babf87c4230a815fd2f24c304d18a7af9a1b98e9 Mon Sep 17 00:00:00 2001 From: JucaBlues Date: Tue, 26 Feb 2008 19:01:40 +0000 Subject: [PATCH] more SVGFonts boilerplate code --- src/Makefile_insert | 1 + src/attributes.cpp | 8 ++++++++ src/attributes.h | 9 +++++++++ src/sp-font.h | 6 ++++++ src/sp-object-repr.cpp | 2 ++ 5 files changed, 26 insertions(+) diff --git a/src/Makefile_insert b/src/Makefile_insert index d37cb9b59..201f8aaf2 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -205,6 +205,7 @@ libinkpre_a_SOURCES = \ sp-flowdiv.h sp-flowdiv.cpp \ sp-flowregion.h sp-flowregion.cpp \ sp-flowtext.h sp-flowtext.cpp \ + sp-font.cpp sp-font.h \ sp-gaussian-blur.cpp sp-gaussian-blur.h \ sp-gaussian-blur-fns.h \ sp-gradient-fns.h \ diff --git a/src/attributes.cpp b/src/attributes.cpp index c00268b96..4a24e18a6 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -307,6 +307,14 @@ static SPStyleProp const props[] = { {SP_ATTR_ADDITIVE, "additive"}, {SP_ATTR_ACCUMULATE, "accumulate"}, + /* SVGFonts */ + {SP_ATTR_HORIZ_ORIGIN_X, "horiz-origin-x"}, + {SP_ATTR_HORIZ_ORIGIN_Y, "horiz-origin-y"}, + {SP_ATTR_HORIZ_ADV_X, "horiz-adv-x"}, + {SP_ATTR_VERT_ORIGIN_X, "vert-origin-x"}, + {SP_ATTR_VERT_ORIGIN_Y, "vert-origin-y"}, + {SP_ATTR_VERT_ADV_Y, "vert-adv-y"}, + /* XML */ {SP_ATTR_XML_SPACE, "xml:space"}, diff --git a/src/attributes.h b/src/attributes.h index 89b3f4d04..2817685a9 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -307,6 +307,15 @@ enum SPAttributeEnum { SP_ATTR_ADDITIVE, SP_ATTR_ACCUMULATE, + /* SVGFonts */ + /* SPFont */ + SP_ATTR_HORIZ_ORIGIN_X, + SP_ATTR_HORIZ_ORIGIN_Y, + SP_ATTR_HORIZ_ADV_X, + SP_ATTR_VERT_ORIGIN_X, + SP_ATTR_VERT_ORIGIN_Y, + SP_ATTR_VERT_ADV_Y, + /* XML */ SP_ATTR_XML_SPACE, diff --git a/src/sp-font.h b/src/sp-font.h index 0b8ea7ffb..3ec866ccc 100644 --- a/src/sp-font.h +++ b/src/sp-font.h @@ -21,6 +21,12 @@ #define SP_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_FONT)) struct SPFont : public SPObject { + double horiz_origin_x; + double horiz_origin_y; + double horiz_adv_x; + double vert_origin_x; + double vert_origin_y; + double vert_adv_y; }; struct SPFontClass { diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp index 57e9ef986..577ff1690 100644 --- a/src/sp-object-repr.cpp +++ b/src/sp-object-repr.cpp @@ -43,6 +43,7 @@ #include "sp-flowdiv.h" #include "sp-flowregion.h" #include "sp-flowtext.h" +#include "sp-font.h" #include "sp-style-elem.h" #include "sp-switch.h" #include "color-profile-fns.h" @@ -139,6 +140,7 @@ populate_dtables() { "svg:flowRegionExclude", SP_TYPE_FLOWREGIONEXCLUDE }, { "svg:flowRoot", SP_TYPE_FLOWTEXT }, { "svg:flowSpan", SP_TYPE_FLOWTSPAN }, + { "svg:font", SP_TYPE_FONT }, { "svg:g", SP_TYPE_GROUP }, { "svg:feBlend", SP_TYPE_FEBLEND }, { "svg:feColorMatrix", SP_TYPE_FECOLORMATRIX }, -- 2.39.5