Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CSS generic font family bug?

5 views
Skip to first unread message

Hans Mogren

unread,
Feb 12, 2006, 10:05:33 AM2/12/06
to
It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
respect the CSS font-family settings (Preferences / Advanced / Fonts). For
example, my chosen sans-serif font is DejaVu Sans, but an element with the
"font-family: sans-serif" style applied is not displayed in this font, but
instead in something that looks like Verdana. The same problem occurs with
each one of the CSS generic font families. In Opera 8.51 it works as
expected, but I have not tested it in 9.0 Preview 1.

Can anyone confirm this issue? If this is indeed a bug I would guess that
it's already known, no? Anyway, a small test case is located at <URL:
http://www.bymarken.net/tmp/opera9-font-test.html >

--
Hans Mogren
http://hans.bymarken.net/

Richard Stonehouse

unread,
Feb 12, 2006, 4:39:41 PM2/12/06
to

Sounds the same as I'm getting - see posting:

"Opera 9p2 font preferences - possible regression?"

--
Richard Stonehouse
(Richard at R Stonehouse dot Co dot U.K.)

Tim Altman

unread,
Feb 13, 2006, 4:54:53 AM2/13/06
to

Shouldn't this only be possible when "My fonts and colors" is checked
in Author mode? See View > Style > Manage modes.

--
Tim Altman
Core QA
Opera Software
Remove NO SPAM from e-mail address to reply

Hans Mogren

unread,
Feb 13, 2006, 1:00:48 PM2/13/06
to
On Mon, 13 Feb 2006 10:54:53 +0100, Tim Altman <do....@spam.me.invalid>
wrote:

> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"
> <ha...@bymarken.invalid> wrote:
>
>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>> For example, my chosen sans-serif font is DejaVu Sans, but an element
>> with the "font-family: sans-serif" style applied is not displayed in
>> this font, but instead in something that looks like Verdana.

> Shouldn't this only be possible when "My fonts and colors" is checked


> in Author mode? See View > Style > Manage modes.

It doesn't matter whether this is checked or not. I've always browsed in
User mode and I have all the five switcehs turned on (page style sheet,
page fonts and colors, etc.). And like I said, this is new behaviour in
Opera 9. Do you get the correct result?

Hans Mogren

unread,
Feb 13, 2006, 1:02:54 PM2/13/06
to
On Sun, 12 Feb 2006 22:39:41 +0100, Richard Stonehouse
<ric...@stonehouse.invalid> wrote:

> On 2006-02-12, Hans Mogren <ha...@bymarken.invalid> wrote:
>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>

> Sounds the same as I'm getting - see posting:
>
> "Opera 9p2 font preferences - possible regression?"

Yeah, pls see my posting in that thread.

Hans Mogren

unread,
Feb 13, 2006, 3:40:38 PM2/13/06
to
On Mon, 13 Feb 2006 10:54:53 +0100, Tim Altman <do....@spam.me.invalid>
wrote:

> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"


> <ha...@bymarken.invalid> wrote:
>
>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>> For
>> example, my chosen sans-serif font is DejaVu Sans, but an element with
>> the
>> "font-family: sans-serif" style applied is not displayed in this font,
>> but
>> instead in something that looks like Verdana.

> Shouldn't this only be possible when "My fonts and colors" is checked


> in Author mode? See View > Style > Manage modes.

It doesn't matter whether this is checked or not. I've always browsed in


User mode and I have all the five switcehs turned on (page style sheet,
page fonts and colors, etc.). And like I said, this is new behaviour in
Opera 9. Do you get the correct result?

--
Hans Mogren
http://hans.bymarken.net/

Tim Altman

unread,
Feb 14, 2006, 11:47:13 AM2/14/06
to
On Mon, 13 Feb 2006 21:40:38 +0100, "Hans Mogren"
<ha...@bymarken.invalid> wrote:

>On Mon, 13 Feb 2006 10:54:53 +0100, Tim Altman <do....@spam.me.invalid>
>wrote:
>
>> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"
>> <ha...@bymarken.invalid> wrote:
>>
>>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>>> For
>>> example, my chosen sans-serif font is DejaVu Sans, but an element with
>>> the
>>> "font-family: sans-serif" style applied is not displayed in this font,
>>> but
>>> instead in something that looks like Verdana.
>
>> Shouldn't this only be possible when "My fonts and colors" is checked
>> in Author mode? See View > Style > Manage modes.
>
>It doesn't matter whether this is checked or not. I've always browsed in
>User mode and I have all the five switcehs turned on (page style sheet,
>page fonts and colors, etc.). And like I said, this is new behaviour in
>Opera 9. Do you get the correct result?

Yes, it works as I described in Author mode and user mode.

Richard Stonehouse

unread,
Feb 14, 2006, 1:57:09 PM2/14/06
to

Aha! That fixes it for me - had forgotten that one when setting up the
latest preview. Thanks!

BTW I think this is the second time I've made this particular blunder
<grovel> - am I the only person who makes it? Or do others find it a
bit counter-intuitive that fonts, specified in Prefs/Advanced/Fonts,
only take effect when Style/Manage modes/My fonts and colours is set
(in a far distant part of the User Interface)? If the latter I might
post a change request in opera.wishlist.

Hans Mogren

unread,
Feb 14, 2006, 2:28:18 PM2/14/06
to
On Tue, 14 Feb 2006 17:47:13 +0100, Tim Altman <do....@spam.me.invalid>
wrote:

> On Mon, 13 Feb 2006 21:40:38 +0100, "Hans Mogren"
> <ha...@bymarken.invalid> wrote:
>
>> On Mon, 13 Feb 2006 10:54:53 +0100, Tim Altman <do....@spam.me.invalid>
>> wrote:
>>
>>> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"
>>> <ha...@bymarken.invalid> wrote:
>>>
>>>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>>>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>>

>>> Shouldn't this only be possible when "My fonts and colors" is checked
>>> in Author mode? See View > Style > Manage modes.
>>
>> It doesn't matter whether this is checked or not. I've always browsed in
>> User mode and I have all the five switcehs turned on (page style sheet,
>> page fonts and colors, etc.). And like I said, this is new behaviour in
>> Opera 9. Do you get the correct result?
>
> Yes, it works as I described in Author mode and user mode.

I'm sorry, but I'm not sure I follow you here. What I see on my end is
that an element with styled with "font-family: sans-serif" and another
element styled with "font-family: 'DejaVu Sans'" is not displayed the
same, although they should be since my sans-serif font of choice is DejaVu
Sans. I've had Opera set up this way since way back and this is the first
version that has worked this way. Please tell me if there is something
that I've misunderstood, since from my point of view it looks like a bug,
or at least a new feature :)

Tim Altman

unread,
Feb 17, 2006, 6:42:38 AM2/17/06
to
On Tue, 14 Feb 2006 20:28:18 +0100, "Hans Mogren"
<ha...@bymarken.invalid> wrote:

>On Tue, 14 Feb 2006 17:47:13 +0100, Tim Altman <do....@spam.me.invalid>
>wrote:
>
>> On Mon, 13 Feb 2006 21:40:38 +0100, "Hans Mogren"
>> <ha...@bymarken.invalid> wrote:
>>
>>> On Mon, 13 Feb 2006 10:54:53 +0100, Tim Altman <do....@spam.me.invalid>
>>> wrote:
>>>
>>>> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"
>>>> <ha...@bymarken.invalid> wrote:
>>>>
>>>>> It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>>>>> respect the CSS font-family settings (Preferences / Advanced / Fonts).
>>>
>>>> Shouldn't this only be possible when "My fonts and colors" is checked
>>>> in Author mode? See View > Style > Manage modes.
>>>
>>> It doesn't matter whether this is checked or not. I've always browsed in
>>> User mode and I have all the five switcehs turned on (page style sheet,
>>> page fonts and colors, etc.). And like I said, this is new behaviour in
>>> Opera 9. Do you get the correct result?
>>
>> Yes, it works as I described in Author mode and user mode.
>
>I'm sorry, but I'm not sure I follow you here. What I see on my end is
>that an element with styled with "font-family: sans-serif" and another
>element styled with "font-family: 'DejaVu Sans'" is not displayed the
>same, although they should be since my sans-serif font of choice is DejaVu
>Sans.

Ahh, yes, we were talking about different things. I thought you meant
overriding the author-specified font. However, I tested what you
described and it's working fine for me.

Tim Altman

unread,
Feb 17, 2006, 6:43:06 AM2/17/06
to
On Tue, 14 Feb 2006 18:57:09 +0000 (UTC), Richard Stonehouse
<ric...@stonehouse.invalid> wrote:

>On 2006-02-13, Tim Altman <do....@spam.me.invalid> wrote:
>> On Sun, 12 Feb 2006 16:05:33 +0100, "Hans Mogren"
>><ha...@bymarken.invalid> wrote:
>>
>>>It seems like Opera 9.0 Preview 2 (Windows 2000, build 8212) does not
>>>respect the CSS font-family settings (Preferences / Advanced / Fonts). For
>>>example, my chosen sans-serif font is DejaVu Sans, but an element with the
>>>"font-family: sans-serif" style applied is not displayed in this font, but
>>>instead in something that looks like Verdana. The same problem occurs with
>>>each one of the CSS generic font families. In Opera 8.51 it works as
>>>expected, but I have not tested it in 9.0 Preview 1.
>>>
>>>Can anyone confirm this issue? If this is indeed a bug I would guess that
>>>it's already known, no? Anyway, a small test case is located at <URL:
>>>http://www.bymarken.net/tmp/opera9-font-test.html >
>>
>> Shouldn't this only be possible when "My fonts and colors" is checked
>> in Author mode? See View > Style > Manage modes.
>
>Aha! That fixes it for me - had forgotten that one when setting up the
>latest preview. Thanks!

You're welcome. :)

Jonathan Black

unread,
Feb 21, 2006, 9:33:40 AM2/21/06
to
On Tue, Feb 14, 2006 at 08:28:18PM +0100, Hans Mogren wrote:
> I'm sorry, but I'm not sure I follow you here. What I see on my end is
> that an element with styled with "font-family: sans-serif" and another
> element styled with "font-family: 'DejaVu Sans'" is not displayed the
> same, although they should be since my sans-serif font of choice is
> DejaVu Sans. I've had Opera set up this way since way back and this is
> the first version that has worked this way. Please tell me if there is
> something that I've misunderstood, since from my point of view it looks
> like a bug, or at least a new feature :)

I'm seeing the same problem. My sans-serif font setting is "Bitstream
Vera Sans Mono", but Opera is using some other font (looks like Arial).
However, if I change the setting to something else, it does take effect
(so I can in fact get my desired Bitstream font by first changing the
setting to something else, and then changing it back again). But after
restarting Opera, it goes back to the "buggy default" Arial font.

--
jonathaN

S.V. Groeneveld

unread,
Feb 21, 2006, 9:43:08 AM2/21/06
to
On Tue, 21 Feb 2006 15:33:40 +0100, Jonathan Black <vam...@gmail.com>
wrote:

> I'm seeing the same problem. My sans-serif font setting is "Bitstream
> Vera Sans Mono", but Opera is using some other font (looks like Arial).
> However, if I change the setting to something else, it does take effect
> (so I can in fact get my desired Bitstream font by first changing the
> setting to something else, and then changing it back again). But after
> restarting Opera, it goes back to the "buggy default" Arial font.

Yes, it happens here as well. I see Verdana, while my setting is
"Trebuchet". And just like you said, after changing the setting the
problem is fixed for that session, but it happens again after a restart of
Opera.

Tim Altman

unread,
Feb 22, 2006, 4:41:24 AM2/22/06
to

I still can't reproduce. Here's what I'm doing:

1) Set the CSS font-family sans-serif font to Arial
2) Load an HTML file using a specified font (Arial) and a generic font
family (see below)
3) Change the CSS font-family sans-serif font to Bitstream Vera Sans
Mono
4) Verify that the fonts are different
5) Restart Opera
6) Verify that the fonts are still different

Here's
the HTML file I'm using:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Foo</title>
<style type="text/css">
p {
font-family: sans-serif;
}
div {
font-family: Arial;
}
</style>
</head>
<body>

<p>sans-serif (unspecified)</p>

<div>sans-serif (Arial)</div>

</body>
</html>

S.V. Groeneveld

unread,
Feb 22, 2006, 5:42:39 AM2/22/06
to
On Wed, 22 Feb 2006 10:41:24 +0100, Tim Altman <do....@spam.me.invalid>
wrote:
>

Using your HTML file and following the steps you described, I still see
the bug:
Indeed after step 6 the fonts are different, but the sans-serif text is
displayed as "Verdana", instead of the "Comic Sans" I selected in step 3
which was properly used in step 4.

I'm using Opera 9.00 (TP2) build 8225 on Windows XP.

Jonathan Black

unread,
Feb 22, 2006, 11:03:34 AM2/22/06
to
On Wed, Feb 22, 2006 at 10:41:24AM +0100, Tim Altman wrote:
> I still can't reproduce. Here's what I'm doing:
>
> 1) Set the CSS font-family sans-serif font to Arial
> 2) Load an HTML file using a specified font (Arial) and a generic font
> family (see below)
> 3) Change the CSS font-family sans-serif font to Bitstream Vera Sans
> Mono
> 4) Verify that the fonts are different
> 5) Restart Opera
> 6) Verify that the fonts are still different

Well, all OK up to step 6, where the fonts are no longer different for
me. Here's what they look like in steps 2, 4 and 6, respectively:

http://beacon.dhs.org/pub/opera9font.html

(Incidently, I mistakenly said that my sans-serif font was BVS *Mono*,
which would be a strange choice, it is in fact BVS, but this is not
relevant to the problem, which appears to occur regardless of which font
one tries to use.)

I can only add that I am using Opera 9 build 1656 on Debian GNU/Linux,
but S.V. Groeneveld seems to be reproducing the problem on Windows XP
too, albeit that in his case the font which Opera incorrectly falls back
to upon restart is Verdana, not Arial, if this could be a hint in any
way.

> Here's the HTML file I'm using:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <title>Foo</title>
> <style type="text/css">
> p {
> font-family: sans-serif;
> }
> div {
> font-family: Arial;
> }
> </style>
> </head>
> <body>
>
> <p>sans-serif (unspecified)</p>
>
> <div>sans-serif (Arial)</div>
>
> </body>
> </html>

Bye,
--
jonathaN

Jonathan Black

unread,
Feb 25, 2006, 11:43:43 AM2/25/06
to
On Wed, Feb 22, 2006 at 04:03:34PM +0000, Jonathan Black wrote:
> On Wed, Feb 22, 2006 at 10:41:24AM +0100, Tim Altman wrote:
> > I still can't reproduce. Here's what I'm doing:
>
> > 1) Set the CSS font-family sans-serif font to Arial
> > 2) Load an HTML file using a specified font (Arial) and a generic
> > font family (see below)
> > 3) Change the CSS font-family sans-serif font to Bitstream Vera
> > Sans Mono
> > 4) Verify that the fonts are different
> > 5) Restart Opera
> > 6) Verify that the fonts are still different
>
> Well, all OK up to step 6, where the fonts are no longer different for
> me. Here's what they look like in steps 2, 4 and 6, respectively:
>
> http://beacon.dhs.org/pub/opera9font.html
>
> (Incidently, I mistakenly said that my sans-serif font was BVS *Mono*,
> which would be a strange choice, it is in fact BVS, but this is not
> relevant to the problem, which appears to occur regardless of which
> font one tries to use.)
>
> I can only add that I am using Opera 9 build 1656 on Debian GNU/Linux,
> but S.V. Groeneveld seems to be reproducing the problem on Windows XP
> too, albeit that in his case the font which Opera incorrectly falls
> back to upon restart is Verdana, not Arial, if this could be a hint in
> any way.

The bug is still present in Friday's UNIX build 1670.

A few more observations:

- The bug isn't limited to sans-serif, but affects all the CSS
font-family settings: serif, sans-serif, cursive, fantasy and
monospace.

(I see this was already implied in Hans Mogren's original report).

- To obtain the correct fonts (i.e. after they have been reset to the
incorrect values upon Opera startup), it isn't actually necessary to
change the setting to something else and change it back again; it is
sufficient to bring up the Select Font dialogue for the family in
question, click OK, and OK again on the underlying Preferences
dialogue.

- When running Opera with the '-debugfont' commandline option, I see
the following:

-----
Autodetecting generic CSS fonts (will be overridden by preference
settings):
[...]
Score for sans-serif font Arial [monotype]: 16
[...]
Score for sans-serif font Bitstream Vera Sans [bitstream]: 15
[...]
And the winners are:
serif: Times New Roman [monotype]
sans-serif: Arial [monotype]
cursive: Impact [monotype]
fantasy: Comic Sans MS [microsoft]
monospace: Courier New [monotype]
-----

These indeed are the fonts Opera is using upon startup. They do
appear to be the rightful winners according to the scores listed in
this debug output, but the problem is in the part "will be
overridden by preference settings". Opera seems to be forgetting
about this promise, until one manually nudges the preference
settings in question.

Bye,
--
jonathaN

Tim Altman

unread,
May 16, 2006, 6:24:26 PM5/16/06
to

Thank you for this additional information. I've added it to the bug
report we have on this issue.

0 new messages