Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Vertical CJK labels #1682

Closed
1ec5 opened this issue Jun 3, 2015 · 4 comments · Fixed by #7114
Closed

Vertical CJK labels #1682

1ec5 opened this issue Jun 3, 2015 · 4 comments · Fixed by #7114
Labels
Core The cross-platform C++ core, aka mbgl feature GL JS parity For feature parity with Mapbox GL JS

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jun 3, 2015

CJK labels running along north-south roads (or roads that go from top to bottom due to map rotation) should orient glyphs vertically so that one can read the labels without tilting one’s head. Since the map can be rotated arbitrarily, it’s easy to wind up in a situation where all the road labels are vertical. CJK makes it possible to maintain legibility in such configurations.

/cc @ansis @nickidlugash @peterqliu @mayagao @friedbunny @mikemorris

@friedbunny
Copy link
Contributor

An example from Yahoo JP, near Tokyo Station. Notice that even roman characters can be drawn vertically.

screen shot 2015-06-03 at 1 23 11 pm

http://yahoo.jp/2RqUBc

@nickidlugash
Copy link
Contributor

@mikemorris is planning to add vertical advance information here to allow this.

@mikemorris
Copy link
Contributor

Note that only a few font formats provide vertical metrics. You can test whether a given face object contains them by using the macro FT_HAS_VERTICAL, which returns true if appropriate.

https://www.freetype.org/freetype2/docs/tutorial/step2.html is interesting and has more details on vertical glyph metrics and what we would need to include in the glyph spec to support vertical layout

@1ec5
Copy link
Contributor Author

1ec5 commented Nov 10, 2016

An implementation is nearly ready to port in mapbox/mapbox-gl-js#3438.

@1ec5 1ec5 added the Core The cross-platform C++ core, aka mbgl label Nov 10, 2016
1ec5 referenced this issue in mapbox/mapbox-gl-test-suite Nov 12, 2016
@1ec5 1ec5 added the GL JS parity For feature parity with Mapbox GL JS label Nov 12, 2016
1ec5 added a commit that referenced this issue Nov 18, 2016
CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement.

Fixes #1682.
jfirebaugh pushed a commit that referenced this issue Feb 10, 2017
CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement.

Fixes #1682.
jfirebaugh pushed a commit that referenced this issue Feb 11, 2017
CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement.

Fixes #1682.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl feature GL JS parity For feature parity with Mapbox GL JS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants