Skip to content

Exposing normalisation data to external consumers #297

@taj-p

Description

@taj-p

In linebender/parley#452 (comment), we identified that it might be useful for consumers of HarfRust to have access to the normalization data to prevent storing duplicate table data in binaries.

Per @dfrg's comment, as a consumer of HarfRust, Parley also wants to match HarfRust so using a single source of truth is beneficial to maintain consistency between shaping and other stages of the text pipeline.

The options of implementation vary:

  • Simply expose normalize_nfc / normalize_nfd functions from unicode.rs
  • Expose the tables themselves and push consumers to write their own normalize_nfc / normalize_nfd functions using the data
  • Split out the data into its own crate, ask consumers to pass in a trait that implements what HarfRust requires while supporting a baked or similar feature flag
  • ...

I think the most important question I have is whether there's appetite for this sort of change.

There are other opportunities of deduplication like potentially the CharExt but I think it might be best to start the dialogue with normalization data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions