public class StandardScriptConfig extends Object implements IFeaturesConfig
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.
Modifier and Type | Field and Description |
---|---|
static Set<Character.UnicodeScript> |
STANDARD_SCRIPTS |
Constructor and Description |
---|
StandardScriptConfig(Set<Character.UnicodeScript> scripts) |
Modifier and Type | Method and Description |
---|---|
StandardScriptConfig |
appendCustomFeature(String feature)
Adds a custom feature to the end of the list of features that are to be applied.
|
Set<Character.UnicodeScript> |
getScripts()
Gets scripts that are affected by this instance of IFeaturesConfig .
|
List<String> |
listFeatures()
Enlists OpenType features that are applied in given order to the scripts defined by IFeaturesConfig.getScripts() .
|
StandardScriptConfig |
prependCustomFeature(String feature)
Adds a custom feature to the beginning of the list of features that are to be applied.
|
StandardScriptConfig |
removeCustomFeature(String feature)
Removes custom feature added to the features list via appendCustomFeature(String) or prependCustomFeature(String) .
|
StandardScriptConfig |
setCharacterCompositionDecompositionSubstitution(boolean enabled)
Enables or disables characters composition/decomposition substitution.
|
StandardScriptConfig |
setDistancesAdjustment(boolean enabled)
Enables or disables distance adjustment.
|
StandardScriptConfig |
setKerningFeature(boolean enabled)
Enables or disables pair kerning.
|
StandardScriptConfig |
setLigaturesApplying(boolean enabled)
Enables or disables standard ligatures substitution.
|
StandardScriptConfig |
setMarkToBasePositioning(boolean enabled)
Enables or disables mark to base positioning.
|
StandardScriptConfig |
setMarkToMarkPositioning(boolean enabled)
Enables or disables mark to mark positioning.
|
public static final Set<Character.UnicodeScript> STANDARD_SCRIPTS
public StandardScriptConfig(Set<Character.UnicodeScript> scripts)
public Set<Character.UnicodeScript> getScripts()
IFeaturesConfig
IFeaturesConfig
.
getScripts
in interface IFeaturesConfig
Set
of scripts which processing is defined by this IFeaturesConfig
.
public StandardScriptConfig setLigaturesApplying(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's disabled.
enabled
- true
in order to enable the feature, otherwise false
.
StandardScriptConfig
instance.
public StandardScriptConfig setCharacterCompositionDecompositionSubstitution(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's disabled.
enabled
- true
in order to enable the feature, otherwise false
.
StandardScriptConfig
instance.
public StandardScriptConfig setKerningFeature(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's disabled.
enabled
- true
in order to enable the feature, false
- to disable.
StandardScriptConfig
instance.
public StandardScriptConfig setDistancesAdjustment(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's disabled.
enabled
- true
in order to enable the feature, false
- to disable.
StandardScriptConfig
instance.
public StandardScriptConfig setMarkToBasePositioning(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's enabled.
enabled
- true
in order to enable the feature, false
- to disable.
StandardScriptConfig
instance.
public StandardScriptConfig setMarkToMarkPositioning(boolean enabled)
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 by prependCustomFeature(String)
(if any) and before custom features added by appendCustomFeature(String)
(if any). The order of not custom features is fixed and defined by the Open Font File specification.
By default it's enabled.
enabled
- true
in order to enable the feature, false
- to disable.
StandardScriptConfig
instance.
public StandardScriptConfig appendCustomFeature(String feature)
See also IFeaturesConfig.listFeatures()
feature
- the feature tag denoting feature in the font.
StandardScriptConfig
instance.
public StandardScriptConfig prependCustomFeature(String feature)
See also IFeaturesConfig.listFeatures()
feature
- the feature tag denoting feature in the font.
StandardScriptConfig
instance.
public StandardScriptConfig removeCustomFeature(String feature)
appendCustomFeature(String)
or prependCustomFeature(String)
.
See also IFeaturesConfig.listFeatures()
feature
- the feature tag denoting feature in the font.
StandardScriptConfig
instance.
public List<String> listFeatures()
IFeaturesConfig
IFeaturesConfig.getScripts()
.
listFeatures
in interface IFeaturesConfig
List
of OpenType features tags to be applied.
Copyright © 1998–2022 iText Group NV. All rights reserved.