FontPlatformData& FontPlatformData::operator=(const FontPlatformData& other) { // Check for self-assignment. if (this == &other) return *this; m_size = other.m_size; m_syntheticBold = other.m_syntheticBold; m_syntheticOblique = other.m_syntheticOblique; m_fixedWidth = other.m_fixedWidth; m_pattern = other.m_pattern; if (m_fallbacks) { FcFontSetDestroy(m_fallbacks); // This will be re-created on demand. m_fallbacks = 0; } if (m_scaledFont && m_scaledFont != hashTableDeletedFontValue()) cairo_scaled_font_destroy(m_scaledFont); m_scaledFont = cairo_scaled_font_reference(other.m_scaledFont); return *this; }
FontPlatformData::~FontPlatformData() { if (m_scaledFont && m_scaledFont != hashTableDeletedFontValue()) cairo_scaled_font_destroy(m_scaledFont); }