Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Implement text shaping with libraqm #30000

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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
Loading
from
Draft

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented May 2, 2025

PR summary

This is based on #29816 but doesn't yet include #29794 and #29695. I'm mostly opening it to see how CI will cope.

PR checklist

@QuLogic
Copy link
Member Author

QuLogic commented May 3, 2025

This was useful in pointing out some cross-platform incompatibilities. I may check cibuildwheel as well later to ensure bundling is working correctly.

The failing test is a relatively recent one; I will have to check if that is from here or the FreeType change.

mdboom and others added 12 commits May 7, 2025 06:27
Namely, `text.hinting` is now `default` instead of `force_autohint` (or
`none` for classic tests) and `text.hinting_factor` is now 1, not 8.
If we've updated an image in the past couple commits, then we can remove
the backwards-compatibility styling so that they're generated as
intended.
The `FontInfo.num` value returned by `TruetypeFonts._get_info` is a
character code, but `FT2Font.get_kerning` takes *glyph indices*, meaning
that kerning was likely off in most cases.
Also add some missing license entries in more places.
@anntzer
Copy link
Contributor

anntzer commented May 17, 2025

Do you envision that raqm will become the sole text layout method, or do you plan to keep the old manual layouting around (perhaps togglable)? I just noticed that the old layouting method appears to be missing handling of lsb_delta and rsb_delta (see note at https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_glyphslotrec ("If you use strong auto-hinting, you must apply these delta values! Otherwise you will experience far too large inter-glyph spacing at small rendering sizes in most cases.")) but raqm would likely (hopefully?) take care of that for us. If the manual layouting is going to stay then I'll open a separate issue to implement this (perhaps also to be folded into the FreeType update mega-PR); if not, perhaps we can just forget about it.

@QuLogic
Copy link
Member Author

QuLogic commented May 17, 2025

I intend for it to replace everything, I think. I have some in-progress work to apply it to PDF/PS/SVG as well.

I did notice the lsb_delta/rsb_delta note and tried to implement it in #29816, though IIRC not much (or even nothing) changed, but I could be misremembering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.