text-to-db64

``` npm install text-to-db64 ``` #### to use it ``` // 目前做了Helvetica, yahei两种字体的垂直居中调整 // defaultConfig var config = { width: 80, height: 80, bgColor: '#000', color: '#fff', fontSize: 30, fontFamily: 'Helvetica',

Usage no npm install needed!

<script type="module">
  import textToDb64 from 'https://cdn.skypack.dev/text-to-db64';
</script>

README

text to database64

install lib

npm install text-to-db64

to use it

// 目前做了Helvetica, yahei两种字体的垂直居中调整
// defaultConfig
var config = {
    width: 80,
    height: 80,
    bgColor: '#000',
    color: '#fff',
    fontSize: 30,
    fontFamily: 'Helvetica',
    text: 'text'
};

var database64 = textToDatabase(config);