Path: blob/trunk/third_party/closure/goog/graphics/font.js
2868 views
// Copyright 2007 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.131415/**16* @fileoverview Represents a font to be used with a Renderer.17* @author [email protected] (Erik Arvidsson)18* @see ../demos/graphics/basicelements.html19*/202122goog.provide('goog.graphics.Font');23242526/**27* This class represents a font to be used with a renderer.28* @param {number} size The font size.29* @param {string} family The font family.30* @constructor31* @deprecated goog.graphics is deprecated. It existed to abstract over browser32* differences before the canvas tag was widely supported. See33* http://en.wikipedia.org/wiki/Canvas_element for details.34* @final35*/36goog.graphics.Font = function(size, family) {37/**38* Font size.39* @type {number}40*/41this.size = size;42// TODO(arv): Is this in pixels or drawing units based on the coord size?4344/**45* The name of the font family to use, can be a comma separated string.46* @type {string}47*/48this.family = family;49};505152/**53* Indication if text should be bolded54* @type {boolean}55*/56goog.graphics.Font.prototype.bold = false;575859/**60* Indication if text should be in italics61* @type {boolean}62*/63goog.graphics.Font.prototype.italic = false;646566