gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.55k stars 822 forks source link

Should we package our own fonts? #859

Closed pnorman closed 10 years ago

pnorman commented 10 years ago

We can use a relative font directory to include fonts relative to the stylesheet. We've also had bugs come up with font packages changing names (#837) and different font versions having different names (#429).

Is it worth considering packaging fonts with openstreetmap-carto. This would

  1. Allow us to ensure that the fonts are installed, and have the same name
  2. Allow us to use the latest releases of fonts, improving glyph support
  3. Allow us to use a virtual font created with FontConfig, which is probably more flexible and easier to handle than the long list of font fallbacks
  4. Significantly increase repository size
  5. Extend the reach of what we have to maintain

Cross-ref https://github.com/gravitystorm/openstreetmap-carto/issues/632#issuecomment-46743487

gravitystorm commented 10 years ago

Hmm, I'm torn on this one. If you were to ask if we should bundle natural earth data with the repo I'd say no, since they are large read-only datasets that I wouldn't want in the repo. My thoughts are similar for the fonts, since we're just bundling assets rather than them being something that we want to maintain.

On the other hand, sourcing all the fonts can be a pain for non-Ubuntu people. Does anyone have any feedback on this point e.g. from Mac or Windows users who have installed these stylesheets?

But of course, if a particular font is missing that shouldn't be a great problem for many users/testers/developers of the style. It's non-fatal to working with the style in Tilemill.

pnorman commented 10 years ago

On the other hand, sourcing all the fonts can be a pain for non-Ubuntu people. Does anyone have any feedback on this point e.g. from Mac or Windows users who have installed these stylesheets?

If you're not concerned with packaging systems, it's not too hard to install the fonts on Windows. The problem I've seen is more on Linux where different font versions are packaged on different distributions.

I'm really wondering about FontConfig and virtual fonts, but first I need to try them out.

pnorman commented 10 years ago

dpkg -L ttf-dejavu fonts-droid ttf-unifont fonts-sipa-arundina fonts-sil-padauk fonts-khmeros ttf-indic-fonts-core ttf-tamil-fonts ttf-kannada-fonts | grep '\.ttf' | xargs du -hsc {} tells me all the TTF files from the packages add up to 30MB, of which half is unifont. That's probably a bit much, unless virtual fonts turn out to be a significant advantage.