Skip to content

Commit d052178

Browse files
committed
Move text::FontType to its own file
1 parent db9cb0d commit d052178

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

text/font.h

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// LAF Text Library
2-
// Copyright (c) 2019-2024 Igara Studio S.A.
2+
// Copyright (c) 2019-2025 Igara Studio S.A.
33
// Copyright (c) 2012-2017 David Capello
44
//
55
// This file is released under the terms of the MIT license.
@@ -12,6 +12,7 @@
1212
#include "base/ints.h"
1313
#include "base/ref.h"
1414
#include "gfx/fwd.h"
15+
#include "text/font_type.h"
1516
#include "text/fwd.h"
1617

1718
#include <string>
@@ -22,13 +23,6 @@ class Paint;
2223

2324
namespace text {
2425

25-
enum class FontType {
26-
Unknown,
27-
SpriteSheet, // SpriteSheet
28-
FreeType, // FreeType
29-
Native, // Skia
30-
};
31-
3226
class Font : public base::RefCount {
3327
public:
3428
Font() : m_fallback(nullptr) {}

text/font_type.h

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// LAF Text Library
2+
// Copyright (c) 2025 Igara Studio S.A.
3+
//
4+
// This file is released under the terms of the MIT license.
5+
// Read LICENSE.txt for more information.
6+
7+
#ifndef LAF_TEXT_FONT_TYPE_H_INCLUDED
8+
#define LAF_TEXT_FONT_TYPE_H_INCLUDED
9+
#pragma once
10+
11+
#include "base/ints.h"
12+
13+
namespace text {
14+
15+
enum class FontType : uint8_t {
16+
Unknown,
17+
SpriteSheet, // SpriteSheet
18+
FreeType, // FreeType
19+
Native, // Skia
20+
};
21+
22+
} // namespace text
23+
24+
#endif

text/fwd.h

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class DrawTextDelegate;
2222
class Font;
2323
using FontRef = base::Ref<Font>;
2424

25+
enum class FontType : uint8_t;
26+
2527
struct FontMetrics;
2628

2729
class FontMgr;

0 commit comments

Comments
 (0)