Debian Codegraph @

src/core/SkTextFormatParams.h

raw
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