Menu

#68 unicode-range drops characters

0.9.21
closed
RBRi
None
1
2016-11-22
2016-11-11
No

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.

Discussion

  • RBRi

    RBRi - 2016-11-11
    • status: open --> pending
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2016-11-11

    Did a first impl, please report if it solves your case.
    A snapshot build is available.

     
  • Anonymous

    Anonymous - 2016-11-22

    tested with 0.9.21-SNAPSHOT, parser now correctly keeps the unicode-range unchanged

     
  • RBRi

    RBRi - 2016-11-22

    Thnaks for your feedback, will close this.

     
  • RBRi

    RBRi - 2016-11-22
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.