حدد الشرق الأقصى والاسم اللاتيني للخط في خيارات النص للشكل
Contents
[
Hide
]
سيناريوهات الاستخدام الممكنة
في بعض الأحيان تريد عرض نص بخط لغة الشرق الأقصى ، مثل اليابانية ، والصينية ، والتايلاندية ، إلخ. يوفر لك Aspose.CellsTextOptions.FarEastNameالخاصية التي يمكن استخدامها لتحديد اسم الخط للغة الشرق الأقصى. إلى جانب ذلك ، يمكنك أيضًا تحديد اسم الخط اللاتيني باستخدامTextOptions.LatinNameخاصية.
حدد الشرق الأقصى والاسم اللاتيني للخط في خيارات النص للشكل
ينشئ نموذج التعليمات البرمجية التالي مربع نص ويضيف بعض النص الياباني بداخله. ثم تحدد أسماء الخطوط اللاتينية والشرق الأقصى للنص وتحفظ المصنف باسمإخراج ملف Excel. تُظهر لقطة الشاشة التالية أسماء الخطوط اللاتينية والشرق الأقصى لمربع نص الإخراج في Microsoft Excel.
عينة من الرموز
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Create empty workbook. | |
Workbook wb = new Workbook(); | |
// Access first worksheet. | |
Worksheet ws = wb.Worksheets[0]; | |
// Add textbox inside the worksheet. | |
int idx = ws.TextBoxes.Add(5, 5, 50, 200); | |
Aspose.Cells.Drawing.TextBox tb = ws.TextBoxes[idx]; | |
// Set the text of the textbox. | |
tb.Text = "こんにちは世界"; | |
// Specify the Far East and Latin name of the font. | |
tb.TextOptions.LatinName = "Comic Sans MS"; | |
tb.TextOptions.FarEastName = "KaiTi"; | |
// Save the output Excel file. | |
wb.Save("outputSpecifyFarEastAndLatinNameOfFontInTextOptionsOfShape.xlsx", SaveFormat.Xlsx); |