/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #include "Base/Wrapper.hpp" #include "Math/Math.hpp" #include "Image/Image.hpp" #include "Scene/Texture.hpp" #include "Scene/Text/FontAtlasType.hpp" #include #include #include namespace OpenVulkano::Scene { struct GlyphInfo { //GlyphGeometry geometry; //GlyphBox glyphBox; Math::Vector2f_SIMD pos[4] = {}; Math::Vector2f_SIMD uv[4] = {}; double advance = 0; }; struct AtlasMetadata { // vertical difference between baselines double lineHeight = 0; FontAtlasType atlasType = FontAtlasType::UNKNOWN; }; struct AtlasData { std::map glyphs; AtlasMetadata meta; Unique img; Texture texture; operator bool() const { return !glyphs.empty() && texture.textureBuffer; } }; }