OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights | 2 * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights |
3 * reserved. | 3 * 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 13 matching lines...) Expand all Loading... |
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "platform/fonts/win/FontFallbackWin.h" | 32 #include "platform/fonts/win/FontFallbackWin.h" |
33 | 33 |
| 34 #include <unicode/uchar.h> |
| 35 #include <limits> |
34 #include "SkFontMgr.h" | 36 #include "SkFontMgr.h" |
35 #include "SkTypeface.h" | 37 #include "SkTypeface.h" |
36 #include "platform/fonts/FontCache.h" | 38 #include "platform/fonts/FontCache.h" |
37 #include "platform/text/ICUError.h" | 39 #include "platform/text/ICUError.h" |
38 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
39 #include "wtf/StringExtras.h" | 41 #include "wtf/StringExtras.h" |
40 #include "wtf/text/StringHash.h" | 42 #include "wtf/text/StringHash.h" |
41 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
42 #include <limits> | |
43 #include <unicode/uchar.h> | |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 static inline bool isFontPresent(const UChar* fontName, | 49 static inline bool isFontPresent(const UChar* fontName, |
50 SkFontMgr* fontManager) { | 50 SkFontMgr* fontManager) { |
51 String family = fontName; | 51 String family = fontName; |
52 sk_sp<SkTypeface> tf( | 52 sk_sp<SkTypeface> tf( |
53 fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle())); | 53 fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle())); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 family = L"lucida sans unicode"; | 533 family = L"lucida sans unicode"; |
534 } | 534 } |
535 } | 535 } |
536 | 536 |
537 if (scriptChecked) | 537 if (scriptChecked) |
538 *scriptChecked = script; | 538 *scriptChecked = script; |
539 return family; | 539 return family; |
540 } | 540 } |
541 | 541 |
542 } // namespace blink | 542 } // namespace blink |
OLD | NEW |