Created attachment 103496 [details] Wrong display image Android KK support Myanmar unicode. I used Padauk-book.ttf and show string myanmar unicode such as u1030,u102F... Paint paintText = new Paint(Paint.ANTI_ALIAS_FLAG); paintText.setColor(Color.BLUE); paintText.setTextSize(50); paintText.setStyle(Style.FILL); Typeface font = Typeface.createFromAsset(getAssets(), "font/Padauk-book.ttf"); paintText.setTypeface(font); String captionString = "\u1030";//or 102F Rect rectText = new Rect(); paintText.getTextBounds(captionString, 0, captionString.length(), rectText); newCanvas.drawText(captionString, 0, captionString.length(), 0, rectText.height(), paintText); Harfbuzz-ng will connect DOT_CIRCLE(0x25CC) with 0x1030 (hb-ot-shape-complex-myanmar.cc). This problem occur with case character is bottom of DOT_CIRCLE. in top of DOT_CIRCLE such as 0x1034,0x1033. There is no problem. Please help to fix it. Thanks and Best Regards
Copying my comments from: https://code.google.com/p/android/issues/detail?id=73977 Note that Padauk is pre-OpenType-Myanmar. It uses generic shaper. The font works fine with the graphite backend of HarfBuzz, but since we don't have that in Android, it goes through HarfBuzz OT generic shaper. Ok, few things need to happen: - In Android, we don't set HB_BUFFER_FLAG_BOT/EOT. We should. I'll fix that... - Because of the above, generic shaper does NOT insert dotted-circle. If we add the BOT flag and generic shaper insert dotted-circle, the bug goes away. - The *font* inserts dotted-circle using GSUB. This new character inherits Unicode properties from the mark. Then the shaper zeros its advance based on Unicode properties. Uniscribe doesn't have the bug this. I'm investigating and will try a fix.
commit 6f2d9ba52a6d1e3fc200da1ef0e85ba020fcd0dc Author: Behdad Esfahbod <behdad@behdad.org> Date: Sat Jul 26 19:17:44 2014 -0400 Add old-Myanmar shaper Looks like Unsicribe responds to the 'mymr' tag by zeroing marks GDEF_LATE instead of generic-shaper UNICODE_LATE. Implement that. Fixes Bug 81775 - Incorrect Rendering with harfbuzz-ng myanmar unicode https://bugs.freedesktop.org/show_bug.cgi?id=81775 Micro-test added based on Padauk.
Dear Mr Behdad, As your comment, - Because of the above, generic shaper does NOT insert dotted-circle. - The *font* inserts dotted-circle using GSUB. This new character inherits Unicode properties from the mark. Then the shaper zeros its advance based on Unicode properties. I see in Padauk.ttf DOTTED_CIRCLE position is 0x25CC. I try to remove insert_dotted_circles in hb-ot-shape-complex-myanmar.cc. But It does not work. Could you share to me how to do it? Thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.