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

Labels are sometimes squashed when using TextSymbolizer with placement="line" #4353

Open
mnurzia opened this issue Sep 26, 2022 · 0 comments

Comments

@mnurzia
Copy link

mnurzia commented Sep 26, 2022

When rendering small road labels using a TextSymbolizer and placement="line", sometimes the spacing between characters is so small that the labels are unreadable (font used is SF Pro, but the same results were observed with DejaVu Sans Bold and other default fonts)

image

<TextSymbolizer 
  placement="line" 
  allow-overlap="false" 
  minimum-path-length="50" 
  repeat-distance="200" 
  face-name="SF Pro Compressed Black" 
  size="20" 
  fill="#99b3d9" 
  halo-fill="#404040" 
  halo-radius="1">
    [road_text]
</TextSymbolizer>

Even with a minimum-path-length of 50px I still get labels that are squashed. I suspected that it may have something to do with the geometry, so I tried making it easier on the renderer by I simplifying linestrings and merging them with by name. This didn't change anything. Is there an option to just disable squishing these labels? I have also tried font-feature-settings="-kern" to no avail.

Thank you for your help. Mapnik is a really awesome piece of software and other than this it's been really fun to use.

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

1 participant