Skip to content

Commit

Permalink
update default utils, changed default font back to Arial
Browse files Browse the repository at this point in the history
  • Loading branch information
percyliang committed Sep 17, 2013
1 parent d53a3c5 commit 4d1bbdc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
16 changes: 10 additions & 6 deletions create-presentation
Expand Up @@ -41,16 +41,20 @@ G.prez = sfig.presentation();
// Useful functions (not standard enough to put into an sfig library).
G.frameBox = function(a) { return frame(a).padding(5).bg.strokeWidth(1).fillColor('white').end; }
G.frameBox = function(a) { return frame(a).bg.strokeWidth(1).fillColor('white').end; }
G.bigFrameBox = function(a) { return frameBox(a).padding(10).scale(1.4); }
G.bigLeftArrow = function(s) { return leftArrow(s || 100).strokeWidth(10).color('brown'); }
G.bigRightArrow = function(s) { return rightArrow(s || 100).strokeWidth(10).color('brown'); }
G.bigUpArrow = function(s) { return upArrow(s || 100).strokeWidth(10).color('brown'); }
G.bigDownArrow = function(s) { return downArrow(s || 100).strokeWidth(10).color('brown'); }
G.bigLeftArrow = function() { return leftArrow(100).strokeWidth(10).color('brown'); }
G.bigRightArrow = function() { return rightArrow(100).strokeWidth(10).color('brown'); }
G.bigUpArrow = function() { return upArrow(100).strokeWidth(10).color('brown'); }
G.bigDownArrow = function() { return downArrow(100).strokeWidth(10).color('brown'); }
G.red = function(x) { return x.fontcolor('red'); }
G.green = function(x) { return x.fontcolor('green'); }
G.blue = function(x) { return x.fontcolor('blue'); }
G.darkblue = function(x) { return x.fontcolor('darkblue'); }
G.brown = function(x) { return x.fontcolor('brown'); }
G.purple = function(x) { return x.fontcolor('purple'); }
G.xseq = function() { return new sfig.Table([arguments]).center().margin(5); }
G.yseq = function() { return ytable.apply(null, arguments).margin(10); }
Expand All @@ -68,7 +72,7 @@ G.headerList = function(title) {
G.node = function(x, shaded) { return overlay(circle(20).fillColor(shaded ? 'lightgray' : 'white') , x).center(); }
G.indent = function(x, n) { return frame(x).xpadding(n != null ? n : 20).xpivot(1); }
G.stagger = function(b1, b2) { b1 = std(b1); b2 = std(b2); return overlay(b1, pause(), b2.replace(b1)); }
G.stagger = function(b1, b2) { b1 = std(b1); b2 = std(b2); return overlay(b1.numLevels(1), pause(), b2); }
G.dividerSlide = function(text) {
return slide(null, nil(), parentCenter(text)).titleHeight(0);
Expand Down
4 changes: 0 additions & 4 deletions examples/simple-presentation-node.js

This file was deleted.

6 changes: 5 additions & 1 deletion examples/simple-presentation.js
@@ -1,5 +1,7 @@
// Shows an example of a really simple presentation.
// Feel free to copy this to use as a template.

require('../internal/sfig.js');
require('../internal/metapost.js');

// Don't need math for this simple example
sfig.enableMath = false;
Expand Down Expand Up @@ -35,3 +37,5 @@ prez.addSlide(slide('Conclusion',
bulletedText('Tutorial').linkToExternal('tutorial'),
bulletedText('GitHub').linkToUrl('http://github.com/percyliang/sfig'),
_));

prez.writePdf({outPrefix: 'simple-presentation'});
2 changes: 1 addition & 1 deletion internal/sfig.js
Expand Up @@ -1532,7 +1532,7 @@ sfig.down = function(x) { return x * sfig.downSign; };
}

sfig_.addProperty(Text, 'content', null, 'The string to be displayed.');
sfig_.addProperty(Text, 'font', 'Noto Sans', 'Font to use to display the text.');
sfig_.addProperty(Text, 'font', 'Arial', 'Font to use to display the text.');
sfig_.addProperty(Text, 'fontSize', 28, 'Font size to use to display the text.');
sfig_.addProperty(Text, 'width', null, 'Affects wrapping (default: Slide width)');
sfig_.addProperty(Text, 'bulleted', null, 'Whether to prepend a bullet');
Expand Down

0 comments on commit 4d1bbdc

Please sign in to comment.