Name Description Size Coverage
SkDebug_android.cpp 894 -
SkDebug_stdio.cpp 734 0 %
SkDebug_win.cpp 795 0 %
SkDiscardableMemory_none.cpp 413 0 %
SkFontConfigInterface.cpp 1289 -
SkFontConfigInterface_direct.cpp migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp 24037 -
SkFontConfigInterface_direct.h migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp 1410 -
SkFontConfigInterface_direct_factory.cpp 486 -
SkFontConfigTypeface.h 2885 -
SkFontHost_cairo.cpp 27575 73 %
SkFontHost_FreeType.cpp 93497 -
SkFontHost_FreeType_common.cpp Copies a FT_Bitmap into an SkMask with the same dimensions. FT_PIXEL_MODE_MONO FT_PIXEL_MODE_GRAY FT_PIXEL_MODE_LCD FT_PIXEL_MODE_LCD_V 89342 40 %
SkFontHost_FreeType_common.h Computes a bounding box for a COLRv1 glyph. This method may change the configured size and transforms on FT_Face. Make sure to configure size, matrix and load glyphs as needed after using this function to restore the state of FT_Face. 2537 100 %
SkFontHost_win.cpp 86881 0 %
SkFontMgr_android.cpp 20792 -
SkFontMgr_android_ndk.cpp Technically, the AFont API was introduced in Android 10 (Q, API 29). However... The AFontMatcher API implementation is broken from its introduction until at least API 33. What is desired is to find a font for the given locale which contains the given character. However, the implementation actually attempts to shape the string passed to it with the default font and then returns the font chosen for the first run. However, this produces undesireable results, as it will always prefer the default font over the locale, so any code points covered by the default font will always come from the default font regardless of the requested locale. In addition, this will claim coverage for code points "made up" by the shaper through normalization, denormalization, whitespace synthesis, no-draw synthesis, etc, for the default font, when there may be better choices later in fallback. On Android 10 (Q, API 29) AFont_getLocale always returns nullptr (if there is a locale set) or whatever std::unique_ptr<std::string>()->c_str() returns, which happens to be 0x1. As a result, AFont_getLocale cannot be used until Android 11 (R, API 30). This is b/139201432 and fixed with "Make AFont_getLocale work" [0]. This change is in Android 11 (API 30) but does not appear to have been cherry-picked into Android 10 (Q, API 29). [0] https://cs.android.com/android/_/android/platform/frameworks/base/+/01709c7469b59e451f064c266bbe442e9bef0ab4 As a result, there is no correct way to use locale information from the Android 10 NDK. So this font manager only works with Android 11 (R, API 30) and above. 59347 -
SkFontMgr_android_parser.cpp This file contains TWO 'familyset' handlers: One for JB and earlier which works with /system/etc/system_fonts.xml /system/etc/fallback_fonts.xml /vendor/etc/fallback_fonts.xml /system/etc/fallback_fonts-XX.xml /vendor/etc/fallback_fonts-XX.xml and the other for LMP and later which works with /system/etc/fonts.xml If the 'familyset' 'version' attribute is 21 or higher the LMP parser is used, otherwise the JB. API 15 4.0.4_r2.1 system_fonts.xml, vendor_fonts.xml, fallback_fonts.xml (system+vendor) no lang. API 16 4.1.1_r1 fallback_fonts-xx-XX.xml are added. Use the xx list in order. API 17 4.2.2_r1.1 fallback_fonts-xx.xml are removed and 'lang' is added. API 21 5.0.0_r1.0.1 fonts.xml replaces the other files. API 29 10.0.0_r1 /product/etc/fonts_customization.xml with base /product/fonts is added. The NDK interface is added and reading the files directly is discouraged. 35499 -
SkFontMgr_android_parser.h \class SkLanguage The SkLanguage class represents a human written language, and is used by text draw operations to determine which glyph to draw when drawing characters with variants (ie Han-derived characters). 7110 -
SkFontMgr_custom.cpp 7631 -
SkFontMgr_custom.h The base SkTypeface implementation for the custom font manager. 5027 -
SkFontMgr_custom_directory.cpp 4846 -
SkFontMgr_custom_embedded.cpp 5207 -
SkFontMgr_custom_empty.cpp 855 -
SkFontMgr_fontations_empty.cpp SkFontMgr_Fontations_Empty A SkFontMgr with an empty list of fonts, meant as a basic tool for font instantiation from data in testing, see TestFontMgr in FontToolUtils. 3179 -
SkFontMgr_fontconfig.cpp Since FontConfig is poorly documented, this gives a high level overview: FcConfig is a handle to a FontConfig configuration instance. Each 'configuration' is independent from any others which may exist. There exists a default global configuration which is created and destroyed by FcInit and FcFini, but this default should not normally be used. Instead, one should use FcConfigCreate and FcInit* to have a named local state. FcPatterns are {objectName -> [element]} (maps from object names to a list of elements). Each element is some internal data plus an FcValue which is a variant (a union with a type tag). Lists of elements are not typed, except by convention. Any collection of FcValues must be assumed to be heterogeneous by the code, but the code need not do anything particularly interesting if the values go against convention. Somewhat like DirectWrite, FontConfig supports synthetics through FC_EMBOLDEN and FC_MATRIX. Like all synthetic information, such information must be passed with the font data. 39995 -
SkFontMgr_FontConfigInterface.cpp Pointer to just after the last field of this class. 10169 -
SkFontMgr_fuchsia.cpp 21629 -
SkFontMgr_mac_ct.cpp Creates a typeface from a descriptor, searching the cache. 18830 -
SkFontMgr_win_dw.cpp localeNameLength and defaultFamilyNameLength must include the null terminator. 35902 0 %
SkFontScanner_fontations.cpp 8441 -
SkFontScanner_fontations_priv.h 1387 -
SkFontScanner_FreeType_priv.h 1773 -
SkGlobalInitialization_default.cpp Register most effects for deserialization. None of these are strictly required for Skia to operate, so if you're not using deserialization yourself, you can define SK_DISABLE_EFFECT_SERIALIZATION, or modify/replace this file as needed. 2162 0 %
SkImageEncoder_NDK.cpp 5628 -
SkImageGenerator_none.cpp 231 -
SkImageGenerator_skia.cpp 231 -
SkImageGeneratorCG.cpp 5392 -
SkImageGeneratorNDK.cpp 8823 -
SkImageGeneratorWIC.cpp Takes ownership of the imagingFactory Takes ownership of the imageSource 9002 -
SkMemory_malloc.cpp TODO: After b/169449588 is fixed, we will want to change this to restore original behavior instead of always disabling the flag. TODO: After b/158870657 is fixed and scudo is used globally, we can assert when an an error is returned. 4214 -
SkMemory_mozalloc.cpp 1288 63 %
SkNDKConversions.cpp 3974 -
SkNDKConversions.h 811 -
SkOSFile_ios.h allocator= 2003 -
SkOSFile_posix.cpp 5491 0 %
SkOSFile_stdio.cpp 4068 0 %
SkOSFile_win.cpp 7785 0 %
SkScalerContext_mac_ct.cpp 31045 -
SkScalerContext_mac_ct.h Unrotated variant of fCTFont. In 10.10.1 CTFontGetAdvancesForGlyphs applies the font transform to the width of the advances, but always sets the height to 0. This font is used to get the advances of the unrotated glyph, and then the rotation is applied separately. CT vertical metrics are pre-rotated (in em space, before transform) 90deg clock-wise. This makes kCTFontOrientationDefault dangerous, because the metrics from kCTFontOrientationHorizontal are in a different space from kCTFontOrientationVertical. With kCTFontOrientationVertical the advances must be unrotated. Sometimes, creating a copy of a CTFont with the same size but different trasform will select different underlying font data. As a result, avoid ever creating more than one CTFont per SkScalerContext to ensure that only one CTFont is used. As a result of the above (and other constraints) this font contains the size, but not the transform. The transform must always be applied separately. 3485 -
SkScalerContext_win_dw.cpp Note: In versions 8 and 8.1 of Windows, some calls in DWrite are not thread safe. The mutex returned from maybe_dw_mutex protects the calls that are problematic. 101824 71 %
SkScalerContext_win_dw.h The total matrix without the text height scale. 4415 100 %
SkTypeface_fontations.cpp 75353 -
SkTypeface_fontations_priv.h Implementation of AxisWrapper FFI C++ interface, allowing Rust to call back into C++ for populating variable axis availability information, see skpath_bridge.h. 12832 -
SkTypeface_FreeType.h Fetch units/EM from "head" table if needed (ie for bitmap fonts) 4694 -
SkTypeface_mac_ct.cpp Assumes src and dst are not nullptr. 57212 -
SkTypeface_mac_ct.h CTFontCopyVariationAxes provides the localized name of all axes, making it very slow. This is unfortunate, its result is needed just to see if there are any axes at all. To avoid calling internal APIs cache the result of CTFontCopyVariationAxes. https://github.com/WebKit/WebKit/commit/1842365d413ed87868e7d33d4fad1691fa3a8129 https://bugs.webkit.org/show_bug.cgi?id=232690 5387 -
SkTypeface_proxy.cpp 5170 -
SkTypeface_proxy.h 3543 -
SkTypeface_win_dw.cpp 46650 28 %
SkTypeface_win_dw.h dwrite_3.h incorrectly uses NTDDI_VERSION to hide immutable interfaces (it should only be used to gate changes to public ABI). The implementation files can (and must) get away with including SkDWriteNTDDI_VERSION.h which simply unsets NTDDI_VERSION, but this doesn't work well for this header which can be included in SkTypeface.cpp. Instead, ensure that any declarations hidden behind the NTDDI_VERSION are forward (backward?) declared here in case dwrite_3.h did not declare them. 8286 80 %