---
title: "עבודה עם פונטים Java"
---


גופן הוא קבוצה של דמויות עם גודל מסוים, צבע ועיצוב. Aspose.Words מאפשר לך לעבוד עם גופנים באמצעות כיתות הקשורות לגפן שונים, כולל את [Font](https://reference.aspose.com/words/java/com.aspose.words/font/) מעמד.

## המונחים:

פורמט גופני נוכחי מיוצג על ידי **Font** החפץ חזר [Font](https://reference.aspose.com/words/java/com.aspose.words/documentbuilder/#getFont) רכוש. The The The **Font** הכיתה מכילה מגוון רחב של תכונות גופניות אפשריות Microsoft Word.

הדוגמה הבאה של הקוד מראה כיצד להגדיר פורמט גופני:

{{< gist "aspose-words-gists" "827e71ccc0b8516a3cfe247b86ce6d4e" "Examples-src-main-java-com-aspose-words-examples-programming_documents-document-WorkWithDocumentBuilder-SetFontFormatting.java" >}}

תכונות מילוי עכשיו זמינים גם עבור גופנים כדי להגדיר פורמט מלא של טקסט. זה נותן יכולת לשנות, למשל, צבע הבסיס או שקיפות של מילוי הטקסט.

## עקבו אחרי Font Line Spacing

קו ספיגה של גופן הוא המרחק האנכי בין קווי הבסיס של שני קווים רצופים של טקסט. כך, קו ספיגה כולל את החלל הריק בין השורות יחד עם גובה הדמות עצמה.

The The The [LineSpacing](https://reference.aspose.com/words/java/com.aspose.words/font/#getLineSpacing) הנכס הוצג ב **Font** שיעור להשיג ערך זה כפי שמוצג בדוגמה שניתנה להלן:

{{< gist "aspose-words-gists" "827e71ccc0b8516a3cfe247b86ce6d4e" "Examples-src-main-java-com-aspose-words-examples-programming_documents-document-GetFontLineSpacing-GetFontLineSpacing.java" >}}

## תגית: Mark

The The The **Font** מעמד מספק [EmphasisMark](https://reference.aspose.com/words/java/com.aspose.words/font/#getEmphasisMark) רכוש כדי לקבל או להגדיר את ערכי הדגשה של אמפזמארק להיות מיושם בפורמט.

דוגמה לקוד הבא מראה כיצד להגדיר את **EphasisMark** רכוש:

{{< gist "aspose-words-gists" "827e71ccc0b8516a3cfe247b86ce6d4e" "Examples-src-main-java-com-aspose-words-examples-programming_documents-document-WorkWithDocumentBuilder-SetFontEmphasisMark.java" >}}
