Changes to our IM formatting
mark at kingant.net
Tue Aug 4 04:40:34 EDT 2009
I've kind of noticed that IM protocols tend to use "pt" sizes when
specifying the font size. E.g. 10pt or 14pt. But AIM and maybe a few
places in libpurple and Pidgin have historically used HTML font sizes
(the ones on the crappy 1 to 7 scale). I think this sometimes leads
to a scenario where, if you send a message to yourself for example, we
convert the font size from the 1-7 scale to the pt scale then back to
the 1-7 scale, which has the potential to lose precision.
But also it's just kind of silly. It doesn't seem like the 1-7 scale
is really used anywhere else, and the font tag is deprecated in newer
versions of HTML. I suspect that AIM is capable of dealing with pt
sizes now, too.
So over the past few days I made some changes to the way we parse
incoming Yahoo IMs so that we are now able to send pt sizes to
libpurple using <span style="font-size: 10pt"> instead of <font
size="3">. Currently this only happens if libpurple is compiled with
the USE_CSS_FORMATTING define, but I think we should make this the
only supported method in 3.0.0.
Does this sound like a reasonable thing to do? I'd especially love to
hear from other UIs like Adium and Instantbird, and from Sean/Arnold
(Arnold is the summer of code student working on webkit). And for
Finch, we strip HTML before displaying IMs, right?
More information about the Devel