mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 02:30:25 +03:00
migrate fonts to scoped resource ownership
- replace FontManager with per-ResourceScope FontService instances - publish font factories into explicit or default resource scopes - import default resources into UI scene scopes unless explicitly disabled - keep related font faces strongly owned without hot-path weak_ptr locking - add cached glyph advance queries without creating texture pages - fix font picker preview ownership, cleanup, and rapid switching - selectively evict TextLayout cache entries when referenced fonts unload - document FontService, ResourceCatalog, and cache invalidation semantics - migrate examples, tools, benchmarks, and tests to the scoped font API - expand coverage for font ownership, texture release, and layout caching
This commit is contained in:
@@ -20,12 +20,11 @@ using namespace EE::Scene;
|
||||
using namespace EE::UI;
|
||||
|
||||
static UISceneNode* init_test_scene_node() {
|
||||
FontTrueType* font = nullptr;
|
||||
FileSystem::changeWorkingDirectory( Sys::getProcessPath() );
|
||||
font = FontTrueType::New( "NotoSans-Regular" );
|
||||
FontTrueType* font = FontTrueType::New( "NotoSans-Regular" ).get();
|
||||
font->loadFromFile( "../assets/fonts/NotoSans-Regular.ttf" );
|
||||
FontFamily::loadFromRegular( font );
|
||||
FontTrueType* monoFont = FontTrueType::New( "monospace" );
|
||||
FontTrueType* monoFont = FontTrueType::New( "monospace" ).get();
|
||||
monoFont->loadFromFile( "../assets/fonts/NotoSans-Regular.ttf" );
|
||||
UISceneNode* sceneNode = UISceneNode::New();
|
||||
SceneManager::instance()->add( sceneNode );
|
||||
|
||||
Reference in New Issue
Block a user