mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
33 lines
815 B
JavaScript
33 lines
815 B
JavaScript
|
/*
|
||
|
* Paper.js
|
||
|
*
|
||
|
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
|
||
|
* based on Scriptographer.org and designed to be largely API compatible.
|
||
|
* http://paperjs.org/
|
||
|
* http://scriptographer.org/
|
||
|
*
|
||
|
* Distributed under the MIT license. See LICENSE file for details.
|
||
|
*
|
||
|
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
|
||
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
||
|
*
|
||
|
* All rights reserved.
|
||
|
*/
|
||
|
|
||
|
var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
||
|
initialize: function(style) {
|
||
|
this.fontSize = style.fontSize || 10;
|
||
|
this.font = style.font || 'Helvetica Regular';
|
||
|
this.base(style);
|
||
|
},
|
||
|
|
||
|
statics: {
|
||
|
create: function(item, other) {
|
||
|
var style = new CharacterStyle(CharacterStyle.dont);
|
||
|
style._item = item;
|
||
|
style.initialize(other);
|
||
|
return style;
|
||
|
}
|
||
|
}
|
||
|
});
|