harfbuzz / rustybuzz

A complete harfbuzz's shaping algorithm port to Rust
MIT License
551 stars 37 forks source link

rustybuzz exports symbols that conflict with harfbuzz #12

Closed jneem closed 3 years ago

jneem commented 3 years ago

We had a mysterious segfault in druid that I tracked down to a version bump that brought in rustybuzz. I'm far from an expert on this stuff, but I noticed that after introducing the rustybuzz dep, druid started exporting symbols that clash with harfbuzz's symbols. Also, the crashes occurred on ubuntu (which has system harfbuzz version 2.6) but not on arch (which has system harfbuzz version 2.7). Could it be that rustybuzz's exported symbols are causing our problem, and if so is it possible not to export them?

RazrFalcon commented 3 years ago

Sorry for a delay, but rustybuzz doesn't have hb_* symbols. I've specifically removed all of them.

I have no idea what could be the cause of the problem.

jneem commented 3 years ago

Thanks for the reply! Could it be that the symbols are present in rustybuzz 0.1, but not more recent versions? The reason I ask is that if I build the usvg binary from git master, running strings on the binary gives me tons of hb_ symbols. But if I update usvg's version of rustybuzz to 0.2, almost all of them disappear (hb_direction is still present for some reason). Anyway, if there was an issue here then it seems to be fixed.

RazrFalcon commented 3 years ago

You're right. I forgot that usvg still uses 0.1 and not 0.2. So yes, it will be fixed soon.