OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 The Android Open Source Project | 3 * Copyright 2013 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkFontConfigInterface.h" | 9 #include "SkFontConfigInterface.h" |
10 #include "SkTypeface_android.h" | 10 #include "SkTypeface_android.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 } | 731 } |
732 if (uBounds) { | 732 if (uBounds) { |
733 *uBounds = upperBounds; | 733 *uBounds = upperBounds; |
734 } | 734 } |
735 } | 735 } |
736 return currentTypeface; | 736 return currentTypeface; |
737 } | 737 } |
738 | 738 |
739 /////////////////////////////////////////////////////////////////////////////// | 739 /////////////////////////////////////////////////////////////////////////////// |
740 | 740 |
741 bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name) { | |
742 SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface(); | |
743 return fontConfig->getFallbackFamilyNameForChar(uni, NULL, name); | |
744 } | |
745 | |
746 bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkString* n
ame) { | 741 bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkString* n
ame) { |
747 SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface(); | 742 SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface(); |
748 return fontConfig->getFallbackFamilyNameForChar(uni, lang, name); | 743 return fontConfig->getFallbackFamilyNameForChar(uni, lang, name); |
749 } | 744 } |
750 | 745 |
751 void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf, | 746 void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf, |
752 const char* fontsdir) { | 747 const char* fontsdir) { |
753 gTestMainConfigFile = mainconf; | 748 gTestMainConfigFile = mainconf; |
754 gTestFallbackConfigFile = fallbackconf; | 749 gTestFallbackConfigFile = fallbackconf; |
755 gTestFontFilePrefix = fontsdir; | 750 gTestFontFilePrefix = fontsdir; |
(...skipping 11 matching lines...) Expand all Loading... |
767 | 762 |
768 } | 763 } |
769 | 764 |
770 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, | 765 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, |
771 const SkPaintOptionsAndroid& options, | 766 const SkPaintOptionsAndroid& options, |
772 int* lowerBounds, int* upperBounds) { | 767 int* lowerBounds, int* upperBounds) { |
773 SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface(); | 768 SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface(); |
774 return fontConfig->getTypefaceForGlyphID(glyphID, origTypeface, options, | 769 return fontConfig->getTypefaceForGlyphID(glyphID, origTypeface, options, |
775 lowerBounds, upperBounds); | 770 lowerBounds, upperBounds); |
776 } | 771 } |
OLD | NEW |