Flutter Engine
The Flutter Engine
SkTypeface_win.h
Go to the documentation of this file.
1/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkTypeface_win_DEFINED
9#define SkTypeface_win_DEFINED
10
14
15#ifdef SK_BUILD_FOR_WIN
16
17#ifdef UNICODE
18typedef struct tagLOGFONTW LOGFONTW;
19typedef LOGFONTW LOGFONT;
20#else
21typedef struct tagLOGFONTA LOGFONTA;
22typedef LOGFONTA LOGFONT;
23#endif // UNICODE
24
25/**
26 * Like the other Typeface create methods, this returns a new reference to the
27 * corresponding typeface for the specified logfont. The caller is responsible
28 * for calling unref() when it is finished.
29 */
30SK_API sk_sp<SkTypeface> SkCreateTypefaceFromLOGFONT(const LOGFONT&);
31
32/**
33 * Copy the LOGFONT associated with this typeface into the lf parameter. Note
34 * that the lfHeight will need to be set afterwards, since the typeface does
35 * not track this (the paint does).
36 * typeface may be NULL, in which case we return the logfont for the default font.
37 */
38SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf);
39
40/**
41 * Set an optional callback to ensure that the data behind a LOGFONT is loaded.
42 * This will get called if Skia tries to access the data but hits a failure.
43 * Normally this is null, and is only required if the font data needs to be
44 * remotely (re)loaded.
45 */
46SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&));
47
48// Experimental!
49//
50class SkFontMgr;
51struct IDWriteFactory;
52struct IDWriteFontCollection;
53struct IDWriteFontFallback;
54
55SK_API sk_sp<SkFontMgr> SkFontMgr_New_GDI();
56SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory = nullptr,
57 IDWriteFontCollection* collection = nullptr);
58SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory,
59 IDWriteFontCollection* collection,
60 IDWriteFontFallback* fallback);
61
62#endif // SK_BUILD_FOR_WIN
63#endif // SkTypeface_win_DEFINED
#define SK_API
Definition: SkAPI.h:35
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 Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port fallback
Definition: switches.h:154
LOGFONTW LOGFONT
struct tagLOGFONTW LOGFONTW