GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
font_loader.h
[詳解]
1
3
4// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5// Released under the MIT license
6// https://opensource.org/licenses/mit-license.php
7
8#ifndef DESIGNLAB_FONT_LOADER_H_
9#define DESIGNLAB_FONT_LOADER_H_
10
11#include <string>
12#include <map>
13
14#include "singleton.h"
15
16
17namespace designlab
18{
19
31class FontLoader final : public Singleton<FontLoader>
32{
33public:
45 [[nodiscard]] int GetFontHandle(const std::string& file_path);
46
47private:
49 FontLoader() = default;
50 ~FontLoader() = default;
51 FontLoader(const FontLoader& r) = default;
52 FontLoader& operator=(const FontLoader& r) = default;
53
55 std::map<std::string, int> font_handle_map_;
56};
57
58} // namespace designlab
59
60
61#endif // DESIGNLAB_FONT_LOADER_H_
Dxlibのフォントを読み込むクラス.
Definition font_loader.h:32
int GetFontHandle(const std::string &file_path)
Dxlibでは特定のフォントで描画する際に,フォントのハンドルを指定する. この関数では,フォントのファイルパスを指定すると, フォントのハンドル番号を返す. フォントがまだ読み込まれていない場...
Singletonクラス作成のためのテンプレートクラス.
Definition singleton.h:28