bubkoo / hexo-filter-sequence

Generate UML sequence diagrams for Hexo.
MIT License
39 stars 12 forks source link

how to custom small font size #4

Open Ahaochan opened 7 years ago

Ahaochan commented 7 years ago

i have a sequence.but the pic was so large https://ahaochan.github.io/Java/JavaWeb/Tomcat/Tomcat%E5%90%AF%E5%8A%A8%E6%B5%81%E7%A8%8B%E8%AF%A6%E8%A7%A3.html#more how to set the font size?

Bootstrap->Bootstrap: main()
Bootstrap->Bootstrap: init()
Bootstrap->Bootstrap: load()

Bootstrap->Catalina: load()
Catalina->Standard\nServer: init()
Standard\nServer->Standard\nService: init()
Standard\nService->Container: init()
Container-->Standard\nService: 
Standard\nService->Mapper\nListener: init()
Mapper\nListener-->Standard\nService: 
Standard\nService->Executor: init()
Executor-->Standard\nService: 
Standard\nService->Connector: init()
Connector-->Standard\nService: 
Standard\nService-->Standard\nServer: 
Standard\nServer-->Catalina: 
Catalina-->Bootstrap: 

Bootstrap->Bootstrap: start()
Bootstrap->Catalina: start()
Catalina->Standard\nServer: start()
Standard\nServer->Standard\nService: start()
Standard\nService->Container: start()
Container-->Standard\nService: 
Standard\nService->Mapper\nListener: start()
Mapper\nListener-->Standard\nService: 
Standard\nService->Executor: start()
Executor-->Standard\nService: 
Standard\nService->Connector: start()
Connector-->Standard\nService: 
Standard\nService-->Standard\nServer: 
Standard\nServer-->Catalina: 
Catalina-->Bootstrap: 
bubkoo commented 7 years ago

@Ahaochan ref: https://github.com/bramp/js-sequence-diagrams/issues/148

Ahaochan commented 7 years ago

i modified the hexo/node_modules/hexo-filter-sequence/index.js. add the 'font-size': 16

var assign = require('deep-assign');
var renderer = require('./lib/renderer');

hexo.config.flowchart = assign({
  webfont: 'https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.27/webfontloader.js',
  snap: 'https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg-min.js',
  underscore: 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js',
  sequence: 'https://cdnjs.cloudflare.com/ajax/libs/js-sequence-diagrams/1.0.6/sequence-diagram-min.js',
  css: '',
  options: {
    'theme': 'simple',
    'font-size': 16  // add option
  }
}, hexo.config.flowchart);

hexo.extend.filter.register('before_post_render', renderer.render, 9);

and to deploy.but the font size has not been modified.