Flutter Engine
The Flutter Engine
|
#include "include/core/SkDataTable.h"
#include "include/core/SkFontArguments.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkFontStyle.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkMutex.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTDArray.h"
#include "include/private/base/SkTemplates.h"
#include "include/private/base/SkThreadAnnotations.h"
#include "src/base/SkTSort.h"
#include "src/core/SkAdvancedTypefaceMetrics.h"
#include "src/core/SkFontDescriptor.h"
#include "src/core/SkOSFile.h"
#include "src/core/SkScalerContext.h"
#include "src/core/SkTypefaceCache.h"
#include "src/ports/SkTypeface_FreeType.h"
#include <fontconfig/fontconfig.h>
#include <string.h>
#include <array>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <utility>
Go to the source code of this file.
Classes | |
class | SkAutoFc< T, C, D > |
struct | MapRanges |
class | SkTypeface_fontconfig |
class | SkFontMgr_fontconfig |
Macros | |
#define | FC_POSTSCRIPT_NAME "postscriptname" |
#define | FC_WEIGHT_DEMILIGHT 65 |
Typedefs | |
typedef SkAutoFc< FcCharSet, FcCharSetCreate, FcCharSetDestroy > | SkAutoFcCharSet |
typedef SkAutoFc< FcConfig, FcConfigCreate, FcConfigDestroy > | SkAutoFcConfig |
typedef SkAutoFc< FcFontSet, FcFontSetCreate, FcFontSetDestroy > | SkAutoFcFontSet |
typedef SkAutoFc< FcLangSet, FcLangSetCreate, FcLangSetDestroy > | SkAutoFcLangSet |
typedef SkAutoFc< FcObjectSet, FcObjectSetCreate, FcObjectSetDestroy > | SkAutoFcObjectSet |
typedef SkAutoFc< FcPattern, FcPatternCreate, FcPatternDestroy > | SkAutoFcPattern |
Enumerations | |
enum | SkWeakReturn { kIsWeak_WeakReturn , kIsStrong_WeakReturn , kNoId_WeakReturn } |
Functions | |
template<typename T , void(*)(T *) D> | |
void | FcTDestroy (T *t) |
static bool | get_bool (FcPattern *pattern, const char object[], bool missing=false) |
static int | get_int (FcPattern *pattern, const char object[], int missing) |
static const char * | get_string (FcPattern *pattern, const char object[], const char *missing="") |
static const FcMatrix * | get_matrix (FcPattern *pattern, const char object[]) |
static SkWeakReturn | is_weak (FcPattern *pattern, const char object[], int id) |
static void | remove_weak (FcPattern *pattern, const char object[]) |
static int | map_range (SkScalar value, SkScalar old_min, SkScalar old_max, SkScalar new_min, SkScalar new_max) |
static SkScalar | map_ranges (SkScalar val, MapRanges const ranges[], int rangesCount) |
static SkFontStyle | skfontstyle_from_fcpattern (FcPattern *pattern) |
static void | fcpattern_from_skfontstyle (SkFontStyle style, FcPattern *pattern) |
sk_sp< SkFontMgr > | SkFontMgr_New_FontConfig (FcConfig *fc) |
#define FC_POSTSCRIPT_NAME "postscriptname" |
Definition at line 52 of file SkFontMgr_fontconfig.cpp.
#define FC_WEIGHT_DEMILIGHT 65 |
Definition at line 316 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcCharSet, FcCharSetCreate, FcCharSetDestroy> SkAutoFcCharSet |
Definition at line 128 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcConfig, FcConfigCreate, FcConfigDestroy> SkAutoFcConfig |
Definition at line 129 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcFontSet, FcFontSetCreate, FcFontSetDestroy> SkAutoFcFontSet |
Definition at line 130 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcLangSet, FcLangSetCreate, FcLangSetDestroy> SkAutoFcLangSet |
Definition at line 131 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcObjectSet, FcObjectSetCreate, FcObjectSetDestroy> SkAutoFcObjectSet |
Definition at line 132 of file SkFontMgr_fontconfig.cpp.
typedef SkAutoFc<FcPattern, FcPatternCreate, FcPatternDestroy> SkAutoFcPattern |
Definition at line 133 of file SkFontMgr_fontconfig.cpp.
enum SkWeakReturn |
Enumerator | |
---|---|
kIsWeak_WeakReturn | |
kIsStrong_WeakReturn | |
kNoId_WeakReturn |
Definition at line 167 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 365 of file SkFontMgr_fontconfig.cpp.
Definition at line 111 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 135 of file SkFontMgr_fontconfig.cpp.
Definition at line 143 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 159 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 151 of file SkFontMgr_fontconfig.cpp.
|
static |
Ideally there would exist a call like FcResult FcPatternIsWeak(pattern, object, id, FcBool* isWeak); Sometime after 2.12.4 FcPatternGetWithBinding was added which can retrieve the binding.
However, there is no such call and as of Fc 2.11.0 even FcPatternEquals ignores the weak bit. Currently, the only reliable way of finding the weak bit is by its effect on matching. The weak bit only affects the matching of FC_FAMILY and FC_POSTSCRIPT_NAME object values. A element with the weak bit is scored after FC_LANG, without the weak bit is scored before. Note that the weak bit is stored on the element, not on the value it holds.
Definition at line 182 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 282 of file SkFontMgr_fontconfig.cpp.
Definition at line 296 of file SkFontMgr_fontconfig.cpp.
|
static |
Removes weak elements from either FC_FAMILY or FC_POSTSCRIPT_NAME objects in the property. This can be quite expensive, and should not be used more than once per font lookup. This removes all of the weak elements after the last strong element.
Definition at line 250 of file SkFontMgr_fontconfig.cpp.
Create a font manager around a FontConfig instance. If 'fc' is NULL, will use a new default config. Takes ownership of 'fc' and will call FcConfigDestroy on it.
Definition at line 970 of file SkFontMgr_fontconfig.cpp.
|
static |
Definition at line 319 of file SkFontMgr_fontconfig.cpp.