| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Brent Fulgham | 2 * Copyright (C) 2011 Brent Fulgham |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) | 109 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) |
| 110 : m_typeface(src.m_typeface) | 110 : m_typeface(src.m_typeface) |
| 111 #if !OS(WIN) | 111 #if !OS(WIN) |
| 112 , m_family(src.m_family) | 112 , m_family(src.m_family) |
| 113 #endif | 113 #endif |
| 114 , m_textSize(textSize) | 114 , m_textSize(textSize) |
| 115 , m_syntheticBold(src.m_syntheticBold) | 115 , m_syntheticBold(src.m_syntheticBold) |
| 116 , m_syntheticItalic(src.m_syntheticItalic) | 116 , m_syntheticItalic(src.m_syntheticItalic) |
| 117 , m_orientation(src.m_orientation) | 117 , m_orientation(src.m_orientation) |
| 118 #if OS(LINUX) || OS(ANDROID) | 118 #if OS(LINUX) || OS(ANDROID) |
| 119 , m_style(src.m_style) | 119 , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->sty
le())) |
| 120 #endif | 120 #endif |
| 121 , m_harfBuzzFace(nullptr) | 121 , m_harfBuzzFace(nullptr) |
| 122 , m_isHashTableDeletedValue(false) | 122 , m_isHashTableDeletedValue(false) |
| 123 #if OS(WIN) | 123 #if OS(WIN) |
| 124 , m_paintTextFlags(src.m_paintTextFlags) | 124 , m_paintTextFlags(src.m_paintTextFlags) |
| 125 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias) | 125 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias) |
| 126 , m_minSizeForSubpixel(src.m_minSizeForSubpixel) | 126 , m_minSizeForSubpixel(src.m_minSizeForSubpixel) |
| 127 #endif | 127 #endif |
| 128 { | 128 { |
| 129 #if !OS(MACOSX) | 129 #if OS(WIN) |
| 130 querySystemForRenderStyle(); | 130 querySystemForRenderStyle(); |
| 131 #endif | 131 #endif |
| 132 } | 132 } |
| 133 | 133 |
| 134 FontPlatformData::FontPlatformData(PassRefPtr<SkTypeface> tf, | 134 FontPlatformData::FontPlatformData(PassRefPtr<SkTypeface> tf, |
| 135 const char* family, float textSize, bool syntheticBold, | 135 const char* family, float textSize, bool syntheticBold, |
| 136 bool syntheticItalic, FontOrientation orientation) | 136 bool syntheticItalic, FontOrientation orientation) |
| 137 : m_typeface(tf) | 137 : m_typeface(tf) |
| 138 #if !OS(WIN) | 138 #if !OS(WIN) |
| 139 , m_family(family) | 139 , m_family(family) |
| 140 #endif | 140 #endif |
| 141 , m_textSize(textSize) | 141 , m_textSize(textSize) |
| 142 , m_syntheticBold(syntheticBold) | 142 , m_syntheticBold(syntheticBold) |
| 143 , m_syntheticItalic(syntheticItalic) | 143 , m_syntheticItalic(syntheticItalic) |
| 144 , m_orientation(orientation) | 144 , m_orientation(orientation) |
| 145 #if OS(LINUX) || OS(ANDROID) |
| 146 , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->sty
le())) |
| 147 #endif |
| 145 , m_isHashTableDeletedValue(false) | 148 , m_isHashTableDeletedValue(false) |
| 146 #if OS(WIN) | 149 #if OS(WIN) |
| 147 , m_paintTextFlags(0) | 150 , m_paintTextFlags(0) |
| 148 , m_minSizeForAntiAlias(0) | 151 , m_minSizeForAntiAlias(0) |
| 149 , m_minSizeForSubpixel(0) | 152 , m_minSizeForSubpixel(0) |
| 150 #endif | 153 #endif |
| 151 { | 154 { |
| 152 #if !OS(MACOSX) | 155 #if OS(WIN) |
| 153 querySystemForRenderStyle(); | 156 querySystemForRenderStyle(); |
| 154 #endif | 157 #endif |
| 155 } | 158 } |
| 156 | 159 |
| 157 FontPlatformData::~FontPlatformData() | 160 FontPlatformData::~FontPlatformData() |
| 158 { | 161 { |
| 159 } | 162 } |
| 160 | 163 |
| 161 #if OS(MACOSX) | 164 #if OS(MACOSX) |
| 162 CTFontRef FontPlatformData::ctFont() const | 165 CTFontRef FontPlatformData::ctFont() const |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 const size_t tableSize = m_typeface->getTableSize(tag); | 340 const size_t tableSize = m_typeface->getTableSize(tag); |
| 338 if (tableSize) { | 341 if (tableSize) { |
| 339 Vector<char> tableBuffer(tableSize); | 342 Vector<char> tableBuffer(tableSize); |
| 340 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 343 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
| 341 buffer = SharedBuffer::adoptVector(tableBuffer); | 344 buffer = SharedBuffer::adoptVector(tableBuffer); |
| 342 } | 345 } |
| 343 return buffer.release(); | 346 return buffer.release(); |
| 344 } | 347 } |
| 345 | 348 |
| 346 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |