<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AScript%2FArabic%2Fdoc</id>
	<title>Template:Script/Arabic/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AScript%2FArabic%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Script/Arabic/doc&amp;action=history"/>
	<updated>2026-04-09T13:20:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Template:Script/Arabic/doc&amp;diff=40521&amp;oldid=prev</id>
		<title>imported&gt;Cedar101: /* Implementation */ lang=&quot;wikitext&quot; for Pygments 2.15 upgrade</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Script/Arabic/doc&amp;diff=40521&amp;oldid=prev"/>
		<updated>2023-04-07T05:47:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Implementation: &lt;/span&gt; lang=&amp;quot;wikitext&amp;quot; for Pygments 2.15 upgrade&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{Uses TemplateStyles|Template:Script/styles arabic.css}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This template is to render properly Arabic-based scripts which don&amp;#039;t use the main Arabic alphabet, also to ensure that [[Arabic diacritics]] appear properly.&lt;br /&gt;
&lt;br /&gt;
It is also used for the [[template:Arabic alphabet shapes]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
: &amp;lt;nowiki&amp;gt;{{Script/Arabic|موسوعة}}&amp;lt;/nowiki&amp;gt; to give you {{Script/Arabic|موسوعة}}&lt;br /&gt;
* The 1st parameter is mandatory and contains the text written in the Arabic script.&lt;br /&gt;
* The optional &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; parameter can be used to override the generated style (for example another font size) or to specify additional CSS formattings (e.g. color).&lt;br /&gt;
* The optional &amp;lt;code&amp;gt;attributes&amp;lt;/code&amp;gt; parameter can be used for specifying additional HTML attributes (for example a descriptive &amp;lt;code&amp;gt;title=&amp;quot;...&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Use simple &amp;lt;nowiki&amp;gt;{{lang|ar|...}}&amp;lt;/nowiki&amp;gt; for inline citation of Arabic language. Use {{tl|rtl-para}} for entire paragraphs of Arabic text, however, they do not force choosing the fonts in that template.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
The template contains this phrase:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&amp;lt;templatestyles src=&amp;quot;Script/styles_arabic.css&amp;quot; /&amp;gt;&amp;lt;span class=&amp;quot;script-arabic script-Arab&amp;quot; {{#if:{{{lang|}}}|lang=&amp;quot;{{{lang}}}&amp;quot;}} {{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||dir=&amp;quot;rtl&amp;quot;}} style=&amp;quot;font-size: {{{size|125%}}}; {{{style|}}}&amp;quot; {{{attributes|}}}&amp;gt;{{{1}}}&amp;lt;/span&amp;gt;{{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||&amp;amp;lrm;}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The font size was fixed at 125% for better readability.&lt;br /&gt;
* The style &amp;lt;code&amp;gt;font-weight: normal&amp;lt;/code&amp;gt; is provided by [[Template:Script/styles_arabic.css]] and present to remove boldness, e.g. in section titles, because Arabic diacritics are best read only in normal weight, but also because some fonts do not exist in bold styles; without it, other fallback fonts would be used instead (possibly with lover coverage), or boldness may be synthetized from a non-bold font (making most diacritics unreadable).&lt;br /&gt;
* Specifying the HTML attribute &amp;lt;code&amp;gt;dir=&amp;quot;rtl&amp;quot;&amp;lt;/code&amp;gt; in a &amp;lt;code&amp;gt;span&amp;lt;/code&amp;gt; HTML element is sufficient to also activate on Wikipedia the &amp;lt;code&amp;gt;unicode-bidi: embed&amp;lt;/code&amp;gt; style which is part of the site-wide CSS stylesheet; this HTML attribute also activates the CSS style &amp;quot;direction: rtl&amp;quot; (which should be implemented by default in browsers, but is also set in the site-wide CSS stylesheet). This attribute can be disabled via {{para|no_rtl_mark}} with value &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; if necessary.&lt;br /&gt;
&lt;br /&gt;
=== Fonts information ===&lt;br /&gt;
;Free fonts:&lt;br /&gt;
Template intended to force following fonts if installed:&lt;br /&gt;
*[//fonts.google.com/noto Noto Naskh Arabic]&lt;br /&gt;
*[//fontlibrary.org/en/font/droid-arabic-naskh Droid Arabic Naskh] &amp;lt;small&amp;gt;(better at smaller sizes; has an error in displaying&amp;lt;/small&amp;gt; [[Riyal|&amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family:&amp;#039;Noto Naskh Arabic&amp;#039;,KacstOne,&amp;#039;DejaVu Sans&amp;#039;,&amp;#039;DejaVu Sans Condensed&amp;#039;,Harmattan,&amp;#039;Iranian Sans&amp;#039;,Scheherazade,Lateef,&amp;#039;Arabic Transparent&amp;#039;; font-size:125%&amp;quot;&amp;gt;ريال&amp;lt;/span&amp;gt;]]&amp;lt;small&amp;gt;)&amp;lt;/small&amp;gt;&lt;br /&gt;
*[http://software.sil.org/harmattan Harmattan] &amp;lt;small&amp;gt;(lacks a bold weight; errors with combining shadda with kasra)&amp;lt;/small&amp;gt;&lt;br /&gt;
*[http://software.sil.org/scheherazade Scheherazade] or [https://fonts.google.com/specimen/Scheherazade+New?subset=arabic Scheherazade New]&lt;br /&gt;
*[http://software.sil.org/lateef Lateef] &amp;lt;small&amp;gt;(lacks a bold weight)&amp;lt;/small&amp;gt;&lt;br /&gt;
*[http://www.amirifont.org/ Amiri] &amp;lt;small&amp;gt;(appears feathery on Windows; errors with combining shadda with kasra and some Rohingya diacritics [https://github.com/alif-type/amiri/issues/155])&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
;Non-free fonts:&lt;br /&gt;
If the previous fonts are not installed, other fallback fonts would display:&lt;br /&gt;
* SF Arabic &amp;lt;small&amp;gt;(is a complete &amp;#039;&amp;#039;[[Apple OS|Apple]]&amp;#039;&amp;#039; font)&amp;lt;/small&amp;gt;&lt;br /&gt;
* [[Core fonts for the Web#External links|Arial]], Times New Roman &amp;lt;small&amp;gt;(essentially look the same; lack a few characters; errors with combining shadda with kasra)&amp;lt;/small&amp;gt; Arabic Transparent&lt;br /&gt;
* Caribri &amp;lt;small&amp;gt;(only the newer versions render Arabic)&amp;lt;/small&amp;gt;&lt;br /&gt;
* Microsoft Sans Serif &amp;lt;small&amp;gt;(lacks a few characters; lacks a bold weight; errors with combining shadda with kasra)&amp;lt;/small&amp;gt;&lt;br /&gt;
* Segoe UI &amp;lt;small&amp;gt;(lacks a few characters; errors with combining shadda with kasra; in older versions, lacked a normal weight)&amp;lt;/small&amp;gt;&lt;br /&gt;
* Sakkal Majalla &amp;lt;small&amp;gt;(errors with combining shadda with kasra)&amp;lt;/small&amp;gt;&lt;br /&gt;
* Microsoft Uighur &amp;lt;small&amp;gt;(lacks a few characters; has errors with combining shadda with kasra; lacked a bold weight on older versions)&amp;lt;/small&amp;gt;&lt;br /&gt;
* Arabic Typesetting &amp;lt;small&amp;gt;(lacks a bold weight; errors with combining shadda with kasra)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to override fonts in user&amp;#039;s preferences ==&lt;br /&gt;
Any user can use another font with a different size by writing the following on [[Special:Mypage/vector.css|his custom CSS]]. (see [[Help:User style]])&lt;br /&gt;
&lt;br /&gt;
An example making the font size 105%, and choosing Droid Arabic Naskh to be the main font with Arial as an additional font :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
.script-arabic {&lt;br /&gt;
    font-size: 105% !important;&lt;br /&gt;
    font-family: &amp;#039;Droid Arabic Naskh&amp;#039;, Arial, sans-serif !important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: Font names containing spaces (or any other character than a letter) need to be put between &amp;lt;code&amp;gt;&amp;lt;strong&amp;gt;&amp;#039;&amp;lt;/strong&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;strong&amp;gt;&amp;quot;&amp;lt;/strong&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
: The list of fonts should always be terminated by the pseudo-font names &amp;quot;sans-serif&amp;quot; and/or &amp;quot;serif&amp;quot;, to allow using the fonts defined in user preferences in their browser, or the fonts set by default in browsers.&lt;br /&gt;
: 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. &amp;lt;code&amp;gt;line-height: 125%;&amp;lt;/code&amp;gt; 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 &amp;quot;normal&amp;quot; which will properly use the minimum setting of the line-height recommended by each candidate font. &lt;br /&gt;
: Some Arabic-based letters aren&amp;#039;t rendered properly by some old versions of &amp;#039;&amp;#039;[[Times New Roman]]&amp;#039;&amp;#039;, such as: {{raise|0.6em|2=&amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family:&amp;#039;Noto Naskh Arabic&amp;#039;, &amp;#039;Droid Arabic Naskh&amp;#039;, Harmattan, Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, &amp;#039;Sakkal Majalla&amp;#039;, &amp;#039;Segoe UI&amp;#039;, &amp;#039;Microsoft Sans Serif&amp;#039;, Arial; font-size: 200%; line-height:1.6;&amp;quot;&amp;gt;ېـ&amp;amp;nbsp;ـېـ&amp;amp;nbsp;ـې&amp;amp;nbsp;ې&amp;lt;/span&amp;gt;}} which is used in [[Pashto language|Pashto]] and [[Uyghur language|Uyghur]]; the newest versions of the following fonts render it properly: &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;&amp;#039;Noto&amp;amp;nbsp;Naskh&amp;amp;nbsp;Arabic&amp;#039;&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;&amp;#039;Droid&amp;amp;nbsp;Arabic&amp;amp;nbsp;Naskh&amp;#039;&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;Harmattan&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;Scheherazade&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;&amp;#039;Scheherazade New&amp;#039;&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;Lateef&amp;lt;/b&amp;gt;, Arial, &amp;#039;Times&amp;amp;nbsp;New&amp;amp;nbsp;Roman&amp;#039;, &amp;#039;Sakkal&amp;amp;nbsp;Majalla&amp;#039;, &amp;#039;Microsoft&amp;amp;nbsp;Uighur&amp;#039;, &amp;#039;Arabic&amp;amp;nbsp;Typesetting&amp;#039;, &amp;#039;Microsoft&amp;amp;nbsp;Sans&amp;amp;nbsp;Serif&amp;#039;, &amp;#039;Segoe&amp;amp;nbsp;UI&amp;#039;.&amp;lt;/i&amp;gt; (The newest versions which are available free-of-charge online are marked as &amp;#039;&amp;#039;&amp;#039;bold&amp;#039;&amp;#039;&amp;#039;.)&lt;br /&gt;
* A demonstration with &amp;#039;&amp;#039;[//fontlibrary.org/en/font/droid-arabic-naskh &amp;#039;Droid Arabic Naskh&amp;#039;]&amp;#039;&amp;#039; added first at 105%: &amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family: &amp;#039;Droid Arabic Naskh&amp;#039;, Arial, &amp;#039;Arabic Transparent&amp;#039;, &amp;#039;Times New Roman&amp;#039;, Harmattan; font-size: 105%&amp;quot;&amp;gt;موسوعة&amp;lt;/span&amp;gt; &amp;amp;nbsp; However, it has an error in displaying the word (&amp;lt;span style=&amp;quot;font-size:125%; font-family:&amp;#039;Noto Naskh Arabic&amp;#039;, &amp;#039;KacstOne&amp;#039;, &amp;#039;DejaVu Sans&amp;#039;, &amp;#039;DejaVu Sans Condensed&amp;#039;, Harmattan, &amp;#039;Iranian Sans&amp;#039;, Tahoma;margin-right:2px;margin-left:1px&amp;quot;&amp;gt;[[riyal|ريال]]&amp;lt;/span&amp;gt;), it is folded on itself, rather than normally rendered in &amp;#039;&amp;#039;[[naskh (script)|naskh]]&amp;#039;&amp;#039;.&lt;br /&gt;
* A demonstration with &amp;#039;&amp;#039;[//www.google.com/get/noto/ Noto Naskh Arabic]&amp;#039;&amp;#039; added first at 125%: &amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family: &amp;#039;Noto Naskh Arabic&amp;#039;, Harmattan, Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, &amp;#039;Sakkal Majalla&amp;#039;, Arial, &amp;#039;Arabic Transparent&amp;#039;, &amp;#039;Times New Roman&amp;#039;; font-size: 125%&amp;quot;&amp;gt;موسوعة&amp;lt;/span&amp;gt; &amp;amp;nbsp; That font is freely available online.&lt;br /&gt;
* A demonstration with &amp;#039;&amp;#039;[http://scripts.sil.org/cms/scripts/page.php?item_id=Harmattan Harmattan]&amp;#039;&amp;#039; added first at 125%: &amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family: Harmattan, Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, &amp;#039;Sakkal Majalla&amp;#039;, Arial, &amp;#039;Arabic Transparent&amp;#039;, &amp;#039;Times New Roman&amp;#039;; font-size: 125%&amp;quot;&amp;gt;موسوعة&amp;lt;/span&amp;gt; &amp;amp;nbsp; That font is freely available online.&lt;br /&gt;
* A demonstration with &amp;#039;&amp;#039;[//scripts.sil.org/cms/scripts/page.php?item_id=Scheherazade Scheherazade]&amp;#039;&amp;#039; or &amp;#039;&amp;#039;[//fonts.google.com/specimen/Scheherazade+New?subset=arabic Scheherazade New]&amp;#039;&amp;#039; added first at 175%: &amp;lt;span dir=&amp;quot;rtl&amp;quot; style=&amp;quot;font-family: Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, &amp;#039;Sakkal Majalla&amp;#039;, Arial, &amp;#039;Arabic Transparent&amp;#039;, &amp;#039;Times New Roman&amp;#039;, &amp;#039;Noto Naskh Arabic&amp;#039;, Harmattan; font-size: 175%&amp;quot;&amp;gt;موسوعة&amp;lt;/span&amp;gt; &amp;amp;nbsp; That font is freely available online, but if you chose to use it, you must increase the text size, because it shows it very small compared to other fonts.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
.script-arabic {&lt;br /&gt;
    font-size: 125% !important;&lt;br /&gt;
    /*&lt;br /&gt;
       The default line-height used by Wikipedia is 1.5 em, which can be lower or higher than the font default,&lt;br /&gt;
       reduce it to the minimum recommended for HTML by using the word normal or for example, use a percentage&lt;br /&gt;
       value, as 95%&lt;br /&gt;
    */&lt;br /&gt;
    line-height: 95%;&lt;br /&gt;
    font-family:&lt;br /&gt;
        /* The following fonts are recommended for best coverage of the Arabic script: */&lt;br /&gt;
        &amp;#039;Noto Naskh Arabic&amp;#039;, Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Droid Arabic Naskh&amp;#039;, Harmattan     /* free fonts */&lt;br /&gt;
        &amp;#039;Sakkal Majalla&amp;#039;,                         /* commercial font, also installed with recent versions of Windows */&lt;br /&gt;
        &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, /* commercial fonts installed with recent versions of Windows */&lt;br /&gt;
        /* Other fonts supporting the Arabic script with partial coverage: */&lt;br /&gt;
        Arial,                /* Warning! Old versions may not support a few characters. */&lt;br /&gt;
        &amp;#039;Times New Roman&amp;#039;,    /* Warning! Old versions may not support a few characters. */&lt;br /&gt;
        /* Default fallback fonts determined in the browser: */&lt;br /&gt;
        sans-serif /* No comma here! */&lt;br /&gt;
        /* Required at end to actually enable the override and make it work : */&lt;br /&gt;
        !important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Another example without the notes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
.script-arabic {&lt;br /&gt;
    font-size: 125% !important;&lt;br /&gt;
    line-height: 95%;&lt;br /&gt;
    font-family: &amp;#039;Noto Naskh Arabic&amp;#039;, Scheherazade, &amp;#039;Scheherazade New&amp;#039;, Lateef, &amp;#039;Droid Arabic Naskh&amp;#039;, Harmattan,&lt;br /&gt;
    Arial, &amp;#039;Times New Roman&amp;#039;, &amp;#039;Sakkal Majalla&amp;#039;, &amp;#039;Microsoft Uighur&amp;#039;, &amp;#039;Arabic Typesetting&amp;#039;, sans-serif !important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Template Data==&lt;br /&gt;
{{Template data header}}&lt;br /&gt;
{{cot|title=Parameter list|bg=#CCC}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {},&lt;br /&gt;
		&amp;quot;no_rtl_mark&amp;quot;: {},&lt;br /&gt;
		&amp;quot;size&amp;quot;: {},&lt;br /&gt;
		&amp;quot;style&amp;quot;: {},&lt;br /&gt;
		&amp;quot;attributes&amp;quot;: {}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;no_rtl_mark&amp;quot;,&lt;br /&gt;
		&amp;quot;size&amp;quot;,&lt;br /&gt;
		&amp;quot;style&amp;quot;,&lt;br /&gt;
		&amp;quot;attributes&amp;quot;&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{cob}}&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Template:Arabic alphabet shapes]] (its documentation page features a table showing a full test of contextual Arabic letter shapes supported).&lt;br /&gt;
* [[Template:Ug-textonly]] (enable Uyghur styled fonts)&lt;br /&gt;
* [[Template:Script/Nastaliq]] (used for the text written in Nastaliq styled Arabic script)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories go here: --&amp;gt;&lt;br /&gt;
[[Category:Script–font templates|A]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Cedar101</name></author>
	</entry>
</feed>