Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8127584

WebView does not support rendering surrogate pair charcter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • fx2.0.2, fx2.1
    • javafx
    • None
    • OS: Windows 7 (64bit)

    • web

      With javafx.scene.web.WebView, when the letter is the surrogate pair character (ex: CJK Unified Ideographs Extension B), the program could not render that.

      for example:
      U+4E00 (CJK Unified Ideographs)
      <span style="font-family:SimSun-ExtB;">&#x4e00;</span>
      ... OK on usual browser
      ... OK on WebView
      U+20000 (CJK Unified Ideographs Extension B) == D840+DC00
      <span style="font-family:SimSun-ExtB;">&#x20000;</span>
      ... OK on usual browser
      ... NotGood on WebView
      <span style="font-family:SimSun-ExtB;">&#xd840;&#xdc00;</span>
      ... OK on usual browser
      ... two ? glyphs on WebView

      When NotGood, NullPointerException has occurred:
      java.lang.NullPointerException
      at com.sun.t2k.T2KFontFactory.getFontResourceByFileName(T2KFontFactory.java:482)
      at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:420)
      at com.sun.t2k.FallbackResource.getSlotResource(FallbackResource.java:168)
      at com.sun.t2k.T2KCompositeFontResource.getSlotResource(T2KCompositeFontResource.java:50)
      at com.sun.t2k.CompositeGlyphMapper.getSlotMapper(CompositeGlyphMapper.java:52)
      at com.sun.t2k.CompositeGlyphMapper.convertToGlyph(CompositeGlyphMapper.java:73)
      at com.sun.t2k.CompositeGlyphMapper.getGlyphCode(CompositeGlyphMapper.java:129)
      at com.sun.t2k.CharToGlyphMapper.charToGlyph(CharToGlyphMapper.java:116)
      at com.sun.t2k.CompositeStrike.getCharAdvance(CompositeStrike.java:183)
      at com.sun.webpane.sg.prism.WCFontImpl.getGlyphWidth(WCFontImpl.java:140)
      at com.sun.webpane.webkit.Timer.twkFireTimerEvent(Native Method)
      at com.sun.webpane.webkit.Timer.fireTimerEvent(Timer.java:66)
      at com.sun.webpane.webkit.Timer.notifyTick(Timer.java:47)
      at javafx.scene.web.WebEngine$PulseTimer$2.pulse(WebEngine.java:586)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:385)
      at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(QuantumToolkit.java:311)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
      at java.lang.Thread.run(Unknown Source)

            peterz Peter Zhelezniakov
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: