summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6cde89)
raw | patch | inline | side by side (parent: a6cde89)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Fri, 18 Jul 2008 05:49:46 +0000 (05:49 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Fri, 18 Jul 2008 05:49:46 +0000 (05:49 +0000) |
diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp
index fdab91bc354390be0d118d7494437ba2cc4cc729..c4197406b3d2fa7d76f89b83c8d9636d68ff702f 100644 (file)
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
@@ -496,19 +496,11 @@ static void sp_fontface_set(SPObject *object, unsigned int key, const gchar *val
style = sp_read_fontFaceStyleType(value);
if (face->font_style.size() != style.size()){
face->font_style = style;
-g_warning("<font-face>: SP_ATTR_FONT_STYLE:");
- for (unsigned int i=0;i<style.size();i++){
- g_warning("enum value: %d", style[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<style.size();i++){
if(style[i] != face->font_style[i]){
face->font_style = style;
-g_warning("<font-face>: SP_ATTR_FONT_STYLE:");
- for (unsigned int i=0;i<style.size();i++){
- g_warning("enum value: %d", style[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
variant = sp_read_fontFaceVariantType(value);
if (face->font_variant.size() != variant.size()){
face->font_variant = variant;
-g_warning("<font-face>: SP_ATTR_FONT_VARIANT:");
- for (unsigned int i=0;i<variant.size();i++){
- g_warning("enum value: %d", variant[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<variant.size();i++){
if(variant[i] != face->font_variant[i]){
face->font_variant = variant;
-g_warning("<font-face>: SP_ATTR_FONT_VARIANT:");
- for (unsigned int i=0;i<variant.size();i++){
- g_warning("- %d", variant[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
weight = sp_read_fontFaceWeightType(value);
if (face->font_weight.size() != weight.size()){
face->font_weight = weight;
-g_warning("<font-face>: SP_ATTR_FONT_WEIGHT:");
- for (unsigned int i=0;i<weight.size();i++){
- g_warning("enum value: %d", weight[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<weight.size();i++){
if(weight[i] != face->font_weight[i]){
face->font_weight = weight;
-g_warning("<font-face>: SP_ATTR_FONT_WEIGHT:");
- for (unsigned int i=0;i<weight.size();i++){
- g_warning("enum value: %d", weight[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
stretch = sp_read_fontFaceStretchType(value);
if (face->font_stretch.size() != stretch.size()){
face->font_stretch = stretch;
-g_warning("<font-face>: SP_ATTR_FONT_STRETCH:");
- for (unsigned int i=0;i<stretch.size();i++){
- g_warning("enum value: %d", stretch[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<stretch.size();i++){
if(stretch[i] != face->font_stretch[i]){
face->font_stretch = stretch;
-g_warning("<font-face>: SP_ATTR_FONT_STRETCH:");
- for (unsigned int i=0;i<stretch.size();i++){
- g_warning("enum value: %d", stretch[i]);
- }
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
number = helperfns_read_number(value);
if (number != face->units_per_em){
face->units_per_em = number;
-g_warning("<font-face>: SP_ATTR_UNITS_PER_EM: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->stemv){
face->stemv = number;
-g_warning("<font-face>: SP_ATTR_STEMV: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->stemh){
face->stemh = number;
-g_warning("<font-face>: SP_ATTR_STEMH: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->slope){
face->slope = number;
-g_warning("<font-face>: SP_ATTR_SLOPE: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->cap_height){
face->cap_height = number;
-g_warning("<font-face>: SP_ATTR_CAP_HEIGHT: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->x_height){
face->x_height = number;
-g_warning("<font-face>: SP_ATTR_X_HEIGHT: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->accent_height){
face->accent_height = number;
-g_warning("<font-face>: SP_ATTR_ACCENT_HEIGHT: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->ascent){
face->ascent = number;
-g_warning("<font-face>: SP_ATTR_ASCENT: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->descent){
face->descent = number;
-g_warning("<font-face>: SP_ATTR_DESCENT: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->ideographic){
face->ideographic = number;
-g_warning("<font-face>: SP_ATTR_IDEOGRAPHIC: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->alphabetic){
face->alphabetic = number;
-g_warning("<font-face>: SP_ATTR_ALPHABETIC: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->mathematical){
face->mathematical = number;
-g_warning("<font-face>: SP_ATTR_MATHEMATICAL: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->hanging){
face->hanging = number;
-g_warning("<font-face>: SP_ATTR_HANGING: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->v_ideographic){
face->v_ideographic = number;
-g_warning("<font-face>: SP_ATTR_V_IDEOGRAPHIC: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->v_alphabetic){
face->v_alphabetic = number;
-g_warning("<font-face>: SP_ATTR_V_ALPHABETIC: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->v_mathematical){
face->v_mathematical = number;
-g_warning("<font-face>: SP_ATTR_V_MATHEMATICAL: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->v_hanging){
face->v_hanging = number;
-g_warning("<font-face>: SP_ATTR_V_HANGING: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->underline_position){
face->underline_position = number;
-g_warning("<font-face>: SP_ATTR_UNDERLINE_POSITION: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->underline_thickness){
face->underline_thickness = number;
-g_warning("<font-face>: SP_ATTR_UNDERLINE_THICKNESS: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->strikethrough_position){
face->strikethrough_position = number;
-g_warning("<font-face>: SP_ATTR_STRIKETHROUGH_POSITION: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->strikethrough_thickness){
face->strikethrough_thickness = number;
-g_warning("<font-face>: SP_ATTR_STRIKETHROUGH_THICKNESS: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->overline_position){
face->overline_position = number;
-g_warning("<font-face>: SP_ATTR_OVERLINE_POSITION: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != face->overline_thickness){
face->overline_thickness = number;
-g_warning("<font-face>: SP_ATTR_OVERLINE_THICKNESS: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
diff --git a/src/sp-font.cpp b/src/sp-font.cpp
index 789d3a62a95111076a72e9df9b1c926f0e9ac9d0..f586e6c62362e2e649263ed760125439876f47a2 100644 (file)
--- a/src/sp-font.cpp
+++ b/src/sp-font.cpp
@@ -109,18 +109,6 @@ static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML:
static void sp_font_children_modified(SPFont *sp_font)
{
- SPObject* node = sp_font->children;
- for(;node;node=node->next){
- 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)){
-// }
- }
}
/**
number = helperfns_read_number(value);
if (number != font->horiz_origin_x){
font->horiz_origin_x = number;
-g_warning("<font>: SP_ATTR_HORIZ_ORIGIN_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != font->horiz_origin_y){
font->horiz_origin_y = number;
-g_warning("<font>: SP_ATTR_HORIZ_ORIGIN_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != font->horiz_adv_x){
font->horiz_adv_x = number;
-g_warning("<font>: SP_ATTR_HORIZ_ADV_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != font->vert_origin_x){
font->vert_origin_x = number;
-g_warning("<font>: SP_ATTR_VERT_ORIGIN_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != font->vert_origin_y){
font->vert_origin_y = number;
-g_warning("<font>: SP_ATTR_VERT_ORIGIN_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != font->vert_adv_y){
font->vert_adv_y = number;
-g_warning("<font>: SP_ATTR_VERT_ADV_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
index b3d0e8cbae681ec12985c36e1cd2fb6ce7998a65..bd5340b6b25b7d7bcf08e9a8e86a1008bae4e49c 100644 (file)
--- a/src/sp-glyph-kerning.cpp
+++ b/src/sp-glyph-kerning.cpp
@@ -150,38 +150,32 @@ static void sp_glyph_kerning_set(SPObject *object, unsigned int key, const gchar
{
SPGlyphKerning * glyphkern = (SPGlyphKerning*) object; //even if it is a VKern this will work. I did it this way just to avoind warnings.
double number;
- const char* tag = (SP_IS_HKERN(object) ? "hkern" : "vkern");
switch (key) {
case SP_ATTR_U1:
if (glyphkern->u1) delete glyphkern->u1;
glyphkern->u1 = new UnicodeRange(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<%s>: SP_ATTR_U1: %s", tag, value);
- break;
+ break;
case SP_ATTR_U2:
if (glyphkern->u2) delete glyphkern->u2;
glyphkern->u2 = new UnicodeRange(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<%s>: SP_ATTR_U2: %s", tag, value);
- break;
+ break;
case SP_ATTR_G1:
if (glyphkern->g1) delete glyphkern->g1;
glyphkern->g1 = new GlyphNames(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<%s>: SP_ATTR_G1: %s", tag, value);
- break;
+ break;
case SP_ATTR_G2:
if (glyphkern->g2) delete glyphkern->g2;
glyphkern->g2 = new GlyphNames(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<%s>: SP_ATTR_G2: %s", tag, value);
break;
case SP_ATTR_K:
number = helperfns_read_number(value);
if (number != glyphkern->k){
glyphkern->k = number;
-g_warning("<%s>: SP_ATTR_K: %f", tag, number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
break;
}
-///should free tag?
}
/**
if (flags & SP_OBJECT_MODIFIED_FLAG) {
/* do something to trigger redisplay, updates? */
sp_object_read_attr(object, "u1");
- sp_object_read_attr(object, "g1");
sp_object_read_attr(object, "u2");
sp_object_read_attr(object, "g2");
sp_object_read_attr(object, "k");
diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp
index 5b2cc2decfca5d2bcbaee735fe964adcdca5bd99..fb7cea15deb275ea2676b03bc57b6bc2c29f7f5e 100644 (file)
--- a/src/sp-glyph.cpp
+++ b/src/sp-glyph.cpp
@@ -154,19 +154,16 @@ static void sp_glyph_set(SPObject *object, unsigned int key, const gchar *value)
if (glyph->unicode) g_free(glyph->unicode);
glyph->unicode = g_strdup(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<glyph>: SP_ATTR_UNICODE: %s", value);
- break;
+ break;
case SP_ATTR_GLYPH_NAME:
if (glyph->glyph_name) g_free(glyph->glyph_name);
glyph->glyph_name = g_strdup(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<glyph>: SP_ATTR_GLYPH_NAME: %s", value);
- break;
+ break;
case SP_ATTR_D:
if (glyph->d) g_free(glyph->d);
glyph->d = g_strdup(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<glyph>: SP_ATTR_D: %s", value);
break;
case SP_ATTR_ORIENTATION:
orient = sp_glyph_read_orientation(value);
glyph->orientation = orient;
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
-g_warning("<glyph>: SP_ATTR_ORIENTATION: %d", orient);
break;
case SP_ATTR_ARABIC_FORM:
form = sp_glyph_read_arabic_form(value);
glyph->arabic_form = form;
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
-g_warning("<glyph>: SP_ATTR_ARABIC_FORM: %d", glyph->arabic_form);
break;
case SP_ATTR_LANG:
if (glyph->lang) g_free(glyph->lang);
glyph->lang = g_strdup(value);
-g_warning("<glyph>: SP_ATTR_LANG: %s", value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_ATTR_HORIZ_ADV_X:
number = helperfns_read_number(value);
if (number != glyph->horiz_adv_x){
glyph->horiz_adv_x = number;
-g_warning("<glyph>: SP_ATTR_HORIZ_ADV_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_origin_x){
glyph->vert_origin_x = number;
-g_warning("<glyph>: SP_ATTR_VERT_ORIGIN_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_origin_y){
glyph->vert_origin_y = number;
-g_warning("<glyph>: SP_ATTR_VERT_ORIGIN_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_adv_y){
glyph->vert_adv_y = number;
-g_warning("<glyph>: SP_ATTR_VERT_ADV_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
index 7ed6c9bb6ec89e151495ba4964398a5e36a38cb2..ffc29a71ed45ff9c622f15d02c069d57d5343b71 100644 (file)
--- a/src/sp-missing-glyph.cpp
+++ b/src/sp-missing-glyph.cpp
@@ -109,13 +109,11 @@ static void sp_missing_glyph_set(SPObject *object, unsigned int key, const gchar
if (glyph->d) g_free(glyph->d);
glyph->d = g_strdup(value);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
-g_warning("<missing-glyph>: SP_ATTR_D: %s", value);
break;
case SP_ATTR_HORIZ_ADV_X:
number = helperfns_read_number(value);
if (number != glyph->horiz_adv_x){
glyph->horiz_adv_x = number;
-g_warning("<missing-glyph>: SP_ATTR_HORIZ_ADV_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_origin_x){
glyph->vert_origin_x = number;
-g_warning("<missing-glyph>: SP_ATTR_VERT_ORIGIN_X: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_origin_y){
glyph->vert_origin_y = number;
-g_warning("<missing-glyph>: SP_ATTR_VERT_ORIGIN_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
number = helperfns_read_number(value);
if (number != glyph->vert_adv_y){
glyph->vert_adv_y = number;
-g_warning("<missing-glyph>: SP_ATTR_VERT_ADV_Y: %f", number);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;