NotHim
NotHim

Reputation: 43

Woff file font not loading in Jquery terminal

Im trying to get my Jquery terminal have a custom font, in this case I have a woff file of it in my code editor, and Im trying to figure out how to get that font into jquery terminal. For the css, ive tried @font-face, but it doesnt work, same with .terminal and .terminal-output. I feel like it should work, but it doesnt, its still just the default monospace font in my code editor.

<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/jquery"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css"/>
</head>
    <style type="text/css">
        .terminal,
        span,
        .cmd,


        .terminal,
        span {
            --size: 1.15;
         font-family: 'Cascadia Code';
        }
     @font-face {
    font-family: 'Cascadia Code';
    src: url('CascadiaCode.woff2') format('woff2'),
        url('CascadiaCode.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
.terminal {
    font-family: 'Cascadia Code';
    src: url('CascadiaCode.woff2') format('woff2'),
        url('CascadiaCode.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


    </style>
<body>
    
    <script>
$('body').terminal({
    echo: function(...args) {
    this.echo(args.join(" "))
    }
}, {
checkArity: false,
    greetings: 'Terminal:'
});
</script>
</body>
</html>

Upvotes: 0

Views: 70

Answers (0)

Related Questions