Package org.apache.fontbox.ttf.gsub
Class GsubWorkerForDevanagari
- java.lang.Object
-
- org.apache.fontbox.ttf.gsub.GsubWorkerForDevanagari
-
- All Implemented Interfaces:
GsubWorker
public class GsubWorkerForDevanagari extends java.lang.Object implements GsubWorker
Devanagari-specific implementation of GSUB system
-
-
Field Summary
Fields Modifier and Type Field Description private static charBEFORE_HALF_CHARprivate static char[]BEFORE_REPH_CHARSprivate java.util.List<java.lang.Integer>beforeHalfGlyphIdsprivate java.util.List<java.lang.Integer>beforeRephGlyphIdsprivate CmapLookupcmapLookupprivate static java.util.List<java.lang.String>FEATURES_IN_ORDERThis sequence is very important.private GsubDatagsubDataprivate static org.apache.commons.logging.LogLOGprivate static char[]REPH_CHARSprivate java.util.List<java.lang.Integer>rephGlyphIdsprivate static java.lang.StringRKRF_FEATUREprivate static java.lang.StringVATU_FEATURE
-
Constructor Summary
Constructors Constructor Description GsubWorkerForDevanagari(CmapLookup cmapLookup, GsubData gsubData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List<java.lang.Integer>adjustRephPosition(java.util.List<java.lang.Integer> originalGlyphIds)private java.util.List<java.lang.Integer>applyGsubFeature(ScriptFeature scriptFeature, java.util.List<java.lang.Integer> originalGlyphs)private java.util.List<java.lang.Integer>applyRKRFFeature(ScriptFeature rkrfGlyphsForSubstitution, java.util.List<java.lang.Integer> originalGlyphIds)java.util.List<java.lang.Integer>applyTransforms(java.util.List<java.lang.Integer> originalGlyphIds)Applies language-specific transforms including GSUB and any other pre or post-processing necessary for displaying Glyphs correctly.private java.util.List<java.lang.Integer>getBeforeHalfGlyphIds()private java.util.List<java.lang.Integer>getbeforeRephGlyphIds()private java.lang.IntegergetGlyphId(char character)private java.util.List<java.lang.Integer>getRephGlyphIds()private java.util.List<java.lang.Integer>repositionGlyphs(java.util.List<java.lang.Integer> originalGlyphIds)
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
RKRF_FEATURE
private static final java.lang.String RKRF_FEATURE
- See Also:
- Constant Field Values
-
VATU_FEATURE
private static final java.lang.String VATU_FEATURE
- See Also:
- Constant Field Values
-
FEATURES_IN_ORDER
private static final java.util.List<java.lang.String> FEATURES_IN_ORDER
This sequence is very important. This has been taken from https://docs.microsoft.com/en-us/typography/script-development/devanagari
-
REPH_CHARS
private static final char[] REPH_CHARS
-
BEFORE_REPH_CHARS
private static final char[] BEFORE_REPH_CHARS
-
BEFORE_HALF_CHAR
private static final char BEFORE_HALF_CHAR
- See Also:
- Constant Field Values
-
cmapLookup
private final CmapLookup cmapLookup
-
gsubData
private final GsubData gsubData
-
rephGlyphIds
private final java.util.List<java.lang.Integer> rephGlyphIds
-
beforeRephGlyphIds
private final java.util.List<java.lang.Integer> beforeRephGlyphIds
-
beforeHalfGlyphIds
private final java.util.List<java.lang.Integer> beforeHalfGlyphIds
-
-
Constructor Detail
-
GsubWorkerForDevanagari
GsubWorkerForDevanagari(CmapLookup cmapLookup, GsubData gsubData)
-
-
Method Detail
-
applyTransforms
public java.util.List<java.lang.Integer> applyTransforms(java.util.List<java.lang.Integer> originalGlyphIds)
Description copied from interface:GsubWorkerApplies language-specific transforms including GSUB and any other pre or post-processing necessary for displaying Glyphs correctly.- Specified by:
applyTransformsin interfaceGsubWorker- Parameters:
originalGlyphIds- list of original glyph IDs- Returns:
- list of transformed glyph IDs
-
applyRKRFFeature
private java.util.List<java.lang.Integer> applyRKRFFeature(ScriptFeature rkrfGlyphsForSubstitution, java.util.List<java.lang.Integer> originalGlyphIds)
-
adjustRephPosition
private java.util.List<java.lang.Integer> adjustRephPosition(java.util.List<java.lang.Integer> originalGlyphIds)
-
repositionGlyphs
private java.util.List<java.lang.Integer> repositionGlyphs(java.util.List<java.lang.Integer> originalGlyphIds)
-
applyGsubFeature
private java.util.List<java.lang.Integer> applyGsubFeature(ScriptFeature scriptFeature, java.util.List<java.lang.Integer> originalGlyphs)
-
getBeforeHalfGlyphIds
private java.util.List<java.lang.Integer> getBeforeHalfGlyphIds()
-
getRephGlyphIds
private java.util.List<java.lang.Integer> getRephGlyphIds()
-
getbeforeRephGlyphIds
private java.util.List<java.lang.Integer> getbeforeRephGlyphIds()
-
getGlyphId
private java.lang.Integer getGlyphId(char character)
-
-