Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 16, 2015 02:00 pm GMT

Modify Fonts With JavaScript and Plumin.js

Thanks to CSS, there are plenty of options to edit text. You can also use custom fonts via web fonts. The JavaScript library Plumin.js goes one step further. It allows you to manipulate a font within a website. Symbols can be replaced by individual shapes. Choosing a Font and Manipulating Letters While most JavaScript libraries require you to access the HTML elements that you want the library to be used on, this is not the case for Plumin.js. Here, a font that you want to manipulate with the library is addressed. The made changes are in effect on all usage areas of the font in the document. First, an invisible HTML5 drawing space, that is internally used by Plumin.js, is created. 1 <canvas id="plumin-canvas" width="1024" height="1024" hidden /> In the next step, the library gains access to said drawing space. 1 plumin.paper.setup("plumin-canvas"); Afterwards, a function is created. With this function, the font and symbols that will be replaced, as well as the shapes that will replace the previous symbols are defined. 1 2 3 (function(p) { })(plumin) Everything that happens after that has to located within this function. First, the name of the font that you want to alter […]

Original Link: http://feedproxy.google.com/~r/Noupe/~3/OGnXcvsznp0/modify-fonts-with-javascript-and-plumin-js-93885.html

Share this article:    Share on Facebook
View Full Article

Noupe

Noupe passionately delivers stylish and dynamic news for designers and web-developers across the globe on all subjects of design

More About this Source Visit Noupe