Class StandardScriptConfig
- All Implemented Interfaces:
-
IFeaturesConfig
- Direct Known Subclasses:
-
LatinScriptConfig
IFeaturesConfig
implementation for convenient configuration of any standard script.
Standard Script - any non-complex script; any script that does not require re-ordering or contextual analysis in the shaping process. According to Open Font File specification such scripts are Character.UnicodeScript.ARMENIAN
, Character.UnicodeScript.CYRILLIC
, Character.UnicodeScript.GEORGIAN
, Character.UnicodeScript.GREEK
, Character.UnicodeScript.LATIN
, Character.UnicodeScript.RUNIC
, Character.UnicodeScript.OGHAM
.
See also STANDARD_SCRIPTS
set.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionappendCustomFeature
(String feature) Adds a custom feature to the end of the list of features that are to be applied.Gets scripts that are affected by this instance ofIFeaturesConfig
.Enlists OpenType features that are applied in given order to the scripts defined byIFeaturesConfig.getScripts()
.prependCustomFeature
(String feature) Adds a custom feature to the beginning of the list of features that are to be applied.removeCustomFeature
(String feature) Removes custom feature added to the features list viaappendCustomFeature(String)
orprependCustomFeature(String)
.setCharacterCompositionDecompositionSubstitution
(boolean enabled) Enables or disables characters composition/decomposition substitution.setDistancesAdjustment
(boolean enabled) Enables or disables distance adjustment.setKerningFeature
(boolean enabled) Enables or disables pair kerning.setLigaturesApplying
(boolean enabled) Enables or disables standard ligatures substitution.setMarkToBasePositioning
(boolean enabled) Enables or disables mark to base positioning.setMarkToMarkPositioning
(boolean enabled) Enables or disables mark to mark positioning.
-
Field Details
-
STANDARD_SCRIPTS
-
-
Constructor Details
-
StandardScriptConfig
-
-
Method Details
-
getScripts
Description copied from interface:IFeaturesConfig
Gets scripts that are affected by this instance ofIFeaturesConfig
.- Specified by:
-
getScripts
in interfaceIFeaturesConfig
- Returns:
-
an unmodifiable
Set
of scripts which processing is defined by thisIFeaturesConfig
.
-
setLigaturesApplying
Enables or disables standard ligatures substitution.If enabled the "liga" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's disabled.
- Parameters:
-
enabled
-true
in order to enable the feature, otherwisefalse
. - Returns:
-
this
StandardScriptConfig
instance.
-
setCharacterCompositionDecompositionSubstitution
Enables or disables characters composition/decomposition substitution.If enabled the "ccmp" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's disabled.
- Parameters:
-
enabled
-true
in order to enable the feature, otherwisefalse
. - Returns:
-
this
StandardScriptConfig
instance.
-
setKerningFeature
Enables or disables pair kerning.If enabled the "kern" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's disabled.
- Parameters:
-
enabled
-true
in order to enable the feature,false
- to disable. - Returns:
-
this
StandardScriptConfig
instance.
-
setDistancesAdjustment
Enables or disables distance adjustment.If enabled the "dist" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's disabled.
- Parameters:
-
enabled
-true
in order to enable the feature,false
- to disable. - Returns:
-
this
StandardScriptConfig
instance.
-
setMarkToBasePositioning
Enables or disables mark to base positioning. It's usually used for combining diacritics with the base glyphs.If enabled the "liga" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's enabled.
- Parameters:
-
enabled
-true
in order to enable the feature,false
- to disable. - Returns:
-
this
StandardScriptConfig
instance.
-
setMarkToMarkPositioning
Enables or disables mark to mark positioning. It's usually used for combining diacritics with other diacritics.If enabled the "liga" feature tag will be present in the list of features to be applied (see
IFeaturesConfig.listFeatures()
). It will appear after custom features added byprependCustomFeature(String)
(if any) and before custom features added byappendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.By default it's enabled.
- Parameters:
-
enabled
-true
in order to enable the feature,false
- to disable. - Returns:
-
this
StandardScriptConfig
instance.
-
appendCustomFeature
Adds a custom feature to the end of the list of features that are to be applied.See also
IFeaturesConfig.listFeatures()
- Parameters:
-
feature
- the feature tag denoting feature in the font. - Returns:
-
this
StandardScriptConfig
instance.
-
prependCustomFeature
Adds a custom feature to the beginning of the list of features that are to be applied.See also
IFeaturesConfig.listFeatures()
- Parameters:
-
feature
- the feature tag denoting feature in the font. - Returns:
-
this
StandardScriptConfig
instance.
-
removeCustomFeature
Removes custom feature added to the features list viaappendCustomFeature(String)
orprependCustomFeature(String)
.See also
IFeaturesConfig.listFeatures()
- Parameters:
-
feature
- the feature tag denoting feature in the font. - Returns:
-
this
StandardScriptConfig
instance.
-
listFeatures
Description copied from interface:IFeaturesConfig
Enlists OpenType features that are applied in given order to the scripts defined byIFeaturesConfig.getScripts()
.- Specified by:
-
listFeatures
in interfaceIFeaturesConfig
- Returns:
-
an unmodifiable
List
of OpenType features tags to be applied.
-