Skip to content

Support text transforms #149

Closed
Closed

Description

@kkaefer

We should allow text transforms (uppercase/lowercase/small caps?) when creating the vector tiles.

Activity

  1. nickidlugash commented on Feb 25, 2014

    @nickidlugash

    This would great, especially while only one font stack is supported.

  2. self-assigned this
    on Apr 22, 2014
  3. nickidlugash commented on May 9, 2014

    @nickidlugash

    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

  4. mikemorris commented on May 29, 2014

    @mikemorris
    Contributor

    Multiple fontstacks are now supported.

  5. nickidlugash commented on Jun 11, 2014

    @nickidlugash

    Is this something that could be possible to implement soon?

  6. kkaefer commented on Jun 11, 2014

    @kkaefer
    MemberAuthor

    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/

  7. yhahn commented on Jun 11, 2014

    @yhahn
    Contributor

    @kkaefer can we start with something dumb, ie. the what js is doing when you

    > ('Hello World').toUpperCase();
    'HELLO WORLD'
    > ('Hello World').toLowerCase();
    'hello world'
    

    ? Will it be weird/hard to achieve parity to this on native?

  8. kkaefer commented on Jun 11, 2014

    @kkaefer
    MemberAuthor

    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.

  9. yhahn commented on Jun 11, 2014

    @yhahn
    Contributor

    word

  10. springmeyer commented on Jun 11, 2014

    @springmeyer
    Contributor

    yes, unicode regex and upper/lower/title casing is about all Mapnik really needs/uses ICU for.

  11. kkaefer commented on Jun 11, 2014

    @kkaefer
    MemberAuthor

    It looks like miniutf has lowercase support but no titlecase or uppercase support.

  12. mikemorris commented on Jun 11, 2014

    @mikemorris
    Contributor

    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.

  13. kkaefer commented on Jun 18, 2014

    @kkaefer
    MemberAuthor

    @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

  14. added a commit that references this issue on Jun 20, 2014
    714d580
  15. added a commit that references this issue on Jun 20, 2014
    c6fd3a5
  16. added a commit that references this issue on Oct 24, 2016
    0f7172c
  17. added a commit that references this issue on Jan 11, 2017
    64bdc1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions