# HG changeset patch # User Mark Doliner # Date 1229303597 0 # Node ID dce57ce0b86008ce77d8f58c345468af51be727f # Parent bca23aa61d0ffb3626da9fe6665752ce02d141a0 Change the way we handle tags slightly. We really only support a few specific values for that css attribute--we don't support things like "12pt" for example. But this code was setting for any unknown font-size css value. So if someone specified a css font-size of 72px we set the font size to 3, which is basically the default font size, which is clearly wrong. So change this to just do nothing if we don't understand the value. diff -r bca23aa61d0f -r dce57ce0b860 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Mon Dec 15 00:40:36 2008 +0000 +++ b/pidgin/gtkimhtml.c Mon Dec 15 01:13:17 2008 +0000 @@ -3126,9 +3126,15 @@ font->size = 6; else if (g_ascii_strcasecmp(size, "xx-large") == 0) font->size = 7; - else - font->size = 3; - gtk_imhtml_font_set_size(imhtml, font->size); + + /* + * TODO: Handle other values, like percentages, or + * lengths specified as em, ex, px, in, cm, mm, pt + * or pc. Or even better, use an actual HTML + * renderer like webkit. + */ + if (font->size > 0) + gtk_imhtml_font_set_size(imhtml, font->size); } else if (oldfont) {