1
0

added emoji-font for standardised experience

This commit is contained in:
eorg_oz 2017-03-16 21:07:12 +01:00
parent 195e1eca34
commit 1f2104e8e2
5 changed files with 20 additions and 0 deletions

1
app.js
View File

@ -10,6 +10,7 @@ handle["/interface"] = requestHandlers.sendInterface;
handle["/js/jquery-1.12.1.min"] = requestHandlers.sendJquery;
handle["/js/jquery-ui.js"] = requestHandlers.sendJqueryUI;
handle["/css/bootstrap.min.css"] = requestHandlers.sendBootstrap;
handle["/sprite/emoji.ttf"] = requestHandlers.sendEmojiTtf;
handle["/clear"] = requestHandlers.sendClear;
if(server.demoMode()){

View File

@ -13,10 +13,17 @@
<style>
/* Sticky footer styles
-------------------------------------------------- */
@import url('https://fonts.googleapis.com/css?family=Noto+Sans');
@font-face {
font-family: 'Emoji';
src: url('/sprite/emoji.ttf') format('truetype');
}
html,
body {
height: 100%;
font-family: 'Noto Sans', sans-serif;
/* The html and body elements cannot have any padding or margin. */
}
@ -37,6 +44,10 @@ body {
bottom: 0;
width: 100%;
}
h1 {
font-family: 'Emoji', 'Noto Sans', sans-serif;
}
</style>

View File

@ -47,9 +47,17 @@ function sendDemo(response) {
response.end(html);
}
function sendEmojiTtf(response) {
console.log("Request handler 'EmojiTtf' was called.");
response.writeHead(200, {"Content-Type": "font/ttf"});
var html = fs.readFileSync(__dirname + "/served/NotoColorEmoji.ttf")
response.end(html);
}
exports.sendClear = sendClear;
exports.sendDemo = sendDemo;
exports.sendEmojiTtf = sendEmojiTtf;
exports.sendBootstrap = sendBootstrap;
exports.sendJqueryUI = sendJqueryUI;

BIN
served/NotoColorEmoji.ttf Normal file

Binary file not shown.

Binary file not shown.