Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reload the entire font range when a glyph is missing in a font #9375

Merged
merged 9 commits into from
Mar 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lint
oterral committed Mar 5, 2020

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tvdeyen Thomas von Deyen
commit f08da011903a878d40448892d37550bf213d1661
4 changes: 2 additions & 2 deletions test/unit/render/glyph_manager.test.js
Original file line number Diff line number Diff line change
@@ -41,15 +41,15 @@ test('GlyphManager doesn\'t request twice 0-255 PBF if a glyph is missing', (t)
const manager = new GlyphManager(identityTransform);
manager.setURL('https://localhost/fonts/v1/{fontstack}/{range}.pbf');

manager.getGlyphs({'Arial Unicode MS': [0.5]}, (err, glyphs) => {
manager.getGlyphs({'Arial Unicode MS': [0.5]}, (err) => {
t.ifError(err);
t.equal(manager.entries['Arial Unicode MS'].ranges[0], true);
t.equal(stub.calledOnce, true);

// We remove all requests as in getGlyphs code.
delete manager.entries['Arial Unicode MS'].requests[0];

manager.getGlyphs({'Arial Unicode MS': [0.5]}, (err, glyphs) => {
manager.getGlyphs({'Arial Unicode MS': [0.5]}, (err) => {
t.ifError(err);
t.equal(manager.entries['Arial Unicode MS'].ranges[0], true);
t.equal(stub.calledOnce, true);