opentype.js icon indicating copy to clipboard operation
opentype.js copied to clipboard

Should render dotted circle with unmatched diacritics

Open sffc opened this issue 8 years ago • 0 comments

Consider a diacritic mark, like U+103A, "MYANMAR SIGN ASAT". In the Unicode chart, the character is shown as having a dotted circle to indicate that it is missing its base character. Most Unicode-compliant fonts render the dotted circle: ်.

Expected Behavior

Opentype.js should also render the dotted circle.

Current Behavior

Opentype.js does not render the dotted circle. Instead, it renders the diacritic to the left, attached to the preceding character, even if there is no previous character or if the previous character cannot have the given diacritic applied to it.

Possible Solution

Ensure that opentype.js obeys all rules in the Unicode specification for Indic scripts like Myanmar.

Steps to Reproduce (for bugs)

  1. In the box on the home page, load in a font with Myanmar script support, like Padauk
  2. Enter a string like: a် (that is, latin 'a' followed by U+103A)
  3. What you see is 'a' with the asat rendered over it.

If you use Padauk in a normal text field using your operating system's font rendering engine, you see the dotted circle as expected. Example: https://codepen.io/anon/pen/jwWydv?editors=1100

Context

I am working on web-based tools for Indic scripts like Myanmar and would like to use opentype.js to render examples of characters.

Your Environment

  • Version used: The demo on the web site, opentype.js.org
  • Font used: Padauk (from fonts.google.com)
  • Browser Name and version: Opera
  • Operating System and version (desktop or mobile): Desktop
  • Link to your project: Not applicable yet

sffc avatar Jun 09 '17 08:06 sffc