Hello,

I'm using libcss in my epub reader project. I'm trying to figure out the best 
way to handle font sizes in my own basic html parser.

Let's say we have the following situation: if there are no font-size 
declarations in css, I'm using 32pt font size for rendering h1, 24 for h2, 12 
for p, etc (i.e. some default sizes). If user specifies explicitly:

h1 { font-size: 48pt;}

then h1 becomes 48pt, h2 is still 24, p 12, etc, pretty straightforward.

The problem lies in deciding whether user want custom sizes, or the default 
values should be used. 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.

How is it done in netsurf? Could you give me some explanation, or specify 
source code fragment which is responsible for this?

Thanks,
Lukasz

Reply via email to