| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. | 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. |
| 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 | 219 |
| 220 FontPlatformData* result = new FontPlatformData(tf, | 220 FontPlatformData* result = new FontPlatformData(tf, |
| 221 name.data(), | 221 name.data(), |
| 222 fontSize, | 222 fontSize, |
| 223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr
iption.isSyntheticBold(), | 223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr
iption.isSyntheticBold(), |
| 224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes
cription.isSyntheticItalic(), | 224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes
cription.isSyntheticItalic(), |
| 225 fontDescription.orientation(), | 225 fontDescription.orientation(), |
| 226 s_useSubpixelPositioning); | 226 s_useSubpixelPositioning); |
| 227 | 227 |
| 228 struct FamilyMinSize { |
| 229 const wchar_t* family; |
| 230 unsigned minSize; |
| 231 }; |
| 232 const static FamilyMinSize minAntiAliasSizeForFont[] = { |
| 233 { L"simsun", 16 }, |
| 234 { L"dotum", 12 } |
| 235 }; |
| 236 size_t numFonts = WTF_ARRAY_LENGTH(minAntiAliasSizeForFont); |
| 237 for (size_t i = 0; i < numFonts; i++) { |
| 238 FamilyMinSize entry = minAntiAliasSizeForFont[i]; |
| 239 if (typefacesMatchesFamily(tf.get(), entry.family)) { |
| 240 result->setMinSizeForAntiAlias(entry.minSize); |
| 241 break; |
| 242 } |
| 243 } |
| 244 |
| 228 return result; | 245 return result; |
| 229 } | 246 } |
| 230 | 247 |
| 231 } | 248 } |
| OLD | NEW |