字体布局

This commit is contained in:
2025-03-27 18:36:32 +08:00
parent 6129e71db7
commit 5aafef4cfb
14 changed files with 6175 additions and 72 deletions

View File

@@ -9,6 +9,7 @@
#include "pixel.h"
#include "misc/mapped_file/mapped_file.h"
#include "stb_image_loader.h"
#include "font/font_face.h"
#include "texture/texture2d.h"
#include "widget/widget_new.h"
#include "widget/leaf_widget/mimage.h"
@@ -17,6 +18,13 @@ int main(int argc, char* argv[]) {
mirage_app::get().init();
{
font_face_t face;
face.load_from_file(L"C:\\Windows\\Fonts\\segmdl2.ttf");
auto name = face.get_font_name();
auto color = face.supports_color_emoji();
}
auto ii = std::make_shared<texture2d>();
{
@@ -35,7 +43,6 @@ int main(int argc, char* argv[]) {
}
{
auto map = ii->map(texture_map_type::read);
map->read_only;
}
auto image2 = std::make_shared<mimage>();