Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
core
SkTextFormatParams.h
Go to the documentation of this file.
1
/*
2
* Copyright 2010 The Android Open Source Project
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
#ifndef SkTextFormatParams_DEFINES
8
#define SkTextFormatParams_DEFINES
9
10
#include "
include/core/SkScalar.h
"
11
#include "
include/core/SkTypes.h
"
12
13
#include <iterator>
14
15
// The fraction of text size to embolden fake bold text scales with text size.
16
// At 9 points or below, the stroke width is increased by text size / 24.
17
// At 36 points and above, it is increased by text size / 32. In between,
18
// it is interpolated between those values.
19
static
const
SkScalar
kStdFakeBoldInterpKeys
[] = {
20
SK_Scalar1
*9,
21
SK_Scalar1
*36,
22
};
23
static
const
SkScalar
kStdFakeBoldInterpValues
[] = {
24
SK_Scalar1
/24,
25
SK_Scalar1
/32,
26
};
27
static_assert
(std::size(
kStdFakeBoldInterpKeys
) == std::size(
kStdFakeBoldInterpValues
),
28
"mismatched_array_size"
);
29
static
const
int
kStdFakeBoldInterpLength
= std::size(
kStdFakeBoldInterpKeys
);
30
31
#endif
//SkTextFormatParams_DEFINES
SkScalar.h
SK_Scalar1
#define SK_Scalar1
Definition
SkScalar.h:18
kStdFakeBoldInterpValues
static const SkScalar kStdFakeBoldInterpValues[]
Definition
SkTextFormatParams.h:23
kStdFakeBoldInterpLength
static const int kStdFakeBoldInterpLength
Definition
SkTextFormatParams.h:29
kStdFakeBoldInterpKeys
static const SkScalar kStdFakeBoldInterpKeys[]
Definition
SkTextFormatParams.h:19
SkTypes.h
SkScalar
float SkScalar
Definition
extension.cpp:12
Generated on Fri Apr 26 2024 06:16:49 for Flutter Engine by
1.9.8