You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
700 B
17 lines
700 B
<canvas id="c"></canvas> |
|
<script type="text/javascript" src="./Tesseract.js"></script> |
|
<script type="text/javascript"> |
|
var canvas = document.getElementById('c') |
|
canvas.width = 400 |
|
canvas.height = 400 |
|
var ctx = canvas.getContext('2d'); |
|
ctx.font = '30px "Arial Black"' |
|
ctx.fillText('Hell0 World', 100, 40) |
|
// ctx.fillText("囚犯離奇掙脫囚犯離奇掙脫", 100, 40) |
|
ctx.font = '30px "Times New Roman"' |
|
ctx.fillText('from beyond', 100, 80) |
|
// ctx.fillText('2小時可換乘2次2小時可換乘2次', 100, 80) |
|
ctx.font = '30px sans-serif' |
|
ctx.fillText('the Cosmic Void', 100, 120) |
|
Tesseract.recognize(canvas,{tessedit_char_blacklist:'e'}).then( function(d){ console.log(d) } ) |
|
</script> |