On Tue, Nov 10, 2009 at 11:06:30PM +0100, Johannes Hofmann wrote:
Hi Jorge,
On Tue, Nov 10, 2009 at 06:46:45PM -0300, Jorge Arellano Cid wrote:
Hi,
On some sites I get weird fonts. Today I got to isolate the problem. See attached file. Here it displays like this:
http://www.dillo.org/test/xmp2.png
The embedded CSS says:
pre { font-family: MS Courier New, Courier, monospace; }
If I remove "MS Courier New", it works OK. Any clues?
There are multiple issues with font selection:
* The CSS parser only returns the part until the first blank ('MS' in this case). * StyleEngine currently does not handle comma separated font name lists (see \todo comment). * ::fltk::font(name, fa); in fltkplatform.cc does not offer a way to determine whether a font with that name actually exists on the system. Instead if no exact match can be found, it guesses a replacement font. This makes it impossible for dillo to choose the right one from a given list.
In your specific case, fltk gets the string 'MS' and on your system it seems to find some funny font that has a similar name.
Thanks for the detailed explanation. -- Cheers Jorge.-