Skip to content

Commit 5ebcf4f

Browse files
author
vk-github18
committed
GlyphLayoutManager for correct glyph layout
1 parent 2d3f7e2 commit 5ebcf4f

34 files changed

Lines changed: 2094 additions & 3 deletions

openpdf-core/src/main/java/org/openpdf/text/Document.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
import org.openpdf.text.error_messages.MessageLocalization;
5353
import org.openpdf.text.pdf.FopGlyphProcessor;
54+
import org.openpdf.text.pdf.GlyphLayoutManager;
5455
import org.openpdf.text.pdf.PdfDate;
5556
import java.io.IOException;
5657
import java.io.InputStream;
@@ -207,6 +208,31 @@ public class Document implements DocListener {
207208
*/
208209
TextRenderingOptions textRenderingOptions = new TextRenderingOptions();
209210

211+
/**
212+
* Get the glyphLayoutManager
213+
* @return glyphLayoutManager or null
214+
*/
215+
public GlyphLayoutManager getGlyphLayoutManager() {
216+
return glyphLayoutManager;
217+
}
218+
219+
/**
220+
* Set the glyphLayoutManager
221+
* Fluent API: <code>Document document = new Document().setGlyphLayoutManager(glyphLayoutManager);</code>
222+
* @param glyphLayoutManager
223+
* @return
224+
*/
225+
public Document setGlyphLayoutManager(GlyphLayoutManager glyphLayoutManager) {
226+
setGlyphSubstitutionEnabled(false); // Use either FopGlyphSubstition or GlyphLayoutManager, not both.
227+
this.glyphLayoutManager = glyphLayoutManager;
228+
return this;
229+
}
230+
231+
/**
232+
*
233+
*/
234+
private GlyphLayoutManager glyphLayoutManager;
235+
210236
/**
211237
* Constructs a new <CODE>Document</CODE> -object with the default page size as <CODE>PageSize.A4</CODE> .
212238
*/

0 commit comments

Comments
 (0)