mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 10:40:20 +03:00
FontTrueType: Allow disable emoji fallback.
Vector2: Added round, roundUp, roundDown. KeyEvent: Now sends also the scancode. GlyphDrawable force glyph offset to be an integer value. TerminalDisplay: Allow emoji fonts. Fixed minor bugs. Added events callback. TerminalEmulator: Added clearHistory. eterm: Implemented title updates.
This commit is contained in:
@@ -93,10 +93,21 @@ EE_MAIN_FUNC int main( int, char*[] ) {
|
||||
|
||||
FontTrueType* fontMono = FontTrueType::New( "monospace" );
|
||||
fontMono->loadFromFile( "assets/fonts/DejaVuSansMonoNerdFontComplete.ttf" );
|
||||
fontMono->setEnableEmojiFallback( false );
|
||||
|
||||
if ( FileSystem::fileExists( "assets/fonts/NotoColorEmoji.ttf" ) ) {
|
||||
FontTrueType::New( "emoji-color" )->loadFromFile( "assets/fonts/NotoColorEmoji.ttf" );
|
||||
} else if ( FileSystem::fileExists( "assets/fonts/NotoEmoji-Regular.ttf" ) ) {
|
||||
FontTrueType::New( "emoji-font" )->loadFromFile( "assets/fonts/NotoEmoji-Regular.ttf" );
|
||||
}
|
||||
|
||||
if ( !terminal || terminal->hasTerminated() ) {
|
||||
terminal = TerminalDisplay::create( win, fontMono, PixelDensity::dpToPx( 11 ),
|
||||
win->getSize().asFloat() );
|
||||
terminal->pushEventCallback( [&]( const TerminalDisplay::Event& event ) {
|
||||
if ( event.type == TerminalDisplay::EventType::TITLE )
|
||||
win->setTitle( "eterm - " + event.eventData );
|
||||
} );
|
||||
}
|
||||
|
||||
win->getInput()->pushCallback( &inputCallback );
|
||||
|
||||
Reference in New Issue
Block a user