mirror of https://github.com/aseprite/aseprite.git
Move font related types to src/app/fonts
This commit is contained in:
parent
ce989684d0
commit
2706d2d75a
2
laf
2
laf
|
@ -1 +1 @@
|
||||||
Subproject commit db9cb0de00067e34139c6f8ff4847cd572d68b31
|
Subproject commit d05217849afaa833baee761e425d59acd1b9828f
|
|
@ -1,5 +1,5 @@
|
||||||
# Aseprite
|
# Aseprite
|
||||||
# Copyright (C) 2018-2024 Igara Studio S.A.
|
# Copyright (C) 2018-2025 Igara Studio S.A.
|
||||||
# Copyright (C) 2001-2018 David Capello
|
# Copyright (C) 2001-2018 David Capello
|
||||||
|
|
||||||
# Generate a ui::Widget for each widget in a XML file
|
# Generate a ui::Widget for each widget in a XML file
|
||||||
|
@ -98,11 +98,11 @@ add_library(app-lib ${generated_files})
|
||||||
# These specific-platform files should be in an external library
|
# These specific-platform files should be in an external library
|
||||||
# (e.g. "base" or "os").
|
# (e.g. "base" or "os").
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(app-lib PRIVATE font_path_win.cpp)
|
target_sources(app-lib PRIVATE fonts/font_path_win.cpp)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
target_sources(app-lib PRIVATE font_path_osx.mm)
|
target_sources(app-lib PRIVATE fonts/font_path_osx.mm)
|
||||||
else()
|
else()
|
||||||
target_sources(app-lib PRIVATE font_path_unix.cpp)
|
target_sources(app-lib PRIVATE fonts/font_path_unix.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# This defines a specific webp decoding utility function for using
|
# This defines a specific webp decoding utility function for using
|
||||||
|
@ -544,8 +544,9 @@ target_sources(app-lib PRIVATE
|
||||||
file_system.cpp
|
file_system.cpp
|
||||||
filename_formatter.cpp
|
filename_formatter.cpp
|
||||||
flatten.cpp
|
flatten.cpp
|
||||||
font_info.cpp
|
fonts/font_data.cpp
|
||||||
font_path.cpp
|
fonts/font_info.cpp
|
||||||
|
fonts/font_path.cpp
|
||||||
gui_xml.cpp
|
gui_xml.cpp
|
||||||
i18n/strings.cpp
|
i18n/strings.cpp
|
||||||
i18n/xml_translator.cpp
|
i18n/xml_translator.cpp
|
||||||
|
@ -669,7 +670,6 @@ target_sources(app-lib PRIVATE
|
||||||
ui/search_entry.cpp
|
ui/search_entry.cpp
|
||||||
ui/select_accelerator.cpp
|
ui/select_accelerator.cpp
|
||||||
ui/selection_mode_field.cpp
|
ui/selection_mode_field.cpp
|
||||||
ui/skin/font_data.cpp
|
|
||||||
ui/skin/skin_part.cpp
|
ui/skin/skin_part.cpp
|
||||||
ui/skin/skin_property.cpp
|
ui/skin/skin_property.cpp
|
||||||
ui/skin/skin_slider_property.cpp
|
ui/skin/skin_slider_property.cpp
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "app/extensions.h"
|
#include "app/extensions.h"
|
||||||
#include "app/file/file.h"
|
#include "app/file/file.h"
|
||||||
#include "app/file_selector.h"
|
#include "app/file_selector.h"
|
||||||
|
#include "app/fonts/font_data.h"
|
||||||
#include "app/i18n/strings.h"
|
#include "app/i18n/strings.h"
|
||||||
#include "app/ini_file.h"
|
#include "app/ini_file.h"
|
||||||
#include "app/launcher.h"
|
#include "app/launcher.h"
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
#include "app/ui/rgbmap_algorithm_selector.h"
|
#include "app/ui/rgbmap_algorithm_selector.h"
|
||||||
#include "app/ui/sampling_selector.h"
|
#include "app/ui/sampling_selector.h"
|
||||||
#include "app/ui/separator_in_view.h"
|
#include "app/ui/separator_in_view.h"
|
||||||
#include "app/ui/skin/font_data.h"
|
|
||||||
#include "app/ui/skin/skin_theme.h"
|
#include "app/ui/skin/skin_theme.h"
|
||||||
#include "app/util/render_text.h"
|
#include "app/util/render_text.h"
|
||||||
#include "base/convert_to.h"
|
#include "base/convert_to.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2020-2024 Igara Studio S.A.
|
// Copyright (C) 2020-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2017 David Capello
|
// Copyright (C) 2001-2017 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/ui/skin/font_data.h"
|
#include "app/fonts/font_data.h"
|
||||||
|
|
||||||
#include "text/font.h"
|
#include "text/font.h"
|
||||||
#include "text/font_mgr.h"
|
#include "text/font_mgr.h"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
namespace app { namespace skin {
|
namespace app {
|
||||||
|
|
||||||
FontData::FontData(text::FontType type)
|
FontData::FontData(text::FontType type)
|
||||||
: m_type(type)
|
: m_type(type)
|
||||||
|
@ -73,4 +73,4 @@ text::FontRef FontData::getFont(text::FontMgrRef& fontMgr, int size)
|
||||||
return getFont(fontMgr, size, ui::guiscale());
|
return getFont(fontMgr, size, ui::guiscale());
|
||||||
}
|
}
|
||||||
|
|
||||||
}} // namespace app::skin
|
} // namespace app
|
|
@ -1,12 +1,12 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2020-2024 Igara Studio S.A.
|
// Copyright (C) 2020-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2017 David Capello
|
// Copyright (C) 2017 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
|
||||||
#ifndef APP_UI_SKIN_FONT_DATA_H_INCLUDED
|
#ifndef APP_FONTS_FONT_DATA_H_INCLUDED
|
||||||
#define APP_UI_SKIN_FONT_DATA_H_INCLUDED
|
#define APP_FONTS_FONT_DATA_H_INCLUDED
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "base/disable_copying.h"
|
#include "base/disable_copying.h"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace app { namespace skin {
|
namespace app {
|
||||||
|
|
||||||
// TODO should we merge this with FontInfo?
|
// TODO should we merge this with FontInfo?
|
||||||
class FontData {
|
class FontData {
|
||||||
|
@ -46,6 +46,6 @@ private:
|
||||||
DISABLE_COPYING(FontData);
|
DISABLE_COPYING(FontData);
|
||||||
};
|
};
|
||||||
|
|
||||||
}} // namespace app::skin
|
} // namespace app
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -8,7 +8,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
|
|
||||||
#include "app/pref/preferences.h"
|
#include "app/pref/preferences.h"
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
#include "base/split_string.h"
|
#include "base/split_string.h"
|
|
@ -4,8 +4,8 @@
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
|
||||||
#ifndef APP_UI_FONT_INFO_H_INCLUDED
|
#ifndef APP_FONTS_FONT_INFO_H_INCLUDED
|
||||||
#define APP_UI_FONT_INFO_H_INCLUDED
|
#define APP_FONTS_FONT_INFO_H_INCLUDED
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "base/convert_to.h"
|
#include "base/convert_to.h"
|
|
@ -1,12 +1,12 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (c) 2024 Igara Studio S.A.
|
// Copyright (c) 2024-2025 Igara Studio S.A.
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
|
||||||
#include "tests/app_test.h"
|
#include "tests/app_test.h"
|
||||||
|
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
|
|
||||||
using namespace app;
|
using namespace app;
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
|
@ -1,4 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
|
// Copyright (C) 2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2017-2018 David Capello
|
// Copyright (C) 2017-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_path.h"
|
||||||
|
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
|
||||||
#ifndef APP_FONT_PATH_H_INCLUDED
|
#ifndef APP_FONTS_FONT_PATH_H_INCLUDED
|
||||||
#define APP_FONT_PATH_H_INCLUDED
|
#define APP_FONTS_FONT_PATH_H_INCLUDED
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "base/paths.h"
|
#include "base/paths.h"
|
|
@ -1,4 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
|
// Copyright (C) 2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2017-2018 David Capello
|
// Copyright (C) 2017-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_path.h"
|
||||||
|
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
|
// Copyright (C) 2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2017-2018 David Capello
|
// Copyright (C) 2017-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_path.h"
|
||||||
|
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019 Igara Studio S.A.
|
// Copyright (C) 2019-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2017-2018 David Capello
|
// Copyright (C) 2017-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_path.h"
|
||||||
|
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
#include "base/string.h"
|
#include "base/string.h"
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (c) 2022-2024 Igara Studio S.A.
|
// Copyright (c) 2022-2025 Igara Studio S.A.
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
#include "app/ui/editor/select_text_box_state.h"
|
#include "app/ui/editor/select_text_box_state.h"
|
||||||
|
|
||||||
#include "app/app.h"
|
#include "app/app.h"
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
#include "app/ui/context_bar.h"
|
#include "app/ui/context_bar.h"
|
||||||
#include "app/ui/editor/editor.h"
|
#include "app/ui/editor/editor.h"
|
||||||
#include "app/ui/editor/writing_text_state.h"
|
#include "app/ui/editor/writing_text_state.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2022-2024 Igara Studio S.A.
|
// Copyright (C) 2022-2025 Igara Studio S.A.
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
#include "app/color_utils.h"
|
#include "app/color_utils.h"
|
||||||
#include "app/commands/command.h"
|
#include "app/commands/command.h"
|
||||||
#include "app/extra_cel.h"
|
#include "app/extra_cel.h"
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
#include "app/pref/preferences.h"
|
#include "app/pref/preferences.h"
|
||||||
#include "app/site.h"
|
#include "app/site.h"
|
||||||
#include "app/tx.h"
|
#include "app/tx.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (c) 2024 Igara Studio S.A.
|
// Copyright (c) 2024-2025 Igara Studio S.A.
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
#define APP_UI_FONT_ENTRY_H_INCLUDED
|
#define APP_UI_FONT_ENTRY_H_INCLUDED
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
#include "app/ui/button_set.h"
|
#include "app/ui/button_set.h"
|
||||||
#include "app/ui/search_entry.h"
|
#include "app/ui/search_entry.h"
|
||||||
#include "ui/box.h"
|
#include "ui/box.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2020-2024 Igara Studio S.A.
|
// Copyright (C) 2020-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
#include "app/app.h"
|
#include "app/app.h"
|
||||||
#include "app/file_selector.h"
|
#include "app/file_selector.h"
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_data.h"
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_info.h"
|
||||||
|
#include "app/fonts/font_path.h"
|
||||||
#include "app/i18n/strings.h"
|
#include "app/i18n/strings.h"
|
||||||
#include "app/match_words.h"
|
#include "app/match_words.h"
|
||||||
#include "app/recent_files.h"
|
#include "app/recent_files.h"
|
||||||
#include "app/ui/separator_in_view.h"
|
#include "app/ui/separator_in_view.h"
|
||||||
#include "app/ui/skin/font_data.h"
|
|
||||||
#include "app/ui/skin/skin_theme.h"
|
#include "app/ui/skin/skin_theme.h"
|
||||||
#include "app/util/conversion_to_surface.h"
|
#include "app/util/conversion_to_surface.h"
|
||||||
#include "app/util/render_text.h"
|
#include "app/util/render_text.h"
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
#include "app/app.h"
|
#include "app/app.h"
|
||||||
#include "app/console.h"
|
#include "app/console.h"
|
||||||
#include "app/extensions.h"
|
#include "app/extensions.h"
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_data.h"
|
||||||
#include "app/font_path.h"
|
#include "app/fonts/font_info.h"
|
||||||
|
#include "app/fonts/font_path.h"
|
||||||
#include "app/modules/gui.h"
|
#include "app/modules/gui.h"
|
||||||
#include "app/pref/preferences.h"
|
#include "app/pref/preferences.h"
|
||||||
#include "app/resource_finder.h"
|
#include "app/resource_finder.h"
|
||||||
#include "app/ui/app_menuitem.h"
|
#include "app/ui/app_menuitem.h"
|
||||||
#include "app/ui/keyboard_shortcuts.h"
|
#include "app/ui/keyboard_shortcuts.h"
|
||||||
#include "app/ui/skin/font_data.h"
|
|
||||||
#include "app/ui/skin/skin_property.h"
|
#include "app/ui/skin/skin_property.h"
|
||||||
#include "app/ui/skin/skin_slider_property.h"
|
#include "app/ui/skin/skin_slider_property.h"
|
||||||
#include "app/util/render_text.h"
|
#include "app/util/render_text.h"
|
||||||
|
|
|
@ -29,11 +29,13 @@ class Entry;
|
||||||
class Graphics;
|
class Graphics;
|
||||||
} // namespace ui
|
} // namespace ui
|
||||||
|
|
||||||
namespace app { namespace skin {
|
namespace app {
|
||||||
|
|
||||||
class FontData;
|
class FontData;
|
||||||
using FontDataMap = std::map<std::string, FontData*>;
|
using FontDataMap = std::map<std::string, FontData*>;
|
||||||
|
|
||||||
|
namespace skin {
|
||||||
|
|
||||||
class ThemeFont {
|
class ThemeFont {
|
||||||
public:
|
public:
|
||||||
ThemeFont() {}
|
ThemeFont() {}
|
||||||
|
@ -227,6 +229,7 @@ private:
|
||||||
int m_preferredUIScaling;
|
int m_preferredUIScaling;
|
||||||
};
|
};
|
||||||
|
|
||||||
}} // namespace app::skin
|
} // namespace skin
|
||||||
|
} // namespace app
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include "app/util/render_text.h"
|
#include "app/util/render_text.h"
|
||||||
|
|
||||||
#include "app/font_info.h"
|
#include "app/fonts/font_info.h"
|
||||||
#include "app/ui/skin/skin_theme.h"
|
#include "app/ui/skin/skin_theme.h"
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
#include "doc/blend_funcs.h"
|
#include "doc/blend_funcs.h"
|
||||||
|
|
Loading…
Reference in New Issue