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

Easier way to disable Harfbuzz? #3544

Closed
systemed opened this issue Oct 30, 2016 · 2 comments
Closed

Easier way to disable Harfbuzz? #3544

systemed opened this issue Oct 30, 2016 · 2 comments

Comments

@systemed
Copy link

For cycle.travel I'm using a font which doesn't have ligatures.

Rendering this with Harfbuzz results in the letter-pairs going AWOL entirely, so "Cardiff" becomes "Cardi", "Bakersfield" becomes "Bakerseld" etc. (This may be a bug in the font, of course.)

As per #2875, export HB_SHAPER_LIST=fallback should disable Harfbuzz, but I've not found any way to get this through renderd into Mapnik. (This may be a bug in renderd, of course.)

Eventually I fixed it in the grand hackish tradition by replacing the call to harfbuzz_shaper in src/text/text_layout.cpp with one to icu_shaper. But it might be good to have this as an option in TextSymbolizer rather than an environment variable.

@talaj
Copy link
Member

talaj commented Oct 30, 2016

You don't have to switch to another text shaper to workaround problem with ligatures. You can just turn ligatures off:

<TextSymbolizer face-name="DejaVu Sans Book" font-feature-settings="liga 0">
    "Text without ligatures"
</TextSymbolizer>

Also good to know is that Mapnik automatically turns off ligatures when character-spacing is greater than zero. See #2416.

Btw, great project, @systemed!

@systemed
Copy link
Author

systemed commented Dec 31, 2016

That works great - thanks for the tip! I've now moved to Harfbuzz as I was getting some other (Czech-language!) font rendering issues which it solves.

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

No branches or pull requests

2 participants