-
Notifications
You must be signed in to change notification settings - Fork 1
/
tfont.html
57 lines (50 loc) · 1013 Bytes
/
tfont.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!doctype html>
<html lang="ar" dir="rtl">
<head>
<meta charset="utf-8">
<title>تجربة الخطوط العربية</title>
<style>
@font-face{
font-family:'testfont';
src:url('banyeh.woff2') format('woff2');
}
#viewer {
font-family: 'testfont';
}
#size3 {
font-size: 3em;
}
#size2 {
font-size: 2em;
}
#size1 {
font-size: 1em;
}
input {
width: 100%;
background-color: coral;
}
#inputfield {
margin-top: 3em;
}
</style>
</head>
<body>
<section id="viewer">
<div id="size3"></div>
<div id="size2"></div>
<div id="size1"></div>
</section>
<section id="inputfield">
<input type="text" id="textInput" placeholder="إكتب هنا" oninput="updateViewer()">
</section>
</body>
<script>
function updateViewer(){
var x = document.getElementById("textInput").value;
document.getElementById("size3").innerHTML = x;
document.getElementById("size2").innerHTML = x;
document.getElementById("size1").innerHTML = x;
}
</script>
</html>