i have drawn over a ribbon with the code:
var canvas = document.getElementById('draw-ribbon'); ctx = canvas.getContext("2d"); ctx.fillStyle = 'red'; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(300, 0); ctx.lineTo(260, 75); ctx.lineTo(300, 150); ctx.lineTo(0, 150); ctx.closePath(); ctx.fill(); got this:

after this i have tried filltext() but didn't work i want to achieve this:
