Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
fontcache.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkFont.h"
#include "include/core/SkFontStyle.h"
#include "include/core/SkFontTypes.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/GrDirectContext.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"

Go to the source code of this file.

Classes

class  FontCacheGM
 

Typedefs

using MaskFormat = skgpu::MaskFormat
 

Functions

static SkScalar draw_string (SkCanvas *canvas, const SkString &text, SkScalar x, SkScalar y, const SkFont &font)
 

Typedef Documentation

◆ MaskFormat

Definition at line 30 of file fontcache.cpp.

Function Documentation

◆ draw_string()

static SkScalar draw_string ( SkCanvas canvas,
const SkString text,
SkScalar  x,
SkScalar  y,
const SkFont font 
)
static

Definition at line 32 of file fontcache.cpp.

33 {
35 canvas->drawString(text, x, y, font, paint);
36 return x + font.measureText(text.c_str(), text.size(), SkTextEncoding::kUTF8);
37}
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
Definition SkCanvas.h:1803
const Paint & paint
std::u16string text
double y
double x
font
Font Metadata and Metrics.