-
Notifications
You must be signed in to change notification settings - Fork 269
Port resvg to harfrust
#922
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nico Burns <[email protected]>
Signed-off-by: Nico Burns <[email protected]>
Yeah I think we first have to figure out how to deal with fontdb before doing anything with resvg. I don’t think RazrFalcon would want to switch it, and I’m not sure that fontique supports everything we need? |
It's an interesting experiment, but I don't see a point in it. Is there a reason in switching to PS: even if |
Oh wait, it depends on proc-macros/syn?! Burn it with fire! No proc-macros in |
harfrust is rustybuzz, just with ttf-parser switched out by read-fonts. It passes all the same tests, so it should be no less robust than then rustybuzz.
The reason is that going forward, (most likely) no one will be continually developing ttf-parser/rustybuzz, while harfrust will be actively maintained. |
I would suggest to come back to it in a year. No rush. And once again, proc-macros are no go. We have to figure out that one as well. |
@@ -65,7 +65,7 @@ jobs: | |||
- name: Install toolchain | |||
uses: dtolnay/rust-toolchain@stable | |||
with: | |||
toolchain: 1.67.1 | |||
toolchain: 1.79.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this (and the other rust-version
modifications) be 1.75.0 not 79?
Not sure about 'beta' type labels, but the first release (0.1.0) of HarfRust happened on June 10, marking a significant milestone.
For an immediate effect, it seems to be far more compliant when tested against the HarfBuzz test suite. To quote Chad:
And the HarfRust introduction post by Behdad contains the following claim:
Moving forward, HarfRust will receive active development and continuous sync with HarfBuzz, while RustyBuzz is likely to only see critical fixes. |
Apples and oranges, but sure. Either way, proc-macros is the current major roadblock. |
@RazrFalcon Seems like the proc-macros are coming from font-types which uses bytemuck and serde derive macros. Do we want to talk to them about converting to manual implementations? |
@mattfbacon if it's an easy fix - sure. |
No it wouldn't be at all, since the bytemuck derive macros generate unsafe code so they would need to allow unsafe code back into the codebase. But what is your plan here? Earlier you said wait, but for what? |
I would call it easy. It's not like the code deeply depends on proc-macros.
Adoption, etc. I don't see a point/reason in switching to 0.1. Especially if we would keep |
There are derive helpers based on It is likely possible to implement an alternative |
Changes made
rustybuzz
withharfrust
ttf-parser
(which was previously being imported via rustybuzz)Notes
1.65
to1.75
ttf_parser
code toskrifa
, otherwise users will be paying for bothttf_parser
andread-fonts
.resvg
. According tocargo-bloat
(not the most accurate):harfrust
andrustybuzz
are both ~250kbttf_parser
andread-fonts
are both ~100kbttf_parser
includes the metrics outlining functionality ofskrifa
. And skrifa is another ~250kb.