پرش به محتوا

مدیاویکی:RTL-Font.css

از ویکی افغان

نکته: پس از انتشار ممکن است برای دیدن تغییرات نیاز باشد که حافظهٔ نهانی مرورگر خود را پاک کنید.

  • فایرفاکس / سافاری: کلید Shift را نگه دارید و روی دکمهٔ Reload کلیک کنید، یا کلید‌های Ctrl-F5 یا Ctrl-R را با هم فشار دهید (در رایانه‌های اپل مکینتاش کلید‌های ⌘-R)
  • گوگل کروم: کلیدهای Ctrl+Shift+R را با هم فشار دهید (در رایانه‌های اپل مکینتاش کلید‌های ⌘-Shift-R)
  • Edge: کلید Ctrl را نگه‌دارید و روی دکمهٔ Refresh کلیک کنید، یا کلید‌های Ctrl-F5 را با هم فشار دهید
@font-face {
    font-family: IRANSansRegular;
    src: url('/w/images/4/46/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 300;
}

@font-face {
    font-family: IRANSansBold;
    src: url('/w/images/f/fd/IRANSansX-Bold.woff') format('woff');
    font-weight: bold;
}

/* Variable Font (IRANSansXV) */
@font-face {
    font-family: 'IRANSansXV';
    src: 
        url('/w/images/4/42/IRANSansXV.woff2') format('woff2-variations'),
        url('/w/images/4/42/IRANSansXV.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* Static Fonts (Fallback) */
@font-face {
    font-family: 'IRANSansX';
    src: url('/w/images/4/46/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('/w/images/b/bf/IRANSansX-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Special Arabic Fonts */


/* ============ Base Styles ============ */
body {
    font-family: 'IRANSansX', 'IRANSansXV', Tahoma, sans-serif;
    font-size: 18px;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Variable Font Support */
@supports (font-variation-settings: normal) {
    body {
        font-family: 'IRANSansXV', Tahoma, sans-serif;
        font-variation-settings: "wght" 400, "dots" 4;
    }
}

/* ============ Headers & Titles ============ */
.mw-body h1, .mw-body h2, .mw-body h3, 
.mw-body h4, .mw-body #firstHeading,
.mw-body .mw-editsection, .mw-body .mw-editsection-like,
.mw-body #toc h2, .mw-body .toc h2,
#documentation-meta-data, .vector-sticky-header-context-bar-primary,
.mw-page-title-main, .mw-page-title-namespace {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-weight: 700;
    overflow: visible;
}

@supports (font-variation-settings: normal) {
    .mw-body h1, .mw-body h2, .mw-body h3, 
    .mw-body h4, .mw-body #firstHeading,
    .mw-body .mw-editsection, .mw-body .mw-editsection-like,
    .mw-body #toc h2, .mw-body .toc h2,
    #documentation-meta-data, .vector-sticky-header-context-bar-primary,
    .mw-page-title-main, .mw-page-title-namespace {
        font-family: 'IRANSansXV', Tahoma, sans-serif;
        font-variation-settings: "wght" 700, "dots" 4;
    }
}

/* ============ Bold Elements ============ */
b, strong, bold {
    font-weight: 700;
}

@supports (font-variation-settings: normal) {
    b, strong, bold {
        font-variation-settings: "wght" 700, "dots" 4;
    }
}

/* ============ Special Font Classes ============ */
.quran-font {
    font-family: 'AdobeArabic', 'FontHafs', serif;
    font-size: 22px;
    line-height: 1.8;
}

.nastaliq-font {
    font-family: 'IranNastaliq', serif;
    font-size: 1.2em;
}

/* ============ UI Components ============ */
.vector-toc-collapse-button, 
.vector-toc-uncollapse-button {
    font-weight: 700;
}

a.mw-selflink {
    font-weight: 600;
}

/* Visual Editor Improvements */
.oo-ui-window-content {
    font-family: inherit;
}

.ve-ui-mwSaveDialog-withOptions .ve-ui-mwSaveDialog-summary .oo-ui-inputWidget-input {
    font-weight: 700;
}

@supports (font-variation-settings: normal) {
    .vector-toc-collapse-button,
    .vector-toc-uncollapse-button,
    .ve-ui-mwSaveDialog-withOptions .ve-ui-mwSaveDialog-summary .oo-ui-inputWidget-input {
        font-variation-settings: "wght" 700, "dots" 4;
    }
    
    a.mw-selflink,
    .oo-ui-window-content {
        font-variation-settings: "wght" 600, "dots" 4;
    }
}