TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_style_text.h File Reference
#include <stdint.h>
#include <cstring>
#include <string_view>

Go to the source code of this file.

Classes

struct  tachyon::LanguageTag
 A BCP 47 language tag ("ja", "zh-Hant", "ko-KR") stored inline, so text styles stay plain values. More...
class  tachyon::TextLayoutStyle
 How a text block is laid out in its box; shared by all states of a Style. More...
class  tachyon::TextDecoration
 One text decoration line (underline, overline, ...). More...
class  tachyon::TextStyle
 What text is measured and laid out from: font, metrics and decoration lines. More...

Namespaces

namespace  tachyon

Enumerations

enum class  tachyon::TextID : uint32_t { tachyon::TextID::Invalid = 0 }
 Handle for text registered with the text system (ITextSystem::RegisterText and friends). More...
enum class  tachyon::IconID : uint32_t { tachyon::IconID::Invalid = 0 }
 Handle for an icon registered with ITextSystem::RegisterIconFromSVG / RegisterIconFromSVGFile. More...
enum class  tachyon::FontID : uint32_t { tachyon::FontID::Invalid = 0 }
 Handle for a font family registered with ITextSystem::RegisterFontFamily(). More...
enum class  tachyon::TextDirection : uint8_t { tachyon::TextDirection::Auto , tachyon::TextDirection::LeftToRight , tachyon::TextDirection::RightToLeft }
 Writing direction of text (CSS: direction). More...
enum class  tachyon::TextWrap : uint8_t { tachyon::TextWrap::NoWrap = 0 , tachyon::TextWrap::Wrap , tachyon::TextWrap::WordChar }
 How text wraps in its box (CSS: text-wrap). More...
enum class  tachyon::TextAlign : uint8_t {
  tachyon::TextAlign::Start = 0 , tachyon::TextAlign::Center , tachyon::TextAlign::End , tachyon::TextAlign::Left ,
  tachyon::TextAlign::Right , tachyon::TextAlign::Top , tachyon::TextAlign::Bottom
}
 Alignment of text in its box (CSS: text-align, -tachyon-vertical-text-align). More...
enum class  tachyon::TextBaseline : uint8_t {
  tachyon::TextBaseline::Alphabetic , tachyon::TextBaseline::Ideographic , tachyon::TextBaseline::Central , tachyon::TextBaseline::Hanging ,
  tachyon::TextBaseline::Mathematical , tachyon::TextBaseline::Middle , tachyon::TextBaseline::TextTop , tachyon::TextBaseline::TextBottom ,
  tachyon::TextBaseline::Max
}
 Font baseline that text aligns on (TextLayoutStyle::baseline). More...
enum class  tachyon::DecorationStyle : uint8_t {
  tachyon::DecorationStyle::Solid = 0 , tachyon::DecorationStyle::Double , tachyon::DecorationStyle::Dotted , tachyon::DecorationStyle::Dashed ,
  tachyon::DecorationStyle::Wavy
}
 Line style of a TextDecoration. More...
enum class  tachyon::FontFamily : uint8_t {
  tachyon::FontFamily::Default , tachyon::FontFamily::Emoji , tachyon::FontFamily::SansSerif , tachyon::FontFamily::Serif ,
  tachyon::FontFamily::Monospace , tachyon::FontFamily::Math
}
 Generic font family, used when TextStyle::fontId names no registered family. More...
enum class  tachyon::FontWeight : uint8_t {
  tachyon::FontWeight::Normal , tachyon::FontWeight::Thin , tachyon::FontWeight::ExtraLight , tachyon::FontWeight::UltraLight ,
  tachyon::FontWeight::Light , tachyon::FontWeight::Regular , tachyon::FontWeight::Medium , tachyon::FontWeight::DemiBold ,
  tachyon::FontWeight::SemiBold , tachyon::FontWeight::Bold , tachyon::FontWeight::ExtraBold , tachyon::FontWeight::UltraBold ,
  tachyon::FontWeight::Black , tachyon::FontWeight::Heavy , tachyon::FontWeight::ExtraBlack , tachyon::FontWeight::UltraBlack
}
 Font weight (CSS: font-weight); the CSS weight is in parentheses. More...
enum class  tachyon::FontStyle : uint8_t { tachyon::FontStyle::Normal = 0 , tachyon::FontStyle::Italic , tachyon::FontStyle::Oblique }
 Font slant (CSS: font-style). More...
enum class  tachyon::FontStretch : uint8_t {
  tachyon::FontStretch::Normal = 0 , tachyon::FontStretch::UltraCondensed , tachyon::FontStretch::ExtraCondensed , tachyon::FontStretch::Condensed ,
  tachyon::FontStretch::SemiCondensed , tachyon::FontStretch::SemiExpanded , tachyon::FontStretch::Expanded , tachyon::FontStretch::ExtraExpanded ,
  tachyon::FontStretch::UltraExpanded
}
 Font width (CSS: font-stretch); the width factor is in parentheses. More...
enum class  tachyon::LineHeight : uint8_t { tachyon::LineHeight::Normal = 0 , tachyon::LineHeight::MetricsRelative , tachyon::LineHeight::FontSizeRelative , tachyon::LineHeight::Absolute }
 How TextStyle::lineHeight is read. More...
enum class  tachyon::VerticalTrim : uint8_t { tachyon::VerticalTrim::Default = 0 , tachyon::VerticalTrim::CapToBaseline }
 Font metrics that bound a line for vertical alignment (CSS: -tachyon-vertical-trim). More...
enum class  tachyon::WordWrap : uint8_t { tachyon::WordWrap::None , tachyon::WordWrap::Normal , tachyon::WordWrap::BreakWord }
 Word wrapping mode of TextLayoutStyle::wrapMode. More...
enum class  tachyon::TextOverflow : uint8_t { tachyon::TextOverflow::Clip , tachyon::TextOverflow::Ellipsis }
 What happens to text that doesn't fit its box (CSS: text-overflow). More...
enum class  tachyon::DecorationLine : uint8_t { tachyon::DecorationLine::Under , tachyon::DecorationLine::Bottom , tachyon::DecorationLine::Over , tachyon::DecorationLine::Through }
 The decoration lines of a TextStyle; indexes StyleState::decorationColors. More...

Functions

FontID tachyon::FontIDFromName (std::string_view familyName)
 Case-insensitive, like CSS family names. Returns FontID::Invalid for an empty name.