Top Description Fields Constructors Methods
org.apache.fontbox.ttf.gsub

public Class GsubWorkerForGujarati

extends Object
implements GsubWorker
Class Inheritance
All Implemented Interfaces
org.apache.fontbox.ttf.gsub.GsubWorker
Imports
java.util.ArrayList, .Arrays, .Collections, .List, .Set, org.apache.commons.logging.Log, .LogFactory, org.apache.fontbox.ttf.CmapLookup, org.apache.fontbox.ttf.model.GsubData, .ScriptFeature

Gujarati-specific implementation of GSUB system.
Author
JAVAUSER

Field Summary

Modifier and TypeField and Description
private static final char
private static final char[]
private final List<Integer>
private final List<Integer>
private final CmapLookup
private static final List<String>
FEATURES_IN_ORDER

This sequence is very important.

private final GsubData
private static final Log
private static final char[]
private final List<Integer>
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private List<Integer>
adjustRephPosition(List<Integer> originalGlyphIds)

private List<Integer>
applyGsubFeature(ScriptFeature scriptFeature, List<Integer> originalGlyphs)

private List<Integer>
applyRKRFFeature(ScriptFeature rkrfGlyphsForSubstitution, List<Integer> originalGlyphIds)

public List<Integer>
applyTransforms(List<Integer>
list of original glyph IDs
originalGlyphIds
)

Implements org.apache.fontbox.ttf.gsub.GsubWorker.applyTransforms.

Applies language-specific transforms including GSUB and any other pre or post-processing necessary for displaying Glyphs correctly.

private List<Integer>
private List<Integer>
private Integer
getGlyphId(char character)

private List<Integer>
private List<Integer>
repositionGlyphs(List<Integer> originalGlyphIds)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BEFORE_HALF_CHARback to summary
private static final char BEFORE_HALF_CHAR
BEFORE_REPH_CHARSback to summary
private static final char[] BEFORE_REPH_CHARS
beforeHalfGlyphIdsback to summary
private final List<Integer> beforeHalfGlyphIds
beforeRephGlyphIdsback to summary
private final List<Integer> beforeRephGlyphIds
cmapLookupback to summary
private final CmapLookup cmapLookup
FEATURES_IN_ORDERback to summary
private static final List<String> FEATURES_IN_ORDER

This sequence is very important. This has been taken from https://docs.microsoft.com/en-us/typography/script-development/gujarati

gsubDataback to summary
private final GsubData gsubData
LOGback to summary
private static final Log LOG
REPH_CHARSback to summary
private static final char[] REPH_CHARS
rephGlyphIdsback to summary
private final List<Integer> rephGlyphIds
RKRF_FEATUREback to summary
private static final String RKRF_FEATURE
VATU_FEATUREback to summary
private static final String VATU_FEATURE

Constructor Detail

GsubWorkerForGujaratiback to summary
pack-priv GsubWorkerForGujarati(CmapLookup cmapLookup, GsubData gsubData)

Method Detail

adjustRephPositionback to summary
private List<Integer> adjustRephPosition(List<Integer> originalGlyphIds)
applyGsubFeatureback to summary
private List<Integer> applyGsubFeature(ScriptFeature scriptFeature, List<Integer> originalGlyphs)
applyRKRFFeatureback to summary
private List<Integer> applyRKRFFeature(ScriptFeature rkrfGlyphsForSubstitution, List<Integer> originalGlyphIds)
applyTransformsback to summary
public List<Integer> applyTransforms(List<Integer> originalGlyphIds)

Implements org.apache.fontbox.ttf.gsub.GsubWorker.applyTransforms.

Doc from org.apache.fontbox.ttf.gsub.GsubWorker.applyTransforms.

Applies language-specific transforms including GSUB and any other pre or post-processing necessary for displaying Glyphs correctly.

Parameters
originalGlyphIds:List<Integer>

list of original glyph IDs

Returns:List<Integer>

list of transformed glyph IDs

Annotations
@Override
getBeforeHalfGlyphIdsback to summary
private List<Integer> getBeforeHalfGlyphIds()
getbeforeRephGlyphIdsback to summary
private List<Integer> getbeforeRephGlyphIds()
getGlyphIdback to summary
private Integer getGlyphId(char character)
getRephGlyphIdsback to summary
private List<Integer> getRephGlyphIds()
repositionGlyphsback to summary
private List<Integer> repositionGlyphs(List<Integer> originalGlyphIds)