The parsing for the property unicode-range under @font-face rules drops special characters and as such will not be translated correctly.
The following will result in invalid CSS
final String css = "@font-face{\n" + " unicode-range: U+0000-00FF, U+4??\n" + " }"; CSSOMParser cssomParser = new CSSOMParser(new SACParserCSS3()); CSSStyleSheet cssStyleSheet = cssomParser.parseStyleSheet(new InputSource(new StringReader(css)), null, null); CSSRuleList cssRules = cssStyleSheet.getCssRules(); assertEquals(1,cssRules.getLength()); assertEquals(css, cssRules.item(0));
The parser strips leading zeroes, which is fine. But it also strips '+','-','?' which leads to unusable css.
Anonymous
Did a first impl, please report if it solves your case.
A snapshot build is available.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
tested with 0.9.21-SNAPSHOT, parser now correctly keeps the unicode-range unchanged
Thnaks for your feedback, will close this.