textBaseline : on Canvas



Select the radio button to change the textBaseline value.
gctx.textBaseline='top';
top: Top of the em Square is at text baseline.
hanging: Hanging baseline is at text baseline.
middle: Middle of the em Suare is at text baseline .
alphabetic: alphabetic baseline is at text baseline
ideographic: ideographic baseline is at text baseline.
bottom: bottom of the bounding box is at text baseline
var my_canvas=$('#my_canvas').get(0)
var gctx = my_canvas.getContext("2d");
gctx.font='38px Arial';
gctx.fillStyle='#00FF00';
gctx.textBaseline='top';
gctx.fillText('JQP349 gjpqy',100,100)


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    Post your comments , suggestion , error , requirements etc here .




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer