Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render complex text, variant forms, emoji, etc. #1

Draft
wants to merge 18 commits into
base: astral-cjk
Choose a base branch
from

Commits on Aug 27, 2024

  1. Render complex text, variant forms, emoji, other grapheme clusters

    Segment strings by grapheme cluster instead of by character when shaping and rendering text. Store glyphs, glyph requests, and glyph positions by grapheme cluster instead of by codepoint string. Added a simple polyfill for older versions of Firefox.
    1ec5 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ddc937c View commit details
    Browse the repository at this point in the history
  2. Render all text locally

    1ec5 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    c5da043 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b451fd6 View commit details
    Browse the repository at this point in the history
  4. Fixed clipping of wide glyphs

    Increased the buffer around locally rendered glyphs.
    1ec5 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    a779668 View commit details
    Browse the repository at this point in the history
  5. Use local baseline metric

    Removed hard-coded fudge factors based on the baseline in Arial Unicode MS.
    1ec5 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    f178331 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    967ded7 View commit details
    Browse the repository at this point in the history
  7. Collapse control characters

    1ec5 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    e53e7a0 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Join grapheme clusters on combining marks, invisible stackers

    If a grapheme cluster begins with a combining diacritical mark or ends with an invisible stacker, combine it with an adjacent grapheme cluster to avoid drawing diacritics over dotted circles or placeholder diacritics where adjacent characters should be ligated instead.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    fccc74a View commit details
    Browse the repository at this point in the history
  2. Generate Unicode character property data at build time

    Added a script that fetches the latest Unicode character database’s property file for Indic syllable categories and generates a function for combining graphemes based on it.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    9600223 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23d7dc6 View commit details
    Browse the repository at this point in the history
  4. Fixed ligatures in Sinhala

    Replace zero-width joiners with temporary strip markers to prevent ICU from stripping them.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    79f9fe2 View commit details
    Browse the repository at this point in the history
  5. Streamlined RTL text detection

    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    3cb401c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2590574 View commit details
    Browse the repository at this point in the history
  7. Fixed combining right-to-left characters

    Preemptively swap combining marks with the characters they modify to visual order, so that the RTL plugin will swap them back to logical order.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    7c49df9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e4177a3 View commit details
    Browse the repository at this point in the history
  9. Break lines based on word segmentation

    Replaced custom word break heuristics when determining line breaks with a word segmenter. Added a simple polyfill for older versions of Firefox.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    872625f View commit details
    Browse the repository at this point in the history
  10. Fixed vertical text advance

    Fixed an issue where vertical CJK text was shifted upwards by one em.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    d5597ac View commit details
    Browse the repository at this point in the history
  11. Fixed error rendering Burmese text

    Iterate over graphemes instead of words, looking for word boundaries to use as line breaking opportunities. This eliminates the possibility of word-wrapping in the middle of a grapheme cluster, which is valid in some writing systems such as Thai, but mitigates the risk of an invalid section index in Burmese, because the word segmenter considers some modifiers to be “words”.
    1ec5 committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    b3b7359 View commit details
    Browse the repository at this point in the history