1/* 2 * Copyright (C) 2011 Brent Fulgham 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 * 19 */ 20 21#include "config.h" 22#include "FontPlatformData.h" 23 24#include "PlatformString.h" 25#include <wtf/HashMap.h> 26#include <wtf/RetainPtr.h> 27#include <wtf/Vector.h> 28#include <wtf/text/StringHash.h> 29 30using namespace std; 31 32namespace WebCore { 33 34FontPlatformData::FontPlatformData(const FontPlatformData& source) 35 : m_syntheticBold(source.m_syntheticBold) 36 , m_syntheticOblique(source.m_syntheticOblique) 37 , m_orientation(source.m_orientation) 38 , m_textOrientation(source.m_textOrientation) 39 , m_size(source.m_size) 40 , m_widthVariant(source.m_widthVariant) 41 , m_isColorBitmapFont(source.m_isColorBitmapFont) 42{ 43 platformDataInit(source); 44} 45 46const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& other) 47{ 48 // Check for self-assignment. 49 if (this == &other) 50 return *this; 51 52 m_syntheticBold = other.m_syntheticBold; 53 m_syntheticOblique = other.m_syntheticOblique; 54 m_orientation = other.m_orientation; 55 m_textOrientation = other.m_textOrientation; 56 m_size = other.m_size; 57 m_widthVariant = other.m_widthVariant; 58 m_isColorBitmapFont = other.m_isColorBitmapFont; 59 60 return platformDataAssign(other); 61} 62 63} 64