In message <1297713411.8764.20.camel@duiker>
          John-Mark Bell <j...@netsurf-browser.org> wrote:

> On Sun, 2011-02-13 at 17:03 +0000, Richard Porter wrote:
> > On 13 Feb 2011 Dave Higton  wrote:
> > 
> > > My experiments yesterday and today show that Netsurf ignores font
> > > attributes within HTML, e.g.
> > 
> > > <font face="monospace"> (and all the other generic face types)
> > > are ignored, whereas the equivalent within a CSS is obeyed.
> > 
> > > Is this a deliberate design decision?
> 
> No. It's a bug.
> 
> > I think this is the usual problem that priority has been given to CSS 
> > over plain html and anything that is "deprecated" even if it's in 
> > widespread use. The size and color attributes are supported though.
> 
> This is not the case. 
> 
> There is a defined place in the CSS cascade for these legacy
> presentational hints. However, until we replaced NetSurf's original CSS
> implementation with libcss, there was no mechanism for allowing the
> presentational hints to be used when determining the styling of an
> element. What support did exist for them at the time mostly comprised
> layers of ugly hackery to approximate the right thing. Invariably, this
> went wrong.
> 
> Today, however, we do have the appropriate hooks in place. Thus
> supporting all of these legacy presentational hints is relatively
> trivial and totally opaque to most of the browser.
> 
> If someone feels adventurous, they could compare section 10.2 of the
> HTML5 specification (specifically, anything where "presentational hint"
> is mentioned) with the node_presentational_hint function in css/select.c
> in NetSurf's sources to see what's missing.

Thanks for your response, John.

It's curious that two so similar constructions behave so differently:

<p><font face="monospace">         doesn't work;

<p style="font-family:monospace">  does work, so that's gone into my
web site.  I hope it's acceptable; the w3c checker said my page is
valid HTML 4.01 transitional, so I guess it must be.

Dave

Reply via email to