Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / sp-font-face.cpp
index a5894f83a23cfbaf34aac0fe30f9bf93d99e0cf5..93e2eeac82ea178191b3c006b50d3ed1303640c9 100644 (file)
@@ -3,7 +3,6 @@
 #endif
 
 #ifdef ENABLE_SVG_FONTS
-#define __SP_FONTFACE_C__
 
 /*
  * SVG <font-face> element implementation
@@ -14,6 +13,7 @@
  *
  * Author:
  *   Felipe C. da S. Sanches <juca@members.fsf.org>
+ *   Abhishek Sharma
  *
  * Copyright (C) 2008, Felipe C. da S. Sanches
  *
@@ -403,39 +403,39 @@ static void sp_fontface_build(SPObject *object, SPDocument *document, Inkscape::
         ((SPObjectClass *) (parent_class))->build(object, document, repr);
     }
 
-    object->readAttr( "font-family");
-    object->readAttr( "font-style");
-    object->readAttr( "font-variant");
-    object->readAttr( "font-weight");
-    object->readAttr( "font-stretch");
-    object->readAttr( "font-size");
-    object->readAttr( "unicode-range");
-    object->readAttr( "units-per-em");
-    object->readAttr( "panose-1");
-    object->readAttr( "stem-v");
-    object->readAttr( "stem-h");
-    object->readAttr( "slope");
-    object->readAttr( "cap-height");
-    object->readAttr( "x-height");
-    object->readAttr( "accent-height");
-    object->readAttr( "ascent");
-    object->readAttr( "descent");
-    object->readAttr( "widths");
-    object->readAttr( "bbox");
-    object->readAttr( "ideographic");
-    object->readAttr( "alphabetic");
-    object->readAttr( "mathematical");
-    object->readAttr( "ranging");
-    object->readAttr( "v-ideogaphic");
-    object->readAttr( "v-alphabetic");
-    object->readAttr( "v-mathematical");
-    object->readAttr( "v-hanging");
-    object->readAttr( "underline-position");
-    object->readAttr( "underline-thickness");
-    object->readAttr( "strikethrough-position");
-    object->readAttr( "strikethrough-thickness");
-    object->readAttr( "overline-position");
-    object->readAttr( "overline-thickness");
+    object->readAttr( "font-family" );
+    object->readAttr( "font-style" );
+    object->readAttr( "font-variant" );
+    object->readAttr( "font-weight" );
+    object->readAttr( "font-stretch" );
+    object->readAttr( "font-size" );
+    object->readAttr( "unicode-range" );
+    object->readAttr( "units-per-em" );
+    object->readAttr( "panose-1" );
+    object->readAttr( "stem-v" );
+    object->readAttr( "stem-h" );
+    object->readAttr( "slope" );
+    object->readAttr( "cap-height" );
+    object->readAttr( "x-height" );
+    object->readAttr( "accent-height" );
+    object->readAttr( "ascent" );
+    object->readAttr( "descent" );
+    object->readAttr( "widths" );
+    object->readAttr( "bbox" );
+    object->readAttr( "ideographic" );
+    object->readAttr( "alphabetic" );
+    object->readAttr( "mathematical" );
+    object->readAttr( "ranging" );
+    object->readAttr( "v-ideogaphic" );
+    object->readAttr( "v-alphabetic" );
+    object->readAttr( "v-mathematical" );
+    object->readAttr( "v-hanging" );
+    object->readAttr( "underline-position" );
+    object->readAttr( "underline-thickness" );
+    object->readAttr( "strikethrough-position" );
+    object->readAttr( "strikethrough-thickness" );
+    object->readAttr( "overline-position" );
+    object->readAttr( "overline-thickness" );
 }
 
 static void sp_fontface_children_modified(SPFontFace */*sp_fontface*/)
@@ -780,39 +780,39 @@ static void
 sp_fontface_update(SPObject *object, SPCtx *ctx, guint flags)
 {
     if (flags & (SP_OBJECT_MODIFIED_FLAG)) {
-        object->readAttr( "font-family");
-        object->readAttr( "font-style");
-        object->readAttr( "font-variant");
-        object->readAttr( "font-weight");
-        object->readAttr( "font-stretch");
-        object->readAttr( "font-size");
-        object->readAttr( "unicode-range");
-        object->readAttr( "units-per-em");
-        object->readAttr( "panose-1");
-        object->readAttr( "stemv");
-        object->readAttr( "stemh");
-        object->readAttr( "slope");
-        object->readAttr( "cap-height");
-        object->readAttr( "x-height");
-        object->readAttr( "accent-height");
-        object->readAttr( "ascent");
-        object->readAttr( "descent");
-        object->readAttr( "widths");
-        object->readAttr( "bbox");
-        object->readAttr( "ideographic");
-        object->readAttr( "alphabetic");
-        object->readAttr( "mathematical");
-        object->readAttr( "hanging");
-        object->readAttr( "v-ideographic");
-        object->readAttr( "v-alphabetic");
-        object->readAttr( "v-mathematical");
-        object->readAttr( "v-hanging");
-        object->readAttr( "underline-position");
-        object->readAttr( "underline-thickness");
-        object->readAttr( "strikethrough-position");
-        object->readAttr( "strikethrough-thickness");
-        object->readAttr( "overline-position");
-        object->readAttr( "overline-thickness");
+        object->readAttr( "font-family" );
+        object->readAttr( "font-style" );
+        object->readAttr( "font-variant" );
+        object->readAttr( "font-weight" );
+        object->readAttr( "font-stretch" );
+        object->readAttr( "font-size" );
+        object->readAttr( "unicode-range" );
+        object->readAttr( "units-per-em" );
+        object->readAttr( "panose-1" );
+        object->readAttr( "stemv" );
+        object->readAttr( "stemh" );
+        object->readAttr( "slope" );
+        object->readAttr( "cap-height" );
+        object->readAttr( "x-height" );
+        object->readAttr( "accent-height" );
+        object->readAttr( "ascent" );
+        object->readAttr( "descent" );
+        object->readAttr( "widths" );
+        object->readAttr( "bbox" );
+        object->readAttr( "ideographic" );
+        object->readAttr( "alphabetic" );
+        object->readAttr( "mathematical" );
+        object->readAttr( "hanging" );
+        object->readAttr( "v-ideographic" );
+        object->readAttr( "v-alphabetic" );
+        object->readAttr( "v-mathematical" );
+        object->readAttr( "v-hanging" );
+        object->readAttr( "underline-position" );
+        object->readAttr( "underline-thickness" );
+        object->readAttr( "strikethrough-position" );
+        object->readAttr( "strikethrough-thickness" );
+        object->readAttr( "overline-position" );
+        object->readAttr( "overline-thickness" );
     }
 
     if (((SPObjectClass *) parent_class)->update) {
@@ -866,8 +866,8 @@ static Inkscape::XML::Node *sp_fontface_write(SPObject *object, Inkscape::XML::D
     sp_repr_set_svg_double(repr, "overline-thickness", face->overline_thickness);
 
     if (repr != SP_OBJECT_REPR(object)) {
-               /*/ In all COPY_ATTR given below the XML tree is 
-                being used directly while it shouldn't be.*/
+        // In all COPY_ATTR given below the XML tree is 
+        //  being used directly while it shouldn't be.
         COPY_ATTR(repr, object->getRepr(), "font-family");
         COPY_ATTR(repr, object->getRepr(), "font-style");
         COPY_ATTR(repr, object->getRepr(), "font-variant");