OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The Android Open Source Project | 2 * Copyright 2011 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // Despite the name and location, this is portable code. | 8 // Despite the name and location, this is portable code. |
9 | 9 |
| 10 #include "SkFixed.h" |
10 #include "SkFontMgr.h" | 11 #include "SkFontMgr.h" |
11 #include "SkFontMgr_android_parser.h" | 12 #include "SkFontMgr_android_parser.h" |
12 #include "SkStream.h" | 13 #include "SkStream.h" |
13 #include "SkTDArray.h" | 14 #include "SkTDArray.h" |
14 #include "SkTSearch.h" | 15 #include "SkTSearch.h" |
15 #include "SkTemplates.h" | 16 #include "SkTemplates.h" |
16 #include "SkTLogic.h" | 17 #include "SkTLogic.h" |
17 | 18 |
18 #include <dirent.h> | 19 #include <dirent.h> |
19 #include <expat.h> | 20 #include <expat.h> |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 const char* tag = fTag.c_str(); | 796 const char* tag = fTag.c_str(); |
796 | 797 |
797 // strip off the rightmost "-.*" | 798 // strip off the rightmost "-.*" |
798 const char* parentTagEnd = strrchr(tag, '-'); | 799 const char* parentTagEnd = strrchr(tag, '-'); |
799 if (parentTagEnd == nullptr) { | 800 if (parentTagEnd == nullptr) { |
800 return SkLanguage(); | 801 return SkLanguage(); |
801 } | 802 } |
802 size_t parentTagLen = parentTagEnd - tag; | 803 size_t parentTagLen = parentTagEnd - tag; |
803 return SkLanguage(tag, parentTagLen); | 804 return SkLanguage(tag, parentTagLen); |
804 } | 805 } |
OLD | NEW |