Skip to content

Commit

Permalink
Merge pull request #393 from mapbox/glyphs-256
Browse files Browse the repository at this point in the history
256 char range glyphs. Refs #388.
  • Loading branch information
yhahn committed May 29, 2014
2 parents 6d16a6c + b497adb commit 6250c0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 92 deletions.
2 changes: 1 addition & 1 deletion debug/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (typeof document !== 'undefined') {
"mapbox streets": {
type: 'vector',
url: 'http://{s}.tiles.mapbox.com/v3/mapbox.mapbox-streets-v4/{z}/{x}/{y}.vector.pbf',
glyphs: 'http://mapbox.s3.amazonaws.com/gl-glyphs/{fontstack}/{range}.pbf',
glyphs: 'http://mapbox.s3.amazonaws.com/gl-glyphs-256/{fontstack}/{range}.pbf',
tileSize: 512,
maxZoom: 14,
skipZooms: [1, 9, 11]
Expand Down
95 changes: 4 additions & 91 deletions js/text/ranges.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,95 +74,8 @@ function getRanges(features, info) {
codepoints: codepoints
};
}

var glyphStops = [
128, // Basic Latin
256, // Latin-1 Supplement
384, // Latin Extended-A
592, // Latin Extended-B
688, // IPA Extensions
768, // Spacing Modifier Letters
880, // Combining Diacritical Marks
1024, // Greek
1280, // Cyrillic
1424, // Armenian
1536, // Hebrew
1792, // Arabic
1872, // Syriac
1984, // Thaana
2432, // Devanagari
2560, // Bengali
2688, // Gurmukhi
2816, // Gujarati
2944, // Oriya
3072, // Tamil
3200, // Telugu
3328, // Kannada
3456, // Malayalam
3584, // Sinhala
3712, // Thai
3840, // Lao
4096, // Tibetan
4256, // Myanmar
4352, // Georgian
4608, // Hangul Jamo
4992, // Ethiopic
5120, // Cherokee
5760, // Unified Canadian Aboriginal Syllabics
5792, // Ogham
5888, // Runic
6144, // Khmer
6320, // Mongolian
7936, // Latin Extended Additional
8192, // Greek Extended
8304, // General Punctuation
8352, // Superscripts and Subscripts
8400, // Currency Symbols
8448, // Combining Marks for Symbols
8528, // Letterlike Symbols
8592, // Number Forms
8704, // Arrows
8960, // Mathematical Operators
9216, // Miscellaneous Technical
9280, // Control Pictures
9312, // Optical Character Recognition
9472, // Enclosed Alphanumerics
9600, // Box Drawing
9632, // Block Elements
9728, // Geometric Shapes
9984, // Miscellaneous Symbols
10176, // Dingbats
10496, // Braille Patterns
12032, // CJK Radicals Supplement
12256, // Kangxi Radicals
12288, // Ideographic Description Characters
12352, // CJK Symbols and Punctuation
12448, // Hiragana
12544, // Katakana
12592, // Bopomofo
12688, // Hangul Compatibility Jamo
12704, // Kanbun
12736, // Bopomofo Extended
13056, // Enclosed CJK Letters and Months
13312, // CJK Compatibility
19894, // CJK Unified Ideographs Extension A
40960, // CJK Unified Ideographs
42128, // Yi Syllables
42192, // Yi Radicals
55204, // Hangul Syllables
56192, // High Surrogates
56320, // High Private Use Surrogates
57344, // Low Surrogates
63744, // Private Use
64256, // CJK Compatibility Ideographs
64336, // Alphabetic Presentation Forms
65024, // Arabic Presentation Forms-A
65072, // Combining Half Marks
65104, // CJK Compatibility Forms
65136, // Small Form Variants
65279, // Arabic Presentation Forms-B
65280, // Specials
65520, // Halfwidth and Fullwidth Forms
65534 // Specials
];
var glyphStops = [];
for (var i = 0; i < (65536/256); i++) {
glyphStops[i] = Math.min((i+1) * 256, 65533);
}

0 comments on commit 6250c0f

Please sign in to comment.