아시아 타이포그래피 작업

아시아 타이포그래피는 아시아 언어로 작성된 문서의 텍스트 단락에 대한 옵션의 집합입니다.

Aspose.Words 를 사용하여 아시아 타이포그래피를 지원합니다 ParagraphFormat 클래스와 그 속성 중 일부.

자동으로 아시아어와 라틴어 텍스트 또는 숫자 사이의 공간을 조정

동아시아 텍스트와 라틴 텍스트를 모두 사용하여 서식 파일을 디자인하고 두 텍스트 유형 사이의 공백을 제어하여 양식 서식 파일의 모양을 개선하려는 경우 이 두 텍스트 유형 사이의 공백을 자동으로 조정하도록 양식 서식 파일을 구성할 수 있습니다. 이를 위해 다음을 사용할 수 있습니다 AddSpaceBetweenFarEastAndAlpha 그리고 AddSpaceBetweenFarEastAndDigit 의 속성 ParagraphFormat 수업

다음 코드 예제에서는 사용 방법을 보여 줍니다 AddSpaceBetweenFarEastAndAlpha 그리고 AddSpaceBetweenFarEastAndDigit 속성:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
System::SharedPtr<Document> doc = System::MakeObject<Document>();
System::SharedPtr<DocumentBuilder> builder = System::MakeObject<DocumentBuilder>(doc);
// Set paragraph formatting properties
System::SharedPtr<ParagraphFormat> paragraphFormat = builder->get_ParagraphFormat();
paragraphFormat->set_AddSpaceBetweenFarEastAndAlpha(true);
paragraphFormat->set_AddSpaceBetweenFarEastAndDigit(true);
builder->Writeln(u"Automatically adjust space between Asian and Latin text");
builder->Writeln(u"Automatically adjust space between Asian text and numbers");
System::String outputPath = outputDataDir + u"DocumentBuilderSetFormatting.SetSpacebetweenAsianandLatintext.doc";
doc->Save(outputPath);

줄 바꿈 옵션 설정

단락 속성 대화 상자의 아시아 타이포그래피 탭 Microsoft Word 줄 바꿈 그룹이 있습니다. 이 그룹의 옵션은 다음을 사용하여 설정할 수 있습니다 FarEastLineBreakControl, WordWrap, HangingPunctuation 의 속성 ParagraphFormat 수업

다음 코드 예제에서는 이러한 속성을 사용하는 방법을 보여 줍니다:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
System::SharedPtr<Document> doc = System::MakeObject<Document>(inputDataDir + u"Input.docx");
System::SharedPtr<ParagraphFormat> format = doc->get_FirstSection()->get_Body()->get_Paragraphs()->idx_get(0)->get_ParagraphFormat();
format->set_FarEastLineBreakControl(false);
format->set_WordWrap(true);
format->set_HangingPunctuation(false);
System::String outputPath = outputDataDir + u"DocumentBuilderSetFormatting.SetAsianTypographyLinebreakGroupProp.docx";
doc->Save(outputPath);