Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Implementation  



2.1  Fonts information  







3 How to override fonts in user's preferences  





4 Template Data  





5 See also  














Template:Script/Arabic






Afrikaans
العربية
Azərbaycanca
تۆرکجه
Basa Bali

Banjar
 / Bân-lâm-gú

Български
Буряад
Ελληνικά
Euskara
فارسی
Føroyskt
Galego
/Hak-kâ-ngî

Հայերեն
Hrvatski
Ilokano
Bahasa Indonesia
Jawa
Kurdî
ि
Македонски

Māori
Bahasa Melayu
 / Mìng-dĕ̤ng-nḡ
Монгол


Norsk bokmål
پښتو
Polski
Русский

Scots
Simple English
سنڌي
Slovenščina
کوردی
Српски / srpski
Tagalog
Татарча / tatarça
 

Тоҷикӣ
Türkçe
Українська
اردو
Tiếng Vit



Batak Toba
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 

< Template:Script

{{{1}}}

This template is to render properly Arabic-based scripts which don't use the main Arabic alphabet, also to ensure that Arabic diacritics appear properly.

It is also used for the template:Arabic alphabet shapes.

Usage

{{Script/Arabic|موسوعة}} to give you موسوعة

Use simple {{lang|ar|...}} for inline citation of Arabic language. Use {{rtl-para}} for entire paragraphs of Arabic text, however, they do not force choosing the fonts in that template.

Implementation

The template contains this phrase:

<templatestyles src="Script/styles_arabic.css" /><span class="script-arabic script-Arab" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||dir="rtl"}} style="font-size: {{{size|125%}}}; {{{style|}}}" {{{attributes|}}}>{{{1}}}</span>{{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||&lrm;}}

Fonts information

Free fonts

Template intended to force following fonts if installed:

These fonts contain all Arabic character defined in Unicode (see Arabic script in Unicode) for text in the various languages that use the Arabic script, but not all the redundant glyphs used in stylizing.

Non-free fonts

If the previous fonts are not installed, other fallback fonts would display:

How to override fonts in user's preferences

Any user can use another font with a different size by writing the following on his custom CSS. (see Help:User style)

An example making the font size 105%, and choosing Droid Arabic Naskh to be the main font with Arial as an additional font :

.script-arabic {
    font-size: 105% !important;
    font-family: 'Droid Arabic Naskh', Arial, sans-serif !important;
}
Font names containing spaces (or any other character than a letter) need to be put between 'or".
The list of fonts should always be terminated by the pseudo-font names "sans-serif" and/or "serif", to allow using the fonts defined in user preferences in their browser, or the fonts set by default in browsers.
You may choose to add the line-height phrase if you wanted to make lines in a paragraph more spaced from each other, or less spaced. line-height: 125%; Remember to put it before the }. The more number percentage, the more space is added. If you wanted to decrease the line height spacing, decrease the percentage. You may use any number (e.g. 85% or 140%) or use the special value "normal" which will properly use the minimum setting of the line-height recommended by each candidate font.
Some Arabic-based letters aren't rendered properly by some old versions of Times New Roman, such as: ېـ ـېـ ـې ې which is used in Pashto and Uyghur; the newest versions of the following fonts render it properly: Scheherazade New, Scheherazade, Lateef, Amiri, Noto Naskh Arabic, Droid Arabic Naskh, Noto Sans Arabic, Harmattan, Arial, 'Times New Roman', 'Sakkal Majalla', 'Microsoft Uighur', 'Arabic Typesetting', 'Microsoft Sans Serif', 'Segoe UI'. (The newest versions which are available free-of-charge online are marked as bold.)

Example:

.script-arabic {
    font-size: 125% !important;
    /*
       The default line-height used by Wikipedia is 1.5 em, which can be lower or higher than the font default,
       reduce it to the minimum recommended for HTML by using the word normal or for example, use a percentage
       value, as 95%
    */
    line-height: 95%;
    font-family:
        /* The following fonts are recommended for best coverage of the Arabic script: */
        'Noto Naskh Arabic', Scheherazade, 'Scheherazade New', Lateef, 'Droid Arabic Naskh', Harmattan     /* free fonts */
        'Sakkal Majalla',                         /* commercial font, also installed with recent versions of Windows */
        'Microsoft Uighur', 'Arabic Typesetting', /* commercial fonts installed with recent versions of Windows */
        /* Other fonts supporting the Arabic script with partial coverage: */
        Arial,                /* Warning! Old versions may not support a few characters. */
        'Times New Roman',    /* Warning! Old versions may not support a few characters. */
        /* Default fallback fonts determined in the browser: */
        sans-serif /* No comma here! */
        /* Required at end to actually enable the override and make it work : */
        !important;
}


Another example without the notes:

.script-arabic {
    font-size: 125% !important;
    line-height: 95%;
    font-family: 'Noto Naskh Arabic', Scheherazade, 'Scheherazade New', Lateef, 'Droid Arabic Naskh', Harmattan,
    Arial, 'Times New Roman', 'Sakkal Majalla', 'Microsoft Uighur', 'Arabic Typesetting', sans-serif !important;
}

Template Data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Script in articles based on its TemplateData.

TemplateData for Script

Parameter list

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

no description

Unknownoptional
no_rtl_markno_rtl_mark

no description

Unknownoptional
sizesize

no description

Unknownoptional
stylestyle

no description

Unknownoptional
attributesattributes

no description

Unknownoptional

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Script/Arabic&oldid=1185272999"

Categories: 
Templates using TemplateStyles
Scriptfont templates
Hidden categories: 
Wikipedia extended-confirmed-protected templates
Templates using TemplateData
 



This page was last edited on 15 November 2023, at 18:00 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki