Skip to content

Commit

Permalink
remove hard assuming on default/bundled fonts being available
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jan 23, 2014
1 parent a730108 commit a7a70ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/constants.test.js
Expand Up @@ -7,7 +7,7 @@ describe('mapnik constants', function() {
assert.ok(mapnik.settings);
assert.ok(mapnik.settings.paths);
assert.ok(mapnik.settings.paths.fonts.length);
assert.ok(fs.statSync(mapnik.settings.paths.fonts));
//assert.ok(fs.statSync(mapnik.settings.paths.fonts));
assert.ok(mapnik.settings.paths.input_plugins.length);
assert.ok(fs.statSync(mapnik.settings.paths.input_plugins));

Expand Down
8 changes: 1 addition & 7 deletions test/fonts.test.js
Expand Up @@ -11,16 +11,10 @@ function oc(a) {
}

before(function() {
mapnik.register_default_fonts();
mapnik.register_system_fonts();
});

describe('mapnik fonts ', function() {
it('should auto-register DejaVu fonts', function() {
// make sure we have default fonts
assert.ok('DejaVu Sans Bold' in oc(mapnik.fonts()));
});

it('should auto-register a system font like Times Regular on OS X', function() {
if (process.platform == 'darwin') {
assert.ok('Times Regular' in oc(mapnik.fonts()));
Expand All @@ -31,7 +25,7 @@ describe('mapnik fonts ', function() {

it('should find new fonts when registering all system fonts', function() {
// will return true if new fonts are found
// but should return false as we now call at startup
// but should return false now we called in `before`
assert.ok(!mapnik.register_system_fonts());
});

Expand Down

0 comments on commit a7a70ee

Please sign in to comment.