On Tue, 2010-08-24 at 14:46 +0200, Lukasz Sromek wrote: > The problem lies in deciding whether user want custom sizes, or the > default values should be used.
Well, that's easy enough to model: provide a User-Agent stylesheet containing the default values, and then have the user's choices represented as a User stylesheet. See the CSS specification for the relationship between User-Agent, Author, and User stylesheets. You should not try to model style information outside the world of CSS, as that's pretty much impossible with LibCSS (the exception being the presentational hint callback, which is very limited in its application and totally unsuitable for application defaults). > I'm using compute_font_size callback from netsurf sources and after > calling css_computed_font_size I get 12pt no matter whether user > explicitly set 12pt or didn't specify font-size at all. The compute_font_size callback is used to convert relative font sizes into absolute ones. The relative font sizes are taken from whatever CSS is specified in the stylesheets in the selection context. Quite where 12pt is coming from, I can't tell without more information. Is that what you set option_font_size to? (I'm assuming you took nscss_compute_font_size verbatim, and supplied the appropriate glue to make it work in your application). J.
