Before freetype2 use to iterate through the font's glyphs diretly.

This commit is contained in:
Zed A. Shaw 2024-12-09 08:25:16 -05:00
parent c483649e20
commit 9ab064126f
3 changed files with 7 additions and 2 deletions

View file

@ -10,12 +10,13 @@ ftxui_component = dependency('ftxui-component')
sfml = dependency('sfml') sfml = dependency('sfml')
lua = dependency('lua') lua = dependency('lua')
sol2 = dependency('sol2') sol2 = dependency('sol2')
freetype2 = dependency('freetype2')
dependencies = [ dependencies = [
catch2, fmt, catch2, fmt,
ftxui_screen, ftxui_dom, ftxui_screen, ftxui_dom,
ftxui_component, json, ftxui_component, json,
sfml, lua, sol2 sfml, lua, sol2, freetype2
] ]
runtests = executable('runtests', [ runtests = executable('runtests', [

View file

@ -3,6 +3,8 @@ TODAY'S GOAL:
1. Why do Sliders only have to be kept around forever and can't go in containers like everything else? 1. Why do Sliders only have to be kept around forever and can't go in containers like everything else?
2. Why are sliders not selected when I click on them? Is it a hover? 2. Why are sliders not selected when I click on them? Is it a hover?
3. Why do fonts render blank? Also when I scroll they slowly disappear until there's a column. 3. Why do fonts render blank? Also when I scroll they slowly disappear until there's a column.
4. Use freetype to iterate chars.
5. Why are all wchar converted chars in from_unicode 3 bytes not 2?
* A designer tool to help find characters for foreground, background, and figure out their colors. * A designer tool to help find characters for foreground, background, and figure out their colors.

View file

@ -13,6 +13,8 @@
#include <locale> #include <locale>
#include <codecvt> #include <codecvt>
#include <vector> #include <vector>
#include <ft2build.h>
#include FT_FREETYPE_H
using namespace fmt; using namespace fmt;
using namespace ftxui; using namespace ftxui;
@ -55,7 +57,7 @@ struct FontGrid {
try { try {
return $converter.to_bytes(input); return $converter.to_bytes(input);
} catch(...) { } catch(...) {
return "?"; return $converter.to_bytes(L"?");
} }
} }