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

An extension in Graphics interface for glyph-base text drawing.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx

      The problem is that Webkit (and our FX port - webnode) has BIDI string machinery and CSS support for letters/words spacing in shared code. The final Webkit callback for rendering is coming in format of glyph array and array of advances:
      WCGraphicsPrismContext.drawString(WCFont f, int[] glyphs,
                                          float[] advanceDXY, // ar(advanceDXY) = 2 * ar(glyphs): dx and dy for each glyph.
                                          float x, float y);
      To reach up the correct implementation we need an extension in Graphics interface for glyph-base text drawing with signature:
      Graphics.drawGlyphs( FontStrike fs,
                                          int[] glyphCodes, // glyph codes (can be ligature)
                                          float[] advancesX, // dx offsets for next glyph
                                          float[] advancesY,// dy offsets for next glyph in baseline
                                          float x, float y);
      ar(glyphCodes) = ar(advancesX) = ar(advancesY)

            prr Philip Race
            uta Alexey Utkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: