Hi, Im trying to use the Batik CSS engine to compute the style of elements in a document. The problem that Im having is with the font-weight property. If I set it to be say "100" for an element and "bolder" for a child element then the computed value for the child is "400" or "normal". Is this correct by the CSS spec? I think it should be "200".
If you take the interpretation that "100", "200" and "300" would jump to "normal" and "400", "500" and "600" would jump to "bold" then "600" would go to "700" etc. Then the code doesn't do this correctly either. I've appends the snippets from org.apache.batik.css.value.DefaultCommonCSSContext that do these computations which do the mapping. I have inserted comments for what I think the mapped values should be. Should I submit this as a bug or is it correct? Thanks in advance. Richard Zschech. public float getLighterFontWeight(float f) { switch ((int)f) { case 100: return 100; case 200: return 100; case 300: return 200; case 400: return 300; case 500: return 400; case 600: return 400; case 700: return 400; case 800: return 400; // should be 700 bold case 900: return 400; // should be 700 bold default: throw new IllegalArgumentException("" + f); } } public float getBolderFontWeight(float f) { switch ((int)f) { case 100: return 400; case 200: return 400; case 300: return 600; // should be 400 normal case 400: return 600; // should be 700 bold case 500: return 600; // should be 700 bold case 600: return 700; case 700: return 800; case 800: return 900; case 900: return 900; default: throw new IllegalArgumentException("" + f); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]