-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathpreview.html
363 lines (298 loc) · 12.1 KB
/
preview.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Myanmar Fonts Preview</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
// Custom Tailwind CSS Configuration
tailwind.config = {
theme: {
extend: {
colors: {
premiumGold: "#D4AF37",
darkBackground: "#121212",
darkCard: "#1E1E1E",
placeholderGray: "#6B7280",
},
},
},
};
</script>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Inter:wght@400;700&display=swap"
rel="stylesheet"
/>
</head>
<body class="bg-darkBackground text-white p-4 sm:p-8">
<!-- Adjusted padding for responsiveness -->
<div class="max-w-6xl mx-auto">
<h1
class="text-3xl sm:text-4xl font-bold mb-6 sm:mb-8 text-center text-premiumGold font-sans"
>
<!-- Responsive text size and margins -->
Myanmar Unicode Fonts Preview
</h1>
<!-- Search Bar with Glassmorphism Effect -->
<div
class="mb-6 sm:mb-8 backdrop-blur-md bg-opacity-50 bg-darkCard p-4 rounded-2xl"
>
<input
type="text"
id="searchInput"
placeholder="Search fonts..."
class="w-full p-3 sm:p-4 rounded-lg border border-gray-700 bg-transparent text-white placeholder-placeholderGray focus:outline-none focus:ring-4 focus:ring-premiumGold"
/>
</div>
<!-- Fonts List with Modern UI Elements -->
<div
id="fontsContainer"
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6"
>
<!-- Font items will be injected here -->
</div>
</div>
<!-- JavaScript -->
<script>
// Array of font objects with name and path
const fontsData = [
// CherryUnicode
{ name: "Cherry_Unicode", path: "CherryUnicode/Cherry_Unicode.ttf" },
// Gantgaw
// { name: "Gantgaw-Regular", path: "Gantgaw/Gantgaw-Regular.ttf" },
// JasmineUnicode
{ name: "Jasmine_Unicode", path: "JasmineUnicode/Jasmine_Unicode.ttf" },
// KT_Unicode
{ name: "KT_02", path: "KT_Unicode/KT_02.ttf" },
{ name: "KT_03", path: "KT_Unicode/KT_03.ttf" },
// MON3_Anonta
{ name: "MON3Anonta1", path: "MON3_Anonta/MON3Anonta1.ttf" },
// MasterpieceUniRound
{
name: "MasterpieceUniRound",
path: "MasterpieceUniRound/MasterpieceUniRound.ttf",
},
// Myanmar3
{ name: "mm3-multi-os", path: "Myanmar3/mm3-multi-os.ttf" },
{ name: "mm3_05-Jan-2011", path: "Myanmar3/mm3_05-Jan-2011.ttf" },
{ name: "mm3h", path: "Myanmar3/mm3h.ttf" },
{ name: "mm3sh", path: "Myanmar3/mm3sh.ttf" },
// Myanmar3_PaOh
{ name: "MM3_Paoh", path: "Myanmar3_PaOh/MM3_Paoh.ttf" },
// MyanmarAngoun
{ name: "MyanmarAngoun", path: "MyanmarAngoun/MyanmarAngoun.ttf" },
// MyanmarBlack
{ name: "MyanmarBlack", path: "MyanmarBlack/MyanmarBlack.ttf" },
// MyanmarCensus
{ name: "myanmarcensus", path: "MyanmarCensus/myanmarcensus.ttf" },
// MyanmarGantGaw
{ name: "MyanmarGantGaw", path: "MyanmarGantGaw/MyanmarGantGaw.ttf" },
// MyanmarKhway
{ name: "MyanmarKhway", path: "MyanmarKhway/MyanmarKhway.ttf" },
// MyanmarKuttar
{ name: "MyanmarKuttar", path: "MyanmarKuttar/MyanmarKuttar.ttf" },
// MyanmarNayone
{ name: "MyanmarNayone", path: "MyanmarNayone/MyanmarNayone.ttf" },
// MyanmarNjaun
{ name: "MyanmarNjaun", path: "MyanmarNjaun/MyanmarNjaun.ttf" },
// MyanmarPaOhOne
{ name: "MyanmarPaOhOne", path: "MyanmarPaOhOne/MyanmarPaOhOne.ttf" },
// MyanmarPaOhRosemary
{ name: "MIUI Unicode", path: "MyanmarPaOhRosemary/MIUI Unicode.ttf" },
// MyanmarPauklay
{ name: "MyanmarPauklay", path: "MyanmarPauklay/MyanmarPauklay.ttf" },
// MyanmarPhetsot
{ name: "MyanmarPhetsot", path: "MyanmarPhetsot/MyanmarPhetsot.ttf" },
// MyanmarPixel
{ name: "MyanmarPixel", path: "MyanmarPixel/MyanmarPixel.ttf" },
{
name: "MyanmarPixelSmooth",
path: "MyanmarPixel/MyanmarPixelSmooth.ttf",
},
// MyanmarPonenyet
{
name: "MyanmarPonenyet",
path: "MyanmarPonenyet/MyanmarPonenyet.ttf",
},
// MyanmarPunk
{ name: "Myanmar_Punk", path: "MyanmarPunk/Myanmar_Punk.ttf" },
// MyanmarRosemarry
{
name: "Myanmar_Rosemarry",
path: "MyanmarRosemarry/Myanmar_Rosemarry.ttf",
},
// MyanmarSabae
{ name: "MyanmarSabae", path: "MyanmarSabae/MyanmarSabae.ttf" },
// MyanmarSagar
{ name: "MyanmarSagar", path: "MyanmarSagar/MyanmarSagar.ttf" },
// MyanmarSansPro
{ name: "MyanmarSansPro", path: "MyanmarSansPro/MyanmarSansPro.ttf" },
// MyanmarSquare
{ name: "MyanmarSquare", path: "MyanmarSquare/MyanmarSquare.ttf" },
{
name: "MyanmarSquareLight",
path: "MyanmarSquare/MyanmarSquareLight.ttf",
},
// MyanmarTagu
{ name: "MyanmarTagu", path: "MyanmarTagu/MyanmarTagu.ttf" },
// MyanmarTaungyi
{ name: "MyanmarTaungyi", path: "MyanmarTaungyi/MyanmarTaungyi.ttf" },
// MyanmarText
{ name: "mmrtext", path: "MyanmarText/mmrtext.ttf" },
{ name: "mmrtextb", path: "MyanmarText/mmrtextb.ttf" },
// MyanmarTextMelano
{
name: "MyanmarTextMelano",
path: "MyanmarTextMelano/MyanmarTextMelano.ttf",
},
// MyanmarThuriya
{ name: "MyanmarThuriya", path: "MyanmarThuriya/MyanmarThuriya.ttf" },
{
name: "MyanmarThuriya_volt",
path: "MyanmarThuriya/MyanmarThuriya_volt.ttf",
},
// MyanmarYinmar
{ name: "MyanmarYinmar", path: "MyanmarYinmar/MyanmarYinmar.ttf" },
// Namkhon
{ name: "NK Grand", path: "Namkhon/NK Grand.ttf" },
{ name: "NK_SSmart2", path: "Namkhon/NK_SSmart2.ttf" },
{ name: "NK_SSmart3", path: "Namkhon/NK_SSmart3.ttf" },
{ name: "NK_SSmart4", path: "Namkhon/NK_SSmart4.ttf" },
{ name: "NamKhoneUnicode", path: "Namkhon/NamKhoneUnicode.ttf" },
{ name: "Namkhon_Web_pro", path: "Namkhon/Namkhon_Web_pro.ttf" },
// NotoSansMyanmar
{
name: "NotoSansMyanmar-Bold",
path: "NotoSansMyanmar/NotoSansMyanmar-Bold.ttf",
},
{
name: "NotoSansMyanmar-Regular",
path: "NotoSansMyanmar/NotoSansMyanmar-Regular.ttf",
},
{
name: "NotoSansMyanmarUI-Bold",
path: "NotoSansMyanmar/NotoSansMyanmarUI-Bold.ttf",
},
{
name: "NotoSansMyanmarUI-Regular",
path: "NotoSansMyanmar/NotoSansMyanmarUI-Regular.ttf",
},
{
name: "Notosan Myanmar UI Bold",
path: "NotoSansMyanmar/Notosan Myanmar UI Bold.ttf",
},
// Padauk
{ name: "Padauk-Zawgyi", path: "Padauk/Padauk-Zawgyi.ttf" },
{ name: "Padauk-bold", path: "Padauk/Padauk-bold.ttf" },
{ name: "Padauk", path: "Padauk/Padauk.ttf" },
{ name: "padauk-book", path: "Padauk/padauk-book.ttf" },
{ name: "padauk-bookbold", path: "Padauk/padauk-bookbold.ttf" },
// PadaukGhost
{ name: "PadaukGhost", path: "PadaukGhost/PadaukGhostтАЛ.ttf" },
// PadaukGrandPro
{
name: "PadaukGrandPro v2",
path: "PadaukGrandPro/PadaukGrandPro v2.ttf",
},
// PadaukKyaungchikote
{
name: "Padauk Kyaungchikote",
path: "PadaukKyaungchikote/Padauk Kyaungchikote.ttf",
},
// PadaukSagar
{ name: "PadaukSagar", path: "PadaukSagar/PadaukSagar.ttf" },
// PadaukSgaw
{ name: "PadaukSgaw-Bold", path: "PadaukSgaw/PadaukSgaw-Bold.ttf" },
{ name: "PadaukSgaw-book", path: "PadaukSgaw/PadaukSgaw-book.ttf" },
{
name: "PadaukSgaw-bookbold",
path: "PadaukSgaw/PadaukSgaw-bookbold.ttf",
},
{ name: "PadaukSgaw", path: "PadaukSgaw/PadaukSgaw.ttf" },
// PangLong
{ name: "PangLong_2011feb7", path: "PangLong/PangLong_2011feb7.ttf" },
// PaohDragonApp
{ name: "PaohDragonApp", path: "PaohDragonApp/PaohDragonApp.ttf" },
// Parabaik
{ name: "Parabaik20080421", path: "Parabaik/Parabaik20080421.ttf" },
{ name: "Parabaik_UTN11-3", path: "Parabaik/Parabaik_UTN11-3.ttf" },
// Pyidaungsu
{ name: "pyidaungsu-1.2", path: "Pyidaungsu/pyidaungsu-1.2.ttf" },
{ name: "pyidaungsu-1.3", path: "Pyidaungsu/pyidaungsu-1.3.ttf" },
{ name: "pyidaungsu", path: "Pyidaungsu/pyidaungsu.ttf" },
// SamsungMyanmar
{ name: "Samsung Myanmar", path: "SamsungMyanmar/Samsung Myanmar.ttf" },
// ShanUnicode
{ name: "Shan Unicode", path: "ShanUnicode/Shan Unicode.ttf" },
// Thanlwin
{ name: "ThanLwin", path: "Thanlwin/ThanLwin.ttf" },
// Tharlon
{ name: "TharLon", path: "Tharlon/TharLon.ttf" },
// WinUniInnwa
{ name: "WinUniInnwa", path: "WinUniInnwa/WinUniInnwa.ttf" },
// YoeYarOne
{ name: "YoeYar-One Bold", path: "YoeYarOne/YoeYar-One Bold.ttf" },
{ name: "YoeYar-One Light", path: "YoeYarOne/YoeYar-One Light.ttf" },
{
name: "YoeYar-One Regular",
path: "YoeYarOne/YoeYar-One Regular.ttf",
},
// Yunghkio
{ name: "Yunghkio", path: "Yunghkio/Yunghkio.ttf" },
];
// Function to load fonts dynamically with font-display: swap
function loadFont(fontName, fontPath) {
const newFont = new FontFace(fontName, `url(${fontPath})`, {
display: "swap",
});
newFont
.load()
.then(function (loadedFont) {
document.fonts.add(loadedFont);
})
.catch(function (error) {
console.error("Error loading font:", fontName, error);
});
}
// Load all fonts
fontsData.forEach((font) => {
loadFont(font.name, font.path);
});
// Function to display fonts
function displayFonts(filter = "") {
const container = document.getElementById("fontsContainer");
container.innerHTML = "";
const filteredFonts = fontsData.filter((font) =>
font.name.toLowerCase().includes(filter.toLowerCase()),
);
filteredFonts.forEach((font) => {
const fontItem = document.createElement("div");
fontItem.className =
"bg-darkCard p-4 sm:p-6 rounded-2xl shadow-xl mb-4 sm:mb-6 transition-transform duration-300 hover:scale-105";
const fontTitle = document.createElement("h2");
fontTitle.className =
"text-xl sm:text-2xl font-semibold mb-2 sm:mb-4 text-premiumGold font-sans";
fontTitle.textContent = font.name;
const fontSample = document.createElement("p");
fontSample.className = "text-base sm:text-lg font-serif";
fontSample.style.fontFamily = font.name;
fontSample.textContent =
"သီဟိုဠ်မှ ဉာဏ်ကြီးရှင်သည် အာယုဝဍ္ဎနဆေးညွှန်းစာကို ဇလွန်ဈေးဘေး ဗာဒံပင်ထက် အဓိဋ္ဌာန်လျက် ဂဃနဏဖတ်ခဲ့သည်။ ၀ ၁ ၂ ၃ ၄ ၅ ၆ ၇ ၈ ၉။ The quick brown fox jumps over the lazy dog. 0123456789";
fontItem.appendChild(fontTitle);
fontItem.appendChild(fontSample);
container.appendChild(fontItem);
});
}
// Initial display
displayFonts();
// Search functionality
document
.getElementById("searchInput")
.addEventListener("input", function () {
const filter = this.value;
displayFonts(filter);
});
</script>
</body>
</html>