Skip to content

Instantly share code, notes, and snippets.

@niskala5570
Last active February 25, 2024 00:07
Show Gist options
  • Save niskala5570/520e689d4d30fc1381c0caae8e0dadcd to your computer and use it in GitHub Desktop.
Save niskala5570/520e689d4d30fc1381c0caae8e0dadcd to your computer and use it in GitHub Desktop.
Better Discord/Replugged Quick CSS Arabic/Malay Jawi Script Font Change
/* Ubah nama pasuan kedua di bawah */
/* Change the second font name */
* {
--main-font: gg sans, Amiri, Helvetica Neue, Helvetica;
--code-font: Consolas, Amiri, Liberation Mono, Menlo, Courier, monospace;
}
/* Mengubah ketinggian baris agar tidak terpotong */
/* Change the line height so won't get cropped */
.messageContent-2t3eCI {
line-height: 2.0;
}
.channelName-3KPsGw {
line-height: 1.6;
}
/* Pasuan Utama // Main Font */
body,button,input,select,textarea,::placeholder{
font-family:var(--main-font)
}
.theme-dark .container-1NXEtd .header-3OsQeK .text-md-semibold-2VMhBr{
font-family:var(--main-font);
font-weight:600;
}
.container-ZMc96U .base-21yXnu{
font-family:var(--main-font)
}
.title-1v5ZfI {
font-family:var(--main-font);
font-weight:300;
}
.channelName-3KPsGw {
font-family:var(--main-font);
}
/* Pasuan Kod // Code Font */
.typeWindows-2-g3UY>.wordmark-2u86JB:after{
font-family:var(--code-font);
}
.markup-eYLPri code.inline{
font-family:var(--code-font);
}
pre{
font-family:var(--code-font)
}
code{
font-family:var(--code-font)
}
@niskala5570
Copy link
Author

niskala5570 commented Aug 8, 2022

Ignore this lol
NKL Dubai

bruh

/* Nipis */
@font-face {
  font-family: 'Helvetica';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/gh/niskala5570/pasuanjawi@2.872/v.2.872/Dubai/NKLDubai-Light.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}
/* Biasa */
@font-face {
  font-family: 'Helvetica';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/gh/niskala5570/pasuanjawi@2.872/v.2.872/Dubai/NKLDubai-Regular.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}
/* Tebal */
@font-face {
  font-family: 'Helvetica';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/gh/niskala5570/pasuanjawi@2.872/v.2.872/Dubai/NKLDubai-Bold.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}

/* Ignore this if you don't mind having huruf getting cut */
.messageContent-2t3eCI {
	line-height: 1.6;
}
.channelName-3KPsGw {
  line-height: 1.6;
}

@niskala5570
Copy link
Author

image

Kod di atas sudah dikemas kini. (1/6/2023)
Updated the code above. (1/6/2023)

Kalau kau dah pasang pasuan, tinggal tukar je nama dekat --main-font dengan --code-font dan abaikan kod atas tu kecuali Kawkab Mono.
If you have installed the font, just change the second name list from variable --main-font and --code-font except Kawkab Mono.

Walaupun kod utama di atas guna Amiri, aku tak sarankan, lebih elok guna macam pasuan Google Noto ke apa.
Although the above main code use Amiri, I don't recommend it, better use another font like Google Noto font or something.


Untuk pasuan kod, aku sarankan Kawkab Mono, siyes kau takkan menyesal.
For arabic code font, I recommend Kawkab Mono, trust me, you wont regret it.

Aku tak jumpa pautan untuk Kawkab Mono, jadi muat turun jelah sendiri.
I can't find a link for Kawkab Mono so just install it yourself.

image
image

@niskala5570
Copy link
Author

Kalau2 tak lepas juga
If for some reason you cant get it to work

Cuba letak dekat atas kod
Place it in the above main code

/* Biasa // Normal */
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/amiri/v27/J7aRnpd8CGxBHpUrtLMA7w.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}
@font-face {
  font-family: 'Amiri';
  font-style: italic;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/amiri/v27/J7afnpd8CGxBHpUrhLQY66NL.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}

/* Tebal // Bold */
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 700;
  src: url(https://fonts.gstatic.com/s/amiri/v27/J7acnpd8CGxBHp2VkaY6zp5yGw.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}
@font-face {
  font-family: 'Amiri';
  font-style: italic;
  font-weight: 700;
  src: url(https://fonts.gstatic.com/s/amiri/v27/J7aanpd8CGxBHpUrjAo9_plqHwAa.woff2) format('woff2');
  unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+10E60-10E7F,U+1EC70-1ECBF,U+1ED00-1ED4F,U+1EE00-1EEFF;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment