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

Add South Asia fonts #414

Merged
merged 8 commits into from
Apr 14, 2014
Merged

Add South Asia fonts #414

merged 8 commits into from
Apr 14, 2014

Conversation

pnorman
Copy link
Collaborator

@pnorman pnorman commented Mar 14, 2014

Follow up to #358
See the Unicode Font Guide for what I am considering South Asia.

  • Devanagari (India, Nepal)
  • Bengali (Bangladesh)
  • Gujarati (India)
  • Gurmukhi (India, Pakistan) (Could only find LINESTRINGs, which aren't rendering due to bugs)
  • Kannada (India)
  • Oriya (India) (Not found in DB)
  • Sinhala (Sri Lanka) (Too many uses of it for Slovene right now to track down names)
  • Tamil (India, Sri Lanka, Singapore)
  • Tibetan (China)
  • Urdu (Pakistan) (Covered by DejaVu)

There are additional scripts in the region, but I believe them not likely present in name tags. If I'm missing one, I'd like to know.

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 14, 2014

Bengali uses Mukti, which currently is having some strange issues in mapnik/mapnik#2183. I selected this font because it has a bold version, and stylistically is similar to DejaVu

image

image

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 14, 2014

Available fonts for Devanagari:

image
image

As before, the letters to the right are in DejaVu for reference, and the first two are proprietary fonts for reference. I'm leaning towards Chandas for being similar in style to DejaVu.

@planemad
Copy link

My choice is Gargi for better small size legibility and proportions compared to Chandas. ( I can read/write devanagari)

@chatman
Copy link

chatman commented Mar 16, 2014

It seems that the rendering is not the same for these fonts. As per my guess for the text, that ends with "gita", only Mangal, Gargi, Samyak got the rendering right. Among them, for smaller fonts, I prefer Gargi as it is crisp and readable.
Perhaps some known/popular words/phrases could serve as a better benchmark for correctness of rendering. Thanks for your work.

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 16, 2014

Something I've been wondering about is that there are apparently two styles, the Southern or Bombay style and Northern or Calcutta style. Do we need both supported? If so, which do we use when?

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 16, 2014

I'm having a real hard time finding something that's rendered on the map. Could someone provide a link to an area where the names are in devanagari? I was looking at the Ganges, but #415 is an issue with the new fonts, not just unifont.

@chatman
Copy link

chatman commented Mar 16, 2014

Many small towns in Nepal are supposed to be rendered with Devnagri.
http://www.openstreetmap.org/relation/184633#map=10/26.5977/87.6695

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 18, 2014

I've put up a demo at http://tile.paulnorman.ca/demo/fonts.html#11/26.7177/87.4076 (Gargi and Chandas layers)

Of course, it doesn't render anything on roads with the Mapnik bug.

@matthijsmelissen
Copy link
Collaborator

Would this be syntactically correct? It would reduce duplicate code.

@bold-fonts: "DejaVu Sans Bold", "Arundina Sans Bold", "Padauk Bold", "Mukti Narrow Bold", @book-fonts;

@mrwojo
Copy link
Contributor

mrwojo commented Mar 19, 2014

Would this be syntactically correct?

It didn't work for me. 4a33288

pnorman added 2 commits March 25, 2014 19:13
It fits sylistically with DejaVu and has both a normal and bold version
Unifont's name changed from "unifont" to "Unifont" at some point,
probably with 6.0.

This commit causes the more recent caps to be preferred, but will
support either version.

Closes gravitystorm#429
@pnorman
Copy link
Collaborator Author

pnorman commented Mar 26, 2014

Would this be syntactically correct? It would reduce duplicate code.

Unfortunately it doesn't work. See mapbox/carto#333 for the upstream feature request.

Gargi was considered the clearest of the available fonts
@pnorman
Copy link
Collaborator Author

pnorman commented Mar 26, 2014

I had trouble finding some Tamil, but eventually found மட்டுவில்

I looked at the fonts. Some put Tamil glyphs in place of latin characters, which ruled them out.

TSCu_Comic, TSCu_Paranar and TSCu_Times were the three options. The first is Tamil Comic Sans, the last is Tamil times, and Paranar fits in best, as well as having Bold and Oblique versions.

Unifont
15497

TSCu_Paranar
15497

There aren't really any other matching options for Tamil fonts
@pnorman pnorman self-assigned this Mar 26, 2014
@pnorman
Copy link
Collaborator Author

pnorman commented Mar 26, 2014

The only packaged Tibetan font is Tibetan Machine Uni. It's also apparently got some of the best support.

རྩེ་ཐང་
Unifont
6799

Tibetan Machine Uni
6799

Given the complex nature of Tibetan, I wouldn't be surprised if there are bugs that are only fixed in harfbuzz.

There aren't really any other Tibetan options for fonts
@pnorman
Copy link
Collaborator Author

pnorman commented Mar 26, 2014

Message sent to talk@ asking for help with Sinhala, Gujarati, Gurmukhi, Kannada, and Oriya.

Mallige has bold and italic versions.

Kedage is another option for a Kannada font, but it seems to be impacted
by mapnik/mapnik#2195
@matthijsmelissen
Copy link
Collaborator

This might be related to https://trac.openstreetmap.org/ticket/4957.

@matthijsmelissen
Copy link
Collaborator

Another font related issue: https://trac.openstreetmap.org/ticket/2946

@planemad
Copy link

I can confirm the Tamil rendering is incorrect in both the samples.

On Mon, Mar 31, 2014 at 7:17 PM, math1985 notifications@github.com wrote:

Another font related issue: https://trac.openstreetmap.org/ticket/2946

Reply to this email directly or view it on GitHubhttps://github.com//pull/414#issuecomment-39089769
.

Arun Ganesh
(planemad) http://en.wikipedia.org/wiki/User:Planemad

@pnorman
Copy link
Collaborator Author

pnorman commented Mar 31, 2014

Another font related issue: https://trac.openstreetmap.org/ticket/2946

Not within the scope of this, as it's not in south asia

@matthijsmelissen
Copy link
Collaborator

True, and I couldn't be bothered to look up if South-Asia has any RTL languages :)

@ajashton
Copy link

I noticed the font stacks are growing to 12+ fonts each. Have you done performance testing for this in areas where it's common for labels to have characters not in the first 2-3 fonts? Working on Mapbox Streets we noticed something like a 30-40% rendering slowdown by adding just a few additional fonts to a stack. I don't have any relevant benchmark numbers, and anyway the impact is highly variable for different fonts. Just something that you might want to check on.

@pnorman
Copy link
Collaborator Author

pnorman commented Apr 1, 2014

I noticed the font stacks are growing to 12+ fonts each. Have you done performance testing for this in areas where it's common for labels to have characters not in the first 2-3 fonts?

I haven't. I'm not sure it's a huge issue, given that the vast majority of labels rendered will be done with DejaVu.

I'll give it some thought, although I'm not sure my current benchmark set is well-suited to what are largely Asia-specific issues, and where my work has not yet covered CJK fonts. It might paint a better picture than reality by using a Europe-centric rendering test set, and worse than reality by having CJK glyphs fall all the way back to the end when that's not the final goal.

Have you tried a virtual font set with fontconfig for Mapbox Streets? This is the standard way of covering the Unicode glyph space.

@gravitystorm
Copy link
Owner

@pnorman I'd like to pull in 00918b0 to fix #429 - is this PR good to go or should I cherry-pick?

@pnorman
Copy link
Collaborator Author

pnorman commented Apr 8, 2014

@pnorman I'd like to pull in 00918b0 to fix #429 - is this PR good to go or should I cherry-pick?

It should be good. I fixed the last bug in 3bbdba0. I want to add appropriate package info to the docs, but if that doesn't get in that's okay.

@pnorman
Copy link
Collaborator Author

pnorman commented Apr 10, 2014

Ready to go from my perspective.

gravitystorm added a commit that referenced this pull request Apr 14, 2014
@gravitystorm gravitystorm merged commit abcc22b into gravitystorm:master Apr 14, 2014
@pnorman pnorman deleted the s_asia branch April 18, 2014 04:31
@pnorman pnorman mentioned this pull request Apr 19, 2014
@pnorman pnorman mentioned this pull request Sep 16, 2016
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants