Flutter Engine
The Flutter Engine
Classes | Macros | Enumerations | Functions | Variables
SkCustomTypeface.cpp File Reference
#include "include/utils/SkCustomTypeface.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkData.h"
#include "include/core/SkDrawable.h"
#include "include/core/SkFontArguments.h"
#include "include/core/SkFontMetrics.h"
#include "include/core/SkFontParameters.h"
#include "include/core/SkFontStyle.h"
#include "include/core/SkFontTypes.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.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/SkAlign.h"
#include "include/private/base/SkFixed.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkAdvancedTypefaceMetrics.h"
#include "src/core/SkFontDescriptor.h"
#include "src/core/SkGlyph.h"
#include "src/core/SkMask.h"
#include "src/core/SkScalerContext.h"
#include "src/core/SkStreamPriv.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  SkUserTypeface
 
class  SkUserScalerContext
 
class  AutoRestorePosition
 

Macros

#define SCALE_X(field)   dst.field *= sx
 
#define SCALE_Y(field)   dst.field *= sy
 

Enumerations

enum  GlyphType : uint32_t { kPath , kDrawable }
 

Functions

static SkFontMetrics scale_fontmetrics (const SkFontMetrics &src, float sx, float sy)
 

Variables

static constexpr int kMaxGlyphCount = 65536
 
static constexpr size_t kHeaderSize = 16
 
static const char gHeaderString [] = "SkUserTypeface01"
 

Macro Definition Documentation

◆ SCALE_X

#define SCALE_X (   field)    dst.field *= sx

◆ SCALE_Y

#define SCALE_Y (   field)    dst.field *= sy

Enumeration Type Documentation

◆ GlyphType

enum GlyphType : uint32_t
Enumerator
kPath 
kDrawable 

Definition at line 366 of file SkCustomTypeface.cpp.

366: uint32_t { kPath, kDrawable };
@ kDrawable

Function Documentation

◆ scale_fontmetrics()

static SkFontMetrics scale_fontmetrics ( const SkFontMetrics src,
float  sx,
float  sy 
)
static

Definition at line 54 of file SkCustomTypeface.cpp.

54 {
56
57 #define SCALE_X(field) dst.field *= sx
58 #define SCALE_Y(field) dst.field *= sy
59
60 SCALE_X(fAvgCharWidth);
61 SCALE_X(fMaxCharWidth);
62 SCALE_X(fXMin);
63 SCALE_X(fXMax);
64
65 SCALE_Y(fTop);
66 SCALE_Y(fAscent);
67 SCALE_Y(fDescent);
68 SCALE_Y(fBottom);
69 SCALE_Y(fLeading);
70 SCALE_Y(fXHeight);
71 SCALE_Y(fCapHeight);
72 SCALE_Y(fUnderlineThickness);
73 SCALE_Y(fUnderlinePosition);
74 SCALE_Y(fStrikeoutThickness);
75 SCALE_Y(fStrikeoutPosition);
76
77 #undef SCALE_X
78 #undef SCALE_Y
79
80 return dst;
81}
#define SCALE_X(field)
#define SCALE_Y(field)
dst
Definition: cp.py:12

Variable Documentation

◆ gHeaderString

const char gHeaderString[] = "SkUserTypeface01"
static

Definition at line 363 of file SkCustomTypeface.cpp.

◆ kHeaderSize

constexpr size_t kHeaderSize = 16
staticconstexpr

Definition at line 362 of file SkCustomTypeface.cpp.

◆ kMaxGlyphCount

constexpr int kMaxGlyphCount = 65536
staticconstexpr

Definition at line 361 of file SkCustomTypeface.cpp.