Skip to content
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

Fix issue where glyphs were renderered as outlines #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamnemecek
Copy link

@adamnemecek adamnemecek commented Jul 17, 2020

Closes #18

I came across this while trying out the canvas_nanovg example in pathfinder.

The glyphs were rendered like this

skribo

This is the result after this patch:

skribo fix

Credit goes to @jeroentervoorde and @Stoeoef, who figured this out.

Links:
servo/pathfinder#194
fschutt/azul#125 (comment)

@raphlinus
Copy link
Contributor

I'm confused, the linked HB doc suggests that the funcs are already set by default. Looking at the HB source, it seems like they are, unless HB_NO_OT_FONT is set. Do we think the Rust HB build is setting that symbol?

@RazrFalcon
Copy link

RazrFalcon commented Jul 17, 2020

@raphlinus Unless they are using harfbuzz < 2.0. For example, Ubuntu 18.04 uses 1.7.2.

@adamnemecek
Copy link
Author

The rust harfbuzz bindings use 2.6.4.

@raphlinus
Copy link
Contributor

Thanks @RazrFalcon, that really helps clear up my confusion. If I understand it, the crate is designed to dynamically link the system HarfBuzz when available, but statically build when not? That would explain diversity of behavior. It's also potentially a very serious problem if we want to depend on newer behavior.

In any case, do you think this is a good fix?

@RazrFalcon
Copy link

@adamnemecek It uses system one on linux. You have to set HARFBUZZ_SYS_NO_PKG_CONFIG=1 to opt it.

@RazrFalcon
Copy link

@raphlinus Personally, I think using HARFBUZZ_SYS_NO_PKG_CONFIG=1 to always use the embedded version is preferred. I've already had strange bugs in resvg because of relying on a system version.

@raphlinus
Copy link
Contributor

Right, I agree. There's just way too much that can go wrong. Adam, would you be willing to make that PR?

@adamnemecek
Copy link
Author

adamnemecek commented Jul 17, 2020 via email

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.

layout_run function does not work correctly on ubuntu 18.04
3 participants