com.openhtmltopdf.bidi.BidiReorderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openhtmltopdf-core Show documentation
Show all versions of openhtmltopdf-core Show documentation
Open HTML to PDF is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code.
package com.openhtmltopdf.bidi;
/**
* An interface to provide text reordering services.
* Must use a proper algorithm rather than reverse string to allow
* for surrogate pairs, control characters, etc.
*/
public interface BidiReorderer {
public String reorderRTLTextToLTR(String text);
/**
* Arabic character shapes depends on whether a character is at the
* start, end or middle of a word. This algorithm aims to change the characters
* depending on their context.
*/
public String shapeText(String text);
/**
* Deshape text, for use if the shaped character is not in a font.
*/
public String deshapeText(String text);
/**
* Useful for optimization.
*/
public boolean isLiveImplementation();
}