summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2008-06-22 23:12:31 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2008-06-22 23:12:31 +0000
commit820be5c37a43bc0fa5761e960e8549583d53ebd6 (patch)
tree9847f0cf9e5920943063299d9e01d23e33f9468e /src/libnrtype
parentwarning cleanup (diff)
downloadinkscape-820be5c37a43bc0fa5761e960e8549583d53ebd6.tar.gz
inkscape-820be5c37a43bc0fa5761e960e8549583d53ebd6.zip
warning cleanup
(bzr r6025)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libnrtype/FontInstance.cpp36
2 files changed, 22 insertions, 18 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 98846b77f..760ee87b6 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -228,6 +228,9 @@ style_name_compare(char const *aa, char const *bb)
return strcasecmp(a, b);
}
+/*
+ defined but not used:
+
static int
style_record_compare(void const *aa, void const *bb)
{
@@ -252,6 +255,7 @@ static void font_factory_style_list_destructor(NRStyleList *list)
}
if ( list->records ) g_free(list->records);
}
+*/
/**
* On Win32 performs a stricmp(a,b), otherwise does a strcasecmp(a,b)
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp
index 228a34f83..840cff4a1 100644
--- a/src/libnrtype/FontInstance.cpp
+++ b/src/libnrtype/FontInstance.cpp
@@ -261,53 +261,53 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int
} else if ( strcmp(key,"style") == 0 ) {
PangoStyle v=pango_font_description_get_style(descr);
if ( v == PANGO_STYLE_ITALIC ) {
- res="italic";
+ res=(char*)"italic";
} else if ( v == PANGO_STYLE_OBLIQUE ) {
- res="oblique";
+ res=(char*)"oblique";
} else {
- res="normal";
+ res=(char*)"normal";
}
free_res=false;
} else if ( strcmp(key,"weight") == 0 ) {
PangoWeight v=pango_font_description_get_weight(descr);
if ( v <= PANGO_WEIGHT_ULTRALIGHT ) {
- res="200";
+ res=(char*)"200";
} else if ( v <= PANGO_WEIGHT_LIGHT ) {
- res="300";
+ res=(char*)"300";
} else if ( v <= PANGO_WEIGHT_NORMAL ) {
- res="normal";
+ res=(char*)"normal";
} else if ( v <= PANGO_WEIGHT_BOLD ) {
- res="bold";
+ res=(char*)"bold";
} else if ( v <= PANGO_WEIGHT_ULTRABOLD ) {
- res="800";
+ res=(char*)"800";
} else { // HEAVY
- res="900";
+ res=(char*)"900";
}
free_res=false;
} else if ( strcmp(key,"stretch") == 0 ) {
PangoStretch v=pango_font_description_get_stretch(descr);
if ( v <= PANGO_STRETCH_EXTRA_CONDENSED ) {
- res="extra-condensed";
+ res=(char*)"extra-condensed";
} else if ( v <= PANGO_STRETCH_CONDENSED ) {
- res="condensed";
+ res=(char*)"condensed";
} else if ( v <= PANGO_STRETCH_SEMI_CONDENSED ) {
- res="semi-condensed";
+ res=(char*)"semi-condensed";
} else if ( v <= PANGO_STRETCH_NORMAL ) {
- res="normal";
+ res=(char*)"normal";
} else if ( v <= PANGO_STRETCH_SEMI_EXPANDED ) {
- res="semi-expanded";
+ res=(char*)"semi-expanded";
} else if ( v <= PANGO_STRETCH_EXPANDED ) {
- res="expanded";
+ res=(char*)"expanded";
} else {
- res="extra-expanded";
+ res=(char*)"extra-expanded";
}
free_res=false;
} else if ( strcmp(key,"variant") == 0 ) {
PangoVariant v=pango_font_description_get_variant(descr);
if ( v == PANGO_VARIANT_SMALL_CAPS ) {
- res="small-caps";
+ res=(char*)"small-caps";
} else {
- res="normal";
+ res=(char*)"normal";
}
free_res=false;
} else {