| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 #if OS(WIN) | 100 #if OS(WIN) |
| 101 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr
iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName); | 101 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr
iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName); |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 #if ENABLE(OPENTYPE_VERTICAL) | 104 #if ENABLE(OPENTYPE_VERTICAL) |
| 105 typedef uint32_t FontFileKey; | 105 typedef uint32_t FontFileKey; |
| 106 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); | 106 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 #if OS(ANDROID) |
| 110 static AtomicString getGenericFamilyNameForScript(const AtomicString& family
Name, UScriptCode); |
| 111 #else |
| 109 struct SimpleFontFamily { | 112 struct SimpleFontFamily { |
| 110 String name; | 113 String name; |
| 111 bool isBold; | 114 bool isBold; |
| 112 bool isItalic; | 115 bool isItalic; |
| 113 }; | 116 }; |
| 114 static void getFontFamilyForCharacter(UChar32, const char* preferredLocale,
SimpleFontFamily*); | 117 static void getFontFamilyForCharacter(UChar32, const char* preferredLocale,
SimpleFontFamily*); |
| 118 #endif |
| 115 | 119 |
| 116 private: | 120 private: |
| 117 FontCache(); | 121 FontCache(); |
| 118 ~FontCache(); | 122 ~FontCache(); |
| 119 | 123 |
| 120 void disablePurging() { m_purgePreventCount++; } | 124 void disablePurging() { m_purgePreventCount++; } |
| 121 void enablePurging() | 125 void enablePurging() |
| 122 { | 126 { |
| 123 ASSERT(m_purgePreventCount); | 127 ASSERT(m_purgePreventCount); |
| 124 if (!--m_purgePreventCount) | 128 if (!--m_purgePreventCount) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 163 |
| 160 class FontCachePurgePreventer { | 164 class FontCachePurgePreventer { |
| 161 public: | 165 public: |
| 162 FontCachePurgePreventer() { fontCache()->disablePurging(); } | 166 FontCachePurgePreventer() { fontCache()->disablePurging(); } |
| 163 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } | 167 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } |
| 164 }; | 168 }; |
| 165 | 169 |
| 166 } | 170 } |
| 167 | 171 |
| 168 #endif | 172 #endif |
| OLD | NEW |