Repository navigation
cvcGL: colour emoji and the symbols UI fonts lack, from bundled fonts (DejaVu Sans Mono, Twemoji) - #1056
Merged
Conversation
… (DejaVu Sans Mono, Twemoji) A post's 💯 and a feed's ↩ ⇄ ♥ drew as '?' in the ImGui hosts, and the browser pages had only ImGui's ASCII face. - src/cvcGL/fonts: DejaVu Sans Mono 2.37 and Twemoji Mozilla 0.7.0 (COLR), with their licences (THIRD_PARTY_NOTICES too). Installed to share/libcvc/fonts, copied into the build tree, and embedded at /usr/share/libcvc/fonts in arigl-web, ariglx-web and cyprty. UiFonts finds them in CVC_UI_FONT_DIR, beside the module holding cvcGL, or at the install's data directory. - The overlay's UI font falls back on DejaVu Sans Mono where nothing else resolves (the browser), and merges it under any other UI font for its symbols. Emoji: Twemoji, else the system's colour emoji font, merged with FreeType's colour glyphs. - Colour glyphs need imgui's FreeType loader, which cvcpkg's imgui 1.92.9+cvc.4 ships as source with a 32-bit ImWchar: cvcGL compiles it when present, against the FreeType the hosts link, and ImGui then rasterises with FreeType. An older imgui keeps stb_truetype and no emoji font. - setUiFontFallbacks(false) keeps stb_truetype and the UI font alone; cvcgl_ari_golden sets it. loadUiFonts(io) loads the same fonts into a host's own context. A static cvcGL re-finds FreeType. - cvcgl_imgui_fonts: the symbols resolve, and with imgui cvc.4 U+1F4AF bakes as a colour glyph.
Owner
Author
|
Checked in a browser too: a lean single-threaded arigl.wasm built from this branch against imgui 1.92.9+cvc.4 (cy-pca/cvcpkg#571) built for wasm locally, loaded through arigl-web's own page in headless Chrome.
|
…g> too Windows CI builds with Visual Studio: its programs run from build/bin/Release, so share/libcvc/fonts one level up wasn't there and cvcgl_imgui_fonts found no fallback font. Two levels up is tried too.
transfix
added a commit
that referenced
this pull request
Nov 9, 2026
…i as the fallback (#1072) imgui 1.92.9+cvc.4's 32-bit ImWchar (#1056's colour emoji need it) broke every published package built against cvc.3: they name plain `imgui`, so fresh Linux and BSD installs resolved cvc.4 and failed to load. cvc.4 is yanked, and the 32-bit build is now its own cvcpkg package, imgui-w32 (cy-pca/cvcpkg#575): headers in include/imgui-w32, libimgui-w32 (imgui-w32.lib on Windows), and the cmake package imgui-w32 with the imgui-w32::imgui target, on every platform. - src/cvcGL/CMakeLists.txt finds imgui-w32 first, then imgui (16-bit: emoji draw as '?'), then the config-less header/lib fallback, as before. The exported config re-finds whichever package cvcGL linked (find_dependency(imgui-w32) or imgui). - The recipes that name imgui (cvcgl, arigl, ariglx, arigl-web, ariglx-web, libcvc-examples, libcvc-examples-web) name imgui-w32, so 3.7.13's bundles carry it in their required_deps, and no install can mix the two builds' ABIs. libcvc-examples' UI guard reads imgui-w32_DIR. - ci.yml, publish-cvcpkg.yml, publish-cvcgl-wasm.yml and publish-pycvc-gl-wasm.yml install imgui-w32.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Emoji, and the symbols most UI fonts lack, in the ImGui hosts: arigl, and the arigl-web page nicotina runs in, where a post's 💯 and the feed's ↩ ⇄ ♥ drew as
?.Bundled fonts (
src/cvcGL/fonts, with their licences and a README). They install toshare/libcvc/fontswith cvcGL, are copied into the build tree, and are embedded at/usr/share/libcvc/fontsin the browser hosts (arigl-web, ariglx-web, cyprty). The overlay finds them inCVC_UI_FONT_DIR, beside the module holding cvcGL (<bin or lib>/../share/libcvc/fonts), or at the install's data directory.Colour emoji need two things from imgui, which cy-pca/cvcpkg#571 (imgui 1.92.9+cvc.4) adds:
ImWchar. A 16-bit one can't hold a character past U+FFFF.misc/freetype/imgui_freetype.cppwhen the imgui package has it, against the FreeType the hosts already link (VTK's text), and ImGui draws colour glyphs.Golden images.
ImGuiOverlay::setUiFontFallbacks(false)keeps stb_truetype and the UI font alone.cvcgl_ari_goldensets it, so its pixels don't move.Smaller pieces.
ImGuiOverlay::loadUiFonts(io)loads the same fonts into a host's (or a test's) own ImGui context.cvcGLConfig.cmake.Limits. ImGui doesn't shape text, so a ZWJ sequence (a family, a profession), a flag (two regional indicators) or a skin tone shows as its parts.
Checked (Windows, MSVC, shared, against cy-pca/cvcpkg#571's imgui built locally)
cvcgl_imgui_fonts:arigl snapshotdraws these in colour:CI here installs imgui cvc.3 from cvcpkg.org, so it builds without the loader. The DejaVu symbols still apply, and the test's emoji part says SKIP. Colour emoji arrive with cvc.4's publish, which is a production release.
The browser pages need this and #1052 (
text: emoji:) together, in a release, for nicotina's feed to show its emoji.