Pass manual bridges into stroke extractor

This commit is contained in:
Shaunak Kishore
2015-09-09 00:45:52 -04:00
parent 63e52e2fc3
commit 78e3a2ed26
2 changed files with 28 additions and 18 deletions

View File

@ -380,7 +380,7 @@ function extract_strokes(paths, endpoints, bridges) {
// Exports go below this fold.
this.get_glyph_render_data = function(glyph) {
this.get_glyph_render_data = function(glyph, manual_bridges) {
var paths = orient_paths(split_path(glyph.path));
var endpoints = [];
for (var i = 0; i < paths.length; i++) {
@ -389,7 +389,7 @@ this.get_glyph_render_data = function(glyph) {
}
}
var bridges = get_bridges(endpoints);
var strokes = extract_strokes(paths, endpoints, bridges);
var strokes = extract_strokes(paths, endpoints, manual_bridges || bridges);
return {
bridges: bridges,
d: Glyphs.get_svg_path(glyph),