Skip to content

Replace Rustybuzz with Parley for text layout, and add text tilt parameter #2739

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

Merged
merged 9 commits into from
Jul 1, 2025

Conversation

BKSalman
Copy link
Contributor

@BKSalman BKSalman commented Jun 20, 2025

Related to #1105. Closes #2707.

this adds Parley which handles a lot of text related stuff for us

I made this PR to get feedback on the changes

and after this is accepted, some of the listed TODOs from this issue can be resolved easily, which I could either add to this PR, or make another PR for them

I've created this simple file that I tested with, you can also use it (you need to use a font that supports Arabic, something like Tajawal)

it should look like this
image

TODOs:

  • Add parley
  • Remove rustybuzz
  • Migrate text node from old implementation
    • Change default character spacing to 0
    • detect the number of parameters that exist on the text node and do the migration only when it doesn't match the new number of parameters
  • Add shear

@BKSalman BKSalman force-pushed the parley branch 3 times, most recently from e836f23 to 49d81c8 Compare June 20, 2025 10:55
@BKSalman BKSalman marked this pull request as draft June 20, 2025 22:36
@Keavon Keavon changed the title add parley for text layout handling Replace Rustybuzz with Parley for text layout handling Jun 22, 2025
@BKSalman BKSalman force-pushed the parley branch 4 times, most recently from cd5aff5 to 5b5373a Compare June 22, 2025 22:11
@BKSalman BKSalman marked this pull request as ready for review June 22, 2025 22:12
@Keavon
Copy link
Member

Keavon commented Jun 22, 2025

!build

Copy link

📦 Build Complete for 5b5373a
https://bd7cabdd.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jun 22, 2025

!build

Copy link

📦 Build Complete for d198695
https://0eb1e49e.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jun 25, 2025

!build

Copy link

📦 Build Complete for 2edd00e
https://29c79aa7.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jun 25, 2025

!build

Copy link

📦 Build Complete for 1a49f60
https://e386f757.graphite.pages.dev

@BKSalman BKSalman force-pushed the parley branch 3 times, most recently from b999cf6 to 50b2e6b Compare June 28, 2025 10:10
@Keavon
Copy link
Member

Keavon commented Jun 28, 2025

!build

Copy link

📦 Build Complete for 50b2e6b
https://ac12439d.graphite.pages.dev

@BKSalman BKSalman force-pushed the parley branch 2 times, most recently from 1eb89d9 to 2bc822b Compare June 28, 2025 11:12
@Keavon
Copy link
Member

Keavon commented Jun 28, 2025

!build

Copy link

📦 Build Complete for 87f5ce4
https://6d957092.graphite.pages.dev

BKSalman and others added 6 commits June 29, 2025 19:22
change text input direction based on text direction
this also adds migration code for documents that don't have shear
- add shear property
- set character spacing to 0
@Keavon Keavon changed the title Replace Rustybuzz with Parley for text layout handling Replace Rustybuzz with Parley for text layout Jul 1, 2025
@Keavon Keavon changed the title Replace Rustybuzz with Parley for text layout Replace Rustybuzz with Parley for text layout, and add text tilt parameter Jul 1, 2025
@Keavon Keavon merged commit 83773ba into GraphiteEditor:master Jul 1, 2025
4 checks passed
@BKSalman BKSalman deleted the parley branch July 1, 2025 20:51
urisinger pushed a commit to urisinger/Graphite that referenced this pull request Jul 15, 2025
…meter (GraphiteEditor#2739)

* replace rustybuzz with parley for text layout handling

change text input direction based on text direction

* Code review

* change default character spacing to 0

* add shear to text node

this also adds migration code for documents that don't have shear

* shear migration for text node

- add shear property
- set character spacing to 0

* use old max_width and max_height in text migration if available

* Final code review pass

* Add units to the parameters

---------

Co-authored-by: Keavon Chambers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arabic writing support
2 participants