> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ar/mqalat-mtamqh/29-how-to-use-opentype-variable-fonts-with-latex.md).

# كيفية استخدام الخطوط المتغيرة OpenType مع LaTeX

[مقدمة](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [الخطوة 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [الخطوة 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [الخطوة 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [الخطوة 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [الخطوة 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [الخطوة 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [الخطوة 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [الخطوة 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [أمثلة ومشاريع](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)

في هذه السلسلة التعليمية، ستتعلم كيفية تثبيت وتكوين واستخدام الخطوط المتغيرة OpenType في LaTeX، مع التركيز على LuaLaTeX و [حزمة fontspec](https://ctan.org/pkg/fontspec?lang=en). من خلال [مشروع Overleaf](https://www.overleaf.com/8438931911svtqtnmfvsrp#28008d) موجَّه، ستتبع تعليمات خطوة بخطوة تغطي كلًّا من التقنيات العملية والمعرفة الأساسية الضرورية، مما يضمن لك أن تتمكن بثقة من العمل مع الخطوط المتغيرة في مستندات LaTeX الخاصة بك. وعلى طول الطريق، ستطوّر فهمًا أوسع لخطوط LaTeX، بما في ذلك كيفية حل تحذيرات “undefined font shape” عبر تهيئة الخطوط المتغيرة المناسبة.

توفّر الخطوط المتغيرة مرونة لا مثيل لها في تصميم مستندات LaTeX، وتُحسّن عرض النص وسهولة قراءته من خلال إتاحة تخصيص سمات الخط مثل الوزن والعرض. كما أنها تساعد في حل مشكلات التنضيد، مثل استيعاب مزيد من النص ضمن مقدار محدد من المساحة. يرجى ملاحظة أن هذه السلسلة تركز حصريًا على خطوط النص، إذ إن الخطوط المتغيرة الخاصة بتنضيد الرياضيات ليست متاحة بعد.

### محتويات الدرس

* مقدمة إلى الخطوط المتغيرة (هذه المقالة)
* [الخطوة 1: إعداد مشروع Overleaf لاستخدام الخطوط المتغيرة](/latex/ar/mqalat-mtamqh/37-step-1-setting-up-an-overleaf-project-to-use-variable-fonts.md)
* [الخطوة 2: مقدمة إلى خطوط LaTeX](/latex/ar/mqalat-mtamqh/38-step-2-an-introduction-to-latex-fonts.md)
* [الخطوة 3: استبدال الخطوط الافتراضية في LaTeX بخطوط متغيرة](/latex/ar/mqalat-mtamqh/39-step-3-replacing-latex-s-default-fonts-with-variable-fonts.md)
* [الخطوة 4: كيفية تهيئة خط متغير مائل باستخدام fontspec](/latex/ar/mqalat-mtamqh/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md)
* [الخطوة 5: أوزان خطوط LaTeX والمثيلات المسماة للخطوط المتغيرة](/latex/ar/mqalat-mtamqh/41-step-5-latex-font-weights-and-named-instances-of-variable-fonts.md)
* [الخطوة 6: استخدام الخطوط المتغيرة لإضافة خطوط غامقة إلى مشروع Overleaf](/latex/ar/mqalat-mtamqh/42-step-6-using-variable-fonts-to-add-bold-fonts-to-an-overleaf-project.md)
* [الخطوة 7: استخدام الخطوط المتغيرة Noto Sans وRoboto Mono مع LaTeX](/latex/ar/mqalat-mtamqh/43-step-7-using-noto-sans-and-roboto-mono-variable-fonts-with-latex.md)
* [الخطوة 8: كيفية إنشاء حزمة LaTeX بسيطة لتهيئة الخطوط المتغيرة الخاصة بك](/latex/ar/mqalat-mtamqh/44-step-8-how-to-create-a-simple-latex-package-to-configure-your-variable-fonts.md)
* [5 مشاريع Overleaf تُظهر كيفية استخدام الخطوط المتغيرة مع LaTeX](/latex/ar/mqalat-mtamqh/35-overleaf-projects-showing-how-to-use-variable-fonts-with-latex.md)

### مقدمة إلى الخطوط المتغيرة

بالنسبة إلى خبراء الطباعة والمصممين وعشاق الخطوط، فإن 14 سبتمبر 2016 تاريخ لا يُنسى. ففي ذلك اليوم، أعلنت Microsoft و [Google](https://opensource.googleblog.com/2016/09/introducing-opentype-font-variations.html), [Adobe](https://blog.typekit.com/2016/09/14/variable-fonts-a-new-kind-of-font-for-flexible-design/)، وApple [إعلانًا علنيًا](https://youtu.be/6kizDePhcFU?feature=shared\&t=250) عن تنسيق خط جديد يسمى [OpenType Font Variations](https://medium.com/variable-fonts/https-medium-com-tiro-introducing-opentype-variable-fonts-12ba6cd2369)، والمعروف أكثر باسم *الخطوط المتغيرة OpenType* أو ببساطة *الخطوط المتغيرة*.

تقليديًا، كان كل نمط خط، مثل العادي أو الغامق أو شبه الغامق أو الغامق جدًا أو المضغوط أو المضغوط الغامق، يحتاج إلى ملف خط منفصل، لكن ذلك لم يعد ضروريًا. تُعد الخطوط المتغيرة OpenType تقنية مبهرة تتيح لملف خط واحد إنتاج أنماط خط متعددة من خلال تعديل قيم معلمات مدمجة تُعرف باسم *محاور التصميم*. ويتضح ذلك في الفيديو التالي باستخدام خط Google المتغير [Noto Serif](https://fonts.google.com/noto/specimen/Noto+Serif/tester).

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/3OhDBHA95DciCRVRgrF4wp/18f8c3f6d15109bf307c48bde9d7c879/VariableFonts.mp4>" %}

يحتوي Noto Serif من Google على محورَي تصميم، هما العرض والوزن، لكن قد تحتوي خطوط أخرى على محور واحد أو عدة محاور—على سبيل المثال، الخط المتغير المسمى [Recursive](https://fonts.google.com/specimen/Recursive/tester) يحتوي على خمسة محاور و [بعضها يحتوي على أكثر من ذلك حتى](https://www.axis-praxis.org/specimens/decovar). يحدد مطوّر الخط عدد المحاور وتأثيراتها التصميمية.

### بعض الملاحظات حول محاور التصميم

هذا ما تحتاج إلى معرفته عن محاور التصميم لاستخدام الخطوط المتغيرة مع LaTeX (وتحديدًا fontspec وLuaLaTeX).

* يُعرَّف كل محور تصميم بواسطة “وسم” قصير مكوّن من أربعة أحرف واسم أطول وأكثر وصفًا.
* تتيح مواصفة الخطوط المتغيرة OpenType وجود [خمسة محاور مسجلة (“قياسية”)](https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags):

|       |              |
| ----- | ------------ |
| الوسم | الاسم        |
| ital  | مائل         |
| opsz  | الحجم البصري |
| slnt  | ميل          |
| wdth  | العرض        |
| wght  | الوزن        |

* بدءًا من [الإصدار 2.9a](https://github.com/latex3/fontspec/releases/tag/v2.9a)، و [حزمة fontspec](https://ctan.org/pkg/fontspec?lang=en) يمكنك ضبط قيمة محور قياسي باستخدام اسمه، مثل `Weight=400`.
* يتمتع منشئو الخطوط بحرية إنشاء وتسـمية محاور تصميم إضافية. وتوفّر fontspec ميزات لضبط قيمة أي محور تصميم باستخدام وسمه المكوّن من أربعة أحرف.
* تتراوح قيم محور التصميم من حد أدنى إلى حد أقصى باستخدام حجم خطوة يحدده منشئ الخط. لاستخدام خط متغير مع LaTeX (LuaLaTeX)، ستحتاج إلى معرفة محاوره وقيم الحد الأدنى والحد الأقصى وقيمة الزيادة (حجم الخطوة).
* في الوقت الحالي، لا يمكن استخدام الخطوط المتغيرة إلا لنص المستند — فلا توجد خطوط متغيرة للرياضيات.
* تحتفظ Google بـ [قائمة بمحاور التصميم](https://fonts.google.com/variablefonts#axis-definitions) المستخدمة حاليًا في الخطوط التي توفرها، بما في ذلك وسم التصميم المكوّن من أربعة أحرف، والاسم الكامل، وتعريف لما يقوم به المحور.

### تتطلب الخطوط المتغيرة LuaLaTeX وحزمة fontspec

اعتبارًا من أغسطس 2024، يدعم مترجم LuaLaTeX فقط [المترجم](/latex/ar/qaadh-almarfh/026-changing-compiler.md) الخطوط المتغيرة OpenType — أما pdfLaTeX وXeLaTeX فلا يدعمانها.

يتطلب استخدام خطوط OpenType مع LuaLaTeX حزمة fontspec، التي توفّر أوامر على مستوى المستخدم للوصول إلى نظام تحميل خطوط أدنى مستوى وأكثر تقنية يُسمى [luaotfload](https://ctan.org/pkg/luaotfload?lang=en). وعلى الرغم من أنه من الممكن تمامًا استخدام ميزات luaotfload مباشرةً، فإن معظم الناس يفضلون سهولة وراحة fontspec.

[TeX Live 2024](https://www.overleaf.com/blog/tex-live-2024-is-now-available) يتضمن fontspec الإصدار 2.9a، الذي أُصدر في 13 فبراير 2024، ويضيف ميزات إضافية تجعل استخدام الخطوط المتغيرة أسهل حتى.

### أين يمكنني العثور على بعض الخطوط المتغيرة واستكشافها؟

يُعدّ زيارة Google Fonts مكانًا ممتازًا للبدء — ولا سيما [الصفحة التي تسرد عائلات الخطوط ومحاور تصميمها](https://fonts.google.com/variablefonts). وبمجرد أن تحدد خطًا يهمك، انتقل إلى صفحة *Type tester* واضبط محاور تصميمه باستخدام عناصر التحكم المتاحة.

ال [موقع Axis-Praxis](https://www.axis-praxis.org) يتيح لك تجربة العديد من الخطوط المتغيرة، وبعضها يعرض إمكانات تصميم مثيرة للاهتمام — بما في ذلك [Decovar](https://www.axis-praxis.org/specimens/decovar)، وهو خط تجريبي يحتوي على 12 محور تصميم. يمكنك أيضًا رفع الخطوط المتغيرة إلى Axis-Praxis واختبارها باستخدام عناصر التحكم التي ينشئها الموقع تلقائيًا لتغيير قيم محاور التصميم.

موقع مفيد آخر هو <https://v-fonts.com/>، والذي يصف هدفه بأنه “مورد بسيط للعثور على الخطوط المتغيرة وتجربتها.”

[مقدمة](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [الخطوة 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [الخطوة 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [الخطوة 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [الخطوة 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [الخطوة 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [الخطوة 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [الخطوة 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [الخطوة 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [أمثلة ومشاريع](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ar/mqalat-mtamqh/29-how-to-use-opentype-variable-fonts-with-latex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
