Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions
scaledemoji.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/SkFontMetrics.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/SkTextBlob.h"
#include "include/core/SkTypeface.h"
#include "src/base/SkUTF.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"
#include <string.h>
#include <initializer_list>

Go to the source code of this file.

Classes

class  skiagm::ScaledEmojiGM
 
class  skiagm::ScaledEmojiPosGM
 
class  skiagm::ScaledEmojiPerspectiveGM
 

Namespaces

namespace  skiagm
 

Functions

static sk_sp< SkTextBlobmake_hpos_test_blob_utf8 (const char *text, const SkFont &font)
 

Function Documentation

◆ make_hpos_test_blob_utf8()

static sk_sp< SkTextBlob > make_hpos_test_blob_utf8 ( const char *  text,
const SkFont font 
)
static

Definition at line 28 of file scaledemoji.cpp.

28 {
31 size_t len = strlen(text);
32 int glyphCount = font.countText(text, len, enc);
33 const auto& buffer = builder.allocRunPosH(font, glyphCount, 0);
34 (void)font.textToGlyphs(text, len, enc, buffer.glyphs, glyphCount);
35 font.getXPos(buffer.glyphs, glyphCount, buffer.pos);
36 return builder.make();
37}
SkTextEncoding
Definition: SkFontTypes.h:11
@ kUTF8
uses bytes to represent UTF-8 or ASCII
std::u16string text
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
font
Font Metadata and Metrics.