You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be useful for the Outdoors style. Since it is unlikely that multiple font stacks will be supported in time for WWDC, this would allow for more differentiation between similar sized/colored labels.
Hrm, text transformation is another can of worms, e.g. in German, you translate the lowercase "ß" to "SS". For small caps, we need a font that supports small caps and replace the code points with different glyphs (i.e. no 1:1 mapping between unicode points and glyphs).
ICU's C++ libraries have code for handling that. We're currently using boost-unicode on systems that don't have unicode support in stdlib. I know @springmeyer wants to switch to https://github.com/dropbox/miniutf, but this library doesn't seem to have support for uppercasing/lowercasing/titlecasing. We could contribute the code though. Using ICU is not something I'd like to do, since it is quite a large dependency.
Activity
nickidlugash commentedon Feb 25, 2014
This would great, especially while only one font stack is supported.
nickidlugash commentedon May 9, 2014
This could be useful for the Outdoors style. Since it is unlikely that multiple font stacks will be supported in time for WWDC, this would allow for more differentiation between similar sized/colored labels.
Tracking for Outdoors: https://github.com/mapbox/gl-ported-maps/issues/2
mikemorris commentedon May 29, 2014
Multiple fontstacks are now supported.
nickidlugash commentedon Jun 11, 2014
Is this something that could be possible to implement soon?
kkaefer commentedon Jun 11, 2014
Hrm, text transformation is another can of worms, e.g. in German, you translate the lowercase "ß" to "SS". For small caps, we need a font that supports small caps and replace the code points with different glyphs (i.e. no 1:1 mapping between unicode points and glyphs).
The Unicode consortium helpfully has a list of case conversions: http://www.unicode.org/charts/case/
yhahn commentedon Jun 11, 2014
@kkaefer can we start with something dumb, ie. the what js is doing when you
? Will it be weird/hard to achieve parity to this on native?
kkaefer commentedon Jun 11, 2014
ICU's C++ libraries have code for handling that. We're currently using boost-unicode on systems that don't have unicode support in stdlib. I know @springmeyer wants to switch to https://github.com/dropbox/miniutf, but this library doesn't seem to have support for uppercasing/lowercasing/titlecasing. We could contribute the code though. Using ICU is not something I'd like to do, since it is quite a large dependency.
yhahn commentedon Jun 11, 2014
word
springmeyer commentedon Jun 11, 2014
yes, unicode regex and upper/lower/title casing is about all Mapnik really needs/uses ICU for.
kkaefer commentedon Jun 11, 2014
It looks like miniutf has lowercase support but no titlecase or uppercase support.
mikemorris commentedon Jun 11, 2014
With http://www.unicode.org/charts/case/ it doesn't look like it would be too hard to add uppercase/titlecase support to miniutf, either in a fork or PR.
mikemorris commentedon Jun 18, 2014
miniutf implements http://www.unicode.org/Public/6.3.0/ucd/UnicodeData.txt directly at https://raw.githubusercontent.com/dropbox/miniutf/master/data-6.3.0/UnicodeData.txt, which does already contain support for titlecase and uppercase mapping, we would just need to add a method to use that data. We may want to add http://www.unicode.org/Public/6.3.0/ucd/SpecialCasing.txt too if necessary.
kkaefer commentedon Jun 18, 2014
@mikemorris Yeah, the data is in the text file, but it's currently not in the cpp files that get compiled. The preprocess script does that, but it's currently commented out: https://github.com/dropbox/miniutf/blob/73b871ff1e6f5e716f9da90f64bd9c19fea18dcc/preprocess.py#L340
Also see dropbox/miniutf#2
Add support for text-transform (fixes #149)
Merge pull request #478 from mapbox/text-transform
Merge pull request mapbox#147 from mapbox/common-interface
Markdownify the doc string (closes #149)