Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.h

Issue 1695653002: Take Accept-Language into account in CJK font fallback for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@al
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Functions to cache and retrieve the system font metrics. 121 // Functions to cache and retrieve the system font metrics.
122 static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight ); 122 static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight );
123 static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fo ntHeight); 123 static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fo ntHeight);
124 static void setStatusFontMetrics(const wchar_t* familyName, int32_t fontHeig ht); 124 static void setStatusFontMetrics(const wchar_t* familyName, int32_t fontHeig ht);
125 static int32_t menuFontHeight() { return s_menuFontHeight; } 125 static int32_t menuFontHeight() { return s_menuFontHeight; }
126 static const AtomicString& menuFontFamily() { return *s_smallCaptionFontFami lyName; } 126 static const AtomicString& menuFontFamily() { return *s_smallCaptionFontFami lyName; }
127 static int32_t smallCaptionFontHeight() { return s_smallCaptionFontHeight; } 127 static int32_t smallCaptionFontHeight() { return s_smallCaptionFontHeight; }
128 static const AtomicString& smallCaptionFontFamily() { return *s_smallCaption FontFamilyName; } 128 static const AtomicString& smallCaptionFontFamily() { return *s_smallCaption FontFamilyName; }
129 static int32_t statusFontHeight() { return s_statusFontHeight; } 129 static int32_t statusFontHeight() { return s_statusFontHeight; }
130 static const AtomicString& statusFontFamily() { return *s_statusFontFamilyNa me; } 130 static const AtomicString& statusFontFamily() { return *s_statusFontFamilyNa me; }
131 static UScriptCode preferredScriptForHan() { return m_preferredScriptForHan; }
131 #endif 132 #endif
132 133
133 typedef uint32_t FontFileKey; 134 typedef uint32_t FontFileKey;
134 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F ontPlatformData&); 135 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F ontPlatformData&);
135 136
136 static void acceptLanguagesChanged(const String&); 137 static void acceptLanguagesChanged(const String&);
137 138
138 #if OS(ANDROID) 139 #if OS(ANDROID)
139 static AtomicString getGenericFamilyNameForScript(const AtomicString& family Name, const FontDescription&); 140 static AtomicString getGenericFamilyNameForScript(const AtomicString& family Name, const FontDescription&);
140 #else 141 #else
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 static float s_deviceScaleFactor; 197 static float s_deviceScaleFactor;
197 static bool s_useSubpixelPositioning; 198 static bool s_useSubpixelPositioning;
198 static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts; 199 static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts;
199 // The system font metrics cache. 200 // The system font metrics cache.
200 static AtomicString* s_menuFontFamilyName; 201 static AtomicString* s_menuFontFamilyName;
201 static int32_t s_menuFontHeight; 202 static int32_t s_menuFontHeight;
202 static AtomicString* s_smallCaptionFontFamilyName; 203 static AtomicString* s_smallCaptionFontFamilyName;
203 static int32_t s_smallCaptionFontHeight; 204 static int32_t s_smallCaptionFontHeight;
204 static AtomicString* s_statusFontFamilyName; 205 static AtomicString* s_statusFontFamilyName;
205 static int32_t s_statusFontHeight; 206 static int32_t s_statusFontHeight;
207 static UScriptCode m_preferredScriptForHan;
206 #endif 208 #endif
207 209
208 friend class SimpleFontData; // For fontDataFromFontPlatformData 210 friend class SimpleFontData; // For fontDataFromFontPlatformData
209 friend class FontFallbackList; 211 friend class FontFallbackList;
210 }; 212 };
211 213
212 class PLATFORM_EXPORT FontCachePurgePreventer { 214 class PLATFORM_EXPORT FontCachePurgePreventer {
213 USING_FAST_MALLOC(FontCachePurgePreventer); 215 USING_FAST_MALLOC(FontCachePurgePreventer);
214 WTF_MAKE_NONCOPYABLE(FontCachePurgePreventer); 216 WTF_MAKE_NONCOPYABLE(FontCachePurgePreventer);
215 public: 217 public:
216 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 218 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
217 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 219 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
218 }; 220 };
219 221
220 } // namespace blink 222 } // namespace blink
221 223
222 #endif 224 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698