[OpenJDK 2D-Dev] [PATCH] support Mongolian and FVS(Mongolian Free Variation Selector)

Nakajima Akira nakajima.akira at nttcom.co.jp
Fri Jun 22 07:43:30 UTC 2018


Hi Steven.

Sorry, I forgot read this E-Mail.
I will check this site next week.
 > https://www.unicode.org/L2/topical/mongolian/


Thanks.
Akira Nakajima

On 2018/06/22 1:14, Steven R. Loomis wrote:
> There is much discussion about the encoding of Mongolian- see
> https://www.unicode.org/L2/topical/mongolian/
>
> Is this discussion taken into account?
>
>
> On Wed, Jun 20, 2018 at 10:28 AM Phil Race <philip.race at oracle.com
> <mailto:philip.race at oracle.com>> wrote:
>
>     It is not clear to me how this supports Free Variation Selectors for
>     Mongolian as claimed.
>     Mongolian has its own variation selectors 0X180B-D.
>
>     When applied on top of the previous patch, it might .. since with the
>     patch below
>     Mongolian will then always go through TextLayout, and the harfbuzz
>     layout code
>     is being updated to support them. But I don't think it will work
>     without
>     that patch.
>     Is that your understanding ?
>
>     Can you turn your "sample" into something that looks like a test
>     (see the
>     other patch) and use \UNNNN escapes for all the non-ascii text.
>
>     Also bear in mind that adding this does not make Mongolian a "supported
>     writing system"
>     for Oracle JDK .. the supported writing systems are just a few, even
>     though many
>     more work just fine.
>
>     -phil.
>
>
>     On 06/20/2018 12:41 AM, Nakajima Akira wrote:
>     > Hi All.
>     >
>     > Now, SWING does not display Mongolian correctly.
>     >
>     >  # See "Mongolian Glyph Convergence", etc..
>     > http://www.unicode.org/versions/Unicode10.0.0/ch13.pdf#G27803
>     >
>     >
>     > This is patch for support Mongolian and FVS(Mongolian Free Variation
>     > Selector).
>     >  # This patch is separated from JDK-8187100.
>     >
>     > I checked on CentOS 7.5 and Windows7 SP1 x64.
>     > Patch works properly or not is unknown on other OS(Mac etc..).
>     > It will be helpful if person having environment check it.
>     >
>     > Thanks.
>     > Akira Nakajima
>     >
>     >
>     > ====================
>     > PATCH
>     > ====================
>     > diff -r e1b3def12624
>     > src/java.desktop/share/classes/sun/font/FontUtilities.java
>     > --- a/src/java.desktop/share/classes/sun/font/FontUtilities.java Wed
>     > Jun 13 06:35:04 2018 +0200
>     > +++ b/src/java.desktop/share/classes/sun/font/FontUtilities.java Wed
>     > Jun 13 14:14:08 2018 +0900
>     > @@ -299,6 +299,9 @@
>     >          else if (code <= 0x17ff) { // 1780 - 17FF Khmer
>     >              return true;
>     >          }
>     > +        else if (code <= 0x18af) { // 1800 - 18AF Mongolian
>     > (including FVS)
>     > +            return true;
>     > +        }
>     >          else if (code < 0x200c) {
>     >              return false;
>     >          }
>     >
>     >
>     >
>     > ====================
>     > Sample (mongol2.java)
>     > ====================
>     > import javax.swing.*;
>     > import java.awt.Font;
>     > import java.awt.BorderLayout;
>     >
>     > public class mongol2 extends JFrame{
>     >
>     >   public static void main(String[] args) {
>     >     mongol2 frame = new mongol2();
>     >
>     >     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>     >     frame.setBounds(10, 10, 650, 700);
>     >     frame.setVisible(true);
>     >   }
>     >
>     >   mongol2() {
>     >     String family = "Mongolian Art";
>     >
>     >     String str[] = new String[9];
>     >     str[0] = new String("ᠤ ᠷ ᠲ ᠤ   --> ᠤᠷᠲᠤ (urtu)\n");
>     >     str[1] = new String("ᠣ ᠷ ᠳ ᠤ   --> ᠣᠷᠳᠤ (ordu)\n");
>     >     str[2] = new String("ᠡ ᠨ ᠳ ᠡ   --> ᠡᠨᠳᠡ (ende)\n");
>     >     str[3] = new String("ᠠ ᠳ ᠠ     --> ᠠᠳᠠ  (ada)\n");
>     >     str[4] = new String("ᠠ ᠪ ᠤ   --> ᠠᠪᠤ (abu)\n");
>     >     str[5] = new String("ᠣ ᠳ ᠣ   --> ᠣᠳᠣ (odo)\n");
>     >     str[6] = new String("ᠡ ᠨ ᠡ   --> ᠡᠨᠡ (ene)\n");
>     >     str[7] = new String("ᠭ ᠠ  --> ᠭᠠ (gal)\n");
>     >     str[8] = new String("ᠭ᠋ ᠠ  --> ᠭ᠋ᠠ (gal+U+180B)\n");
>     >
>     >     String str_for_area = new String("");
>     >     for (int i=0; i<9; i++) {
>     >       str_for_area += str[i].toString();
>     >     }
>     >
>     >     JTextArea area = new JTextArea(str_for_area, 9, 10);
>     >     area.setFont(new Font(family, 0, 48));
>     >
>     >     JPanel p = new JPanel();
>     >     p.add(area);
>     >     getContentPane().add(p, BorderLayout.CENTER);
>     >   }
>     > }
>     >
>     >
>     > --------------------------------------
>     > Company: NTT Comware Corporation
>     > Name: Akira Nakajima
>     > E-Mail: nakajima.akira at nttcom.co.jp
>     <mailto:nakajima.akira at nttcom.co.jp>
>     > --------------------------------------


More information about the 2d-dev mailing list