#pragma once #include #include #include #include #include "lumacs/color.hpp" namespace lumacs { // Font weight enum class FontWeight { Normal, Bold, Light, }; // Font slant enum class FontSlant { Normal, Italic, Oblique }; struct FaceAttributes { // GUI-specific attributes (ignored in standard TUI/Ncurses) std::optional family; // e.g., "Fira Code", "Arial" std::optional height; // 1/10 pt. e.g., 120 = 12pt // Universal attributes (Supported in TUI via Bold/Italic flags) std::optional weight; // Normal vs Bold std::optional slant; // Normal vs Italic std::optional foreground; std::optional background; std::optional underline; std::optional inverse; std::optional inherit; // Name of face to inherit from // Merging logic: apply other on top of this void merge(const FaceAttributes& other) { if (other.family) family = other.family; if (other.height) height = other.height; if (other.weight) weight = other.weight; if (other.slant) slant = other.slant; if (other.foreground) foreground = other.foreground; if (other.background) background = other.background; if (other.underline) underline = other.underline; if (other.inverse) inverse = other.inverse; if (other.inherit) inherit = other.inherit; } }; class Face { public: Face(std::string name) : name_(std::move(name)) {} const std::string& name() const { return name_; } FaceAttributes& attributes() { return attributes_; } const FaceAttributes& attributes() const { return attributes_; } private: std::string name_; FaceAttributes attributes_; }; } // namespace lumacs