The chat "Emoji style: Color" option renders the merged emoji in color (COLR/CPAL Twemoji) instead of the monochrome NotoEmoji subset. This needs FreeType, which the default stb_truetype rasterizer can't do for color glyphs. - Vendor imgui_freetype (matches the bundled 1.92 ImFontLoader API) and embed a 1.4 MB COLRv0 Twemoji font (no libpng/harfbuzz needed). - CMake gains an optional FreeType path: native Linux/macOS use the system FreeType via find_package; the mingw-w64 cross-compile has none, so build.sh --win-release now cross-builds a minimal static FreeType (scripts/build-freetype-mingw.sh) and passes it in. Absent FreeType => graceful monochrome fallback, so no build breaks. - Typography selects the FreeType loader + the color font (LoadColor) when color emoji is on, else the stb loader + mono subset; toggling reloads the atlas. Both the DX11 and OpenGL backends already support the 1.92 RGBA dynamic atlas, so color glyphs render. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
1.0 KiB
C++
20 lines
1.0 KiB
C++
// DragonX Wallet - INCBIN font embedding (CMake-generated)
|
|
// Copyright 2024-2026 The Hush Developers
|
|
// Released under the GPLv3
|
|
//
|
|
// This file is generated by CMake's configure_file() from
|
|
// src/embedded/embedded_fonts.cpp.in — do NOT edit the generated copy.
|
|
// The absolute paths below are resolved at CMake configure time.
|
|
|
|
#include "incbin.h"
|
|
|
|
INCBIN(ubuntu_regular, "@CMAKE_SOURCE_DIR@/res/fonts/Ubuntu-R.ttf");
|
|
INCBIN(ubuntu_light, "@CMAKE_SOURCE_DIR@/res/fonts/Ubuntu-Light.ttf");
|
|
INCBIN(ubuntu_medium, "@CMAKE_SOURCE_DIR@/res/fonts/Ubuntu-Medium.ttf");
|
|
INCBIN(ubuntu_mono, "@CMAKE_SOURCE_DIR@/res/fonts/UbuntuMono-R.ttf");
|
|
INCBIN(material_icons, "@CMAKE_SOURCE_DIR@/res/fonts/MaterialIcons-Regular.ttf");
|
|
INCBIN(mdi_pickaxe_subset, "@CMAKE_SOURCE_DIR@/res/fonts/MaterialDesignIcons-Pickaxe-Subset.ttf");
|
|
INCBIN(noto_cjk_subset, "@CMAKE_SOURCE_DIR@/res/fonts/NotoSansCJK-Subset.ttf");
|
|
INCBIN(noto_emoji_subset, "@CMAKE_SOURCE_DIR@/res/fonts/NotoEmoji-Subset.ttf");
|
|
INCBIN(twemoji_color, "@CMAKE_SOURCE_DIR@/res/fonts/TwemojiMozilla-Color.ttf");
|