Description
Hello,
A week ago, I added an issue "Is it possible to retrieve every font used in mapbox-gl-js for every charset-range?" (#809), @yhahn redirected me to this script https://github.com/mapbox/node-fontnik/blob/master/bin/build-glyphs which worked after a bit of fiddling.
I download the Open Sans variants from http://fr.fonts2u.com/open-sans-bold.police (if you scroll down, you can download the whole thing).
Then I ran those commands:
build-glyphs "Open Sans Regular" glyphs/regular/
build-glyphs "Open Sans Italic " glyphs/italic/
build-glyphs "Open Sans Semibold " glyphs/semibold/
build-glyphs "Open Sans Bold" glyphs/bold/
Which gave me PBFs files for every variant. But when I try to use them with mapbox-gl-js, I get an error "Unimplemented type: 7" here:
Protobuf.prototype.skip = function(val) {
// TODO: bounds checking
var type = val & 0x7;
switch (type) {
/* varint */ case Protobuf.Varint: while (this.buf[this.pos++] > 0x7f); break;
/* 64 bit */ case Protobuf.Int64: this.pos += 8; break;
/* length */ case Protobuf.Message: var bytes = this.readVarint(); this.pos += bytes; break;
/* 32 bit */ case Protobuf.Int32: this.pos += 4; break;
default: throw new Error('Unimplemented type: ' + type);
}
};
When I compare the files:
https://mapbox.s3.amazonaws.com/gl-glyphs-256/Open%20Sans%20Semibold,%20Arial%20Unicode%20MS%20Bold/0-255.pbf
is 83Ko while mine is only 42Ko
Is there something I am doing wrong? Are there different "Open sans" in the wild and I don't have the right one?
Thanks for your help,
Fabien
Activity