| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #if OS(WIN) | 84 #if OS(WIN) |
| 85 , | 85 , |
| 86 m_paintTextFlags(0), | 86 m_paintTextFlags(0), |
| 87 m_minSizeForAntiAlias(0), | 87 m_minSizeForAntiAlias(0), |
| 88 m_minSizeForSubpixel(0) | 88 m_minSizeForSubpixel(0) |
| 89 #endif | 89 #endif |
| 90 { | 90 { |
| 91 } | 91 } |
| 92 | 92 |
| 93 FontPlatformData::FontPlatformData(const FontPlatformData& source) | 93 FontPlatformData::FontPlatformData(const FontPlatformData& source) |
| 94 : m_typeface(source.m_typeface) | 94 : m_typeface(source.m_typeface), |
| 95 #if !OS(WIN) | 95 #if !OS(WIN) |
| 96 , | 96 m_family(source.m_family), |
| 97 m_family(source.m_family) | |
| 98 #endif | 97 #endif |
| 99 , | |
| 100 m_textSize(source.m_textSize), | 98 m_textSize(source.m_textSize), |
| 101 m_syntheticBold(source.m_syntheticBold), | 99 m_syntheticBold(source.m_syntheticBold), |
| 102 m_syntheticItalic(source.m_syntheticItalic), | 100 m_syntheticItalic(source.m_syntheticItalic), |
| 103 m_orientation(source.m_orientation) | 101 m_orientation(source.m_orientation), |
| 104 #if OS(LINUX) || OS(ANDROID) | 102 #if OS(LINUX) || OS(ANDROID) |
| 105 , | 103 m_style(source.m_style), |
| 106 m_style(source.m_style) | |
| 107 #endif | 104 #endif |
| 108 , | |
| 109 m_harfBuzzFace(nullptr), | 105 m_harfBuzzFace(nullptr), |
| 110 m_isHashTableDeletedValue(false) | 106 m_isHashTableDeletedValue(false) |
| 111 #if OS(WIN) | 107 #if OS(WIN) |
| 112 , | 108 , |
| 113 m_paintTextFlags(source.m_paintTextFlags), | 109 m_paintTextFlags(source.m_paintTextFlags), |
| 114 m_minSizeForAntiAlias(source.m_minSizeForAntiAlias), | 110 m_minSizeForAntiAlias(source.m_minSizeForAntiAlias), |
| 115 m_minSizeForSubpixel(source.m_minSizeForSubpixel) | 111 m_minSizeForSubpixel(source.m_minSizeForSubpixel) |
| 116 #endif | 112 #endif |
| 117 { | 113 { |
| 118 } | 114 } |
| 119 | 115 |
| 120 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) | 116 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) |
| 121 : m_typeface(src.m_typeface) | 117 : m_typeface(src.m_typeface), |
| 122 #if !OS(WIN) | 118 #if !OS(WIN) |
| 123 , | 119 m_family(src.m_family), |
| 124 m_family(src.m_family) | |
| 125 #endif | 120 #endif |
| 126 , | |
| 127 m_textSize(textSize), | 121 m_textSize(textSize), |
| 128 m_syntheticBold(src.m_syntheticBold), | 122 m_syntheticBold(src.m_syntheticBold), |
| 129 m_syntheticItalic(src.m_syntheticItalic), | 123 m_syntheticItalic(src.m_syntheticItalic), |
| 130 m_orientation(src.m_orientation) | 124 m_orientation(src.m_orientation), |
| 131 #if OS(LINUX) || OS(ANDROID) | 125 #if OS(LINUX) || OS(ANDROID) |
| 132 , | |
| 133 m_style(FontRenderStyle::querySystem(m_family, | 126 m_style(FontRenderStyle::querySystem(m_family, |
| 134 m_textSize, | 127 m_textSize, |
| 135 m_typeface->style())) | 128 m_typeface->style())), |
| 136 #endif | 129 #endif |
| 137 , | |
| 138 m_harfBuzzFace(nullptr), | 130 m_harfBuzzFace(nullptr), |
| 139 m_isHashTableDeletedValue(false) | 131 m_isHashTableDeletedValue(false) |
| 140 #if OS(WIN) | 132 #if OS(WIN) |
| 141 , | 133 , |
| 142 m_paintTextFlags(src.m_paintTextFlags), | 134 m_paintTextFlags(src.m_paintTextFlags), |
| 143 m_minSizeForAntiAlias(src.m_minSizeForAntiAlias), | 135 m_minSizeForAntiAlias(src.m_minSizeForAntiAlias), |
| 144 m_minSizeForSubpixel(src.m_minSizeForSubpixel) | 136 m_minSizeForSubpixel(src.m_minSizeForSubpixel) |
| 145 #endif | 137 #endif |
| 146 { | 138 { |
| 147 #if OS(WIN) | 139 #if OS(WIN) |
| 148 querySystemForRenderStyle(); | 140 querySystemForRenderStyle(); |
| 149 #endif | 141 #endif |
| 150 } | 142 } |
| 151 | 143 |
| 152 FontPlatformData::FontPlatformData(sk_sp<SkTypeface> tf, | 144 FontPlatformData::FontPlatformData(sk_sp<SkTypeface> tf, |
| 153 const char* family, | 145 const char* family, |
| 154 float textSize, | 146 float textSize, |
| 155 bool syntheticBold, | 147 bool syntheticBold, |
| 156 bool syntheticItalic, | 148 bool syntheticItalic, |
| 157 FontOrientation orientation) | 149 FontOrientation orientation) |
| 158 : m_typeface(std::move(tf)) | 150 : m_typeface(std::move(tf)), |
| 159 #if !OS(WIN) | 151 #if !OS(WIN) |
| 160 , | 152 m_family(family), |
| 161 m_family(family) | |
| 162 #endif | 153 #endif |
| 163 , | |
| 164 m_textSize(textSize), | 154 m_textSize(textSize), |
| 165 m_syntheticBold(syntheticBold), | 155 m_syntheticBold(syntheticBold), |
| 166 m_syntheticItalic(syntheticItalic), | 156 m_syntheticItalic(syntheticItalic), |
| 167 m_orientation(orientation) | 157 m_orientation(orientation), |
| 168 #if OS(LINUX) || OS(ANDROID) | 158 #if OS(LINUX) || OS(ANDROID) |
| 169 , | |
| 170 m_style(FontRenderStyle::querySystem(m_family, | 159 m_style(FontRenderStyle::querySystem(m_family, |
| 171 m_textSize, | 160 m_textSize, |
| 172 m_typeface->style())) | 161 m_typeface->style())), |
| 173 #endif | 162 #endif |
| 174 , | |
| 175 m_isHashTableDeletedValue(false) | 163 m_isHashTableDeletedValue(false) |
| 176 #if OS(WIN) | 164 #if OS(WIN) |
| 177 , | 165 , |
| 178 m_paintTextFlags(0), | 166 m_paintTextFlags(0), |
| 179 m_minSizeForAntiAlias(0), | 167 m_minSizeForAntiAlias(0), |
| 180 m_minSizeForSubpixel(0) | 168 m_minSizeForSubpixel(0) |
| 181 #endif | 169 #endif |
| 182 { | 170 { |
| 183 #if OS(WIN) | 171 #if OS(WIN) |
| 184 querySystemForRenderStyle(); | 172 querySystemForRenderStyle(); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 const size_t tableSize = m_typeface->getTableSize(tag); | 349 const size_t tableSize = m_typeface->getTableSize(tag); |
| 362 if (tableSize) { | 350 if (tableSize) { |
| 363 Vector<char> tableBuffer(tableSize); | 351 Vector<char> tableBuffer(tableSize); |
| 364 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); | 352 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); |
| 365 buffer = SharedBuffer::adoptVector(tableBuffer); | 353 buffer = SharedBuffer::adoptVector(tableBuffer); |
| 366 } | 354 } |
| 367 return buffer.release(); | 355 return buffer.release(); |
| 368 } | 356 } |
| 369 | 357 |
| 370 } // namespace blink | 358 } // namespace blink |
| OLD | NEW |