简体   繁体   中英

How to call font family in curved text in fabric.all.min.js

I had Created Curved Text based on JSFIDDLE .Now i want add font family to that curved text.when i add font family in curved text it will not render predefined function from fabric.all.min.js Here my font family custom code and screenshot following below

            $('#font_bold').click(function() {
            var checked = $('#font_bold').attr('checked');
            if(checked =='checked') {
                Example.set('fontWeight',$(this).val()  ) ;
            }else {
                Example.set('fontWeight','100') ;
            }
            });

and i defined in font family in this MY DEMO JSFIDDLE but i can't achieved it . how to solve it. Pls Guide me how to assign Font family in Curve text?

Try this code:

 this.group.item(i).setFontFamily  (this.opts.fontFamily)

Check the demo http://jsfiddle.net/vivek_27/5Unbh/1/ and replace the above line in the demo link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM