class

CArcTextContrast

Module
Arc
Header
#include "Arc/Text/CArcFont.h"
Namespace
Arcf

Properties

TypeNameDescription
static constexpr floatCOVERAGE_UV_OFFSETThe text UVs the shader recognises: glyph quads from the bitmap atlas are emitted with U shifted into these bands, which is how one pipeline tells coverage (reshape, filter under a transform) from an image or a solid quad without a vertex-format change. Default -16.0f.
static constexpr floatFILTERED_COVERAGE_UV_OFFSETDefault -32.0f.
static constexpr floatPLAIN_COVERAGE_UV_SHIFTAdded to either band for a glyph drawn with plain coverage (CArcFont::HasPlainCoverage): -48 and -64. Default -32.0f.
static constexpr floatFLOATING_COVERAGE_UV_SHIFTAdded to either band for a text glyph inside a floating surface (CArcUIRenderer::PushFloatingText): -80 and -96. Icons keep plain coverage there, so the two shifts never combine. Default -64.0f.
static constexpr floatDEFAULT_GAMMAFitted to the references with TEXT_STEM_DARKEN_EM: the menu bar's ink against the reference is 1.00x dark, 1.01x light, 1.02x high contrast (the curve it replaces: 1.01x, 1.23x, 0.96x). Default 2.2f.
static constexpr floatDEFAULT_CONTRASTDefault 0.3f.
static constexpr floatDEFAULT_FLOATING_GAMMAText inside a floating surface (a popover, a confirm): the export's browser draws those on their own layer with less of the gamma lift. With the window's pair, editor-mod-mode's confirm and editor-mcp-indicator's popover carried 1.08-1.25x the reference's ink in light text and 0.88-0.92x in dark text, where the menu bar under the same colours measured 1.02x. Default 1.4f.
static constexpr floatDEFAULT_FLOATING_CONTRASTDefault 0.0f.

Constructors

SignatureNameDescription
CArcTextContrast() = deleteCArcTextContrast

Public functions

ReturnsNameDescription
voidSet
voidSetFloating
floatGamma
floatContrast
floatFloatingGamma
floatFloatingContrast
floatApply
floatAtlasUThe atlas U a glyph vertex's banded U stands for.

Function details

CArcTextContrast

C++
CArcTextContrast() = delete

Set

C++
static void Set(float gamma, float contrast)

SetFloating

C++
static void SetFloating(float gamma, float contrast)

Gamma

C++
static float Gamma()

Contrast

C++
static float Contrast()

FloatingGamma

C++
static float FloatingGamma()

FloatingContrast

C++
static float FloatingContrast()

Apply

C++
static float Apply(float coverage, const ArcColor& textColor, bool floating = false)

AtlasU

C++
static float AtlasU(float bandedU)

The atlas U a glyph vertex's banded U stands for.

Generated from Arc/Text/CArcFont.h via arc.json · Nov 5, 2026Version 1.0.0