Class GsubWorkerForDflt

  • All Implemented Interfaces:
    GsubWorker

    public class GsubWorkerForDflt
    extends java.lang.Object
    implements GsubWorker
    DFLT (Default) script-specific implementation of GSUB system.

    According to the OpenType specification, a Script table with the script tag 'DFLT' (default) is used in fonts to define features that are not script-specific. Applications should use the DFLT script table when no script table exists for the specific script of the text being processed, or when text lacks a defined script (containing only symbols or punctuation).

    This implementation applies common, script-neutral typographic features that work across writing systems. The feature order follows standard OpenType recommendations for universal glyph substitutions.

    Reference: OpenType ScriptList Table Specification

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.List<java.lang.String> FEATURES_IN_ORDER
      Script-neutral features in recommended processing order.
      private GsubData gsubData  
      private static org.apache.commons.logging.Log LOG  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.List<java.lang.Integer> applyGsubFeature​(ScriptFeature scriptFeature, java.util.List<java.lang.Integer> originalGlyphs)  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final org.apache.commons.logging.Log LOG
      • FEATURES_IN_ORDER

        private static final java.util.List<java.lang.String> FEATURES_IN_ORDER
        Script-neutral features in recommended processing order.
        • ccmp - Glyph Composition/Decomposition (must be first)
        • liga - Standard Ligatures
        • clig - Contextual Ligatures
        • calt - Contextual Alternates
        Note: This feature list focuses on common GSUB (substitution) features. GPOS features like 'kern', 'mark', 'mkmk' are handled separately.
      • gsubData

        private final GsubData gsubData
    • Constructor Detail

      • GsubWorkerForDflt

        GsubWorkerForDflt​(GsubData gsubData)
    • Method Detail

      • applyTransforms

        public java.util.List<java.lang.Integer> applyTransforms​(java.util.List<java.lang.Integer> originalGlyphIds)
        Description copied from interface: GsubWorker
        Applies language-specific transforms including GSUB and any other pre or post-processing necessary for displaying Glyphs correctly.
        Specified by:
        applyTransforms in interface GsubWorker
        Parameters:
        originalGlyphIds - list of original glyph IDs
        Returns:
        list of transformed glyph IDs
      • applyGsubFeature

        private java.util.List<java.lang.Integer> applyGsubFeature​(ScriptFeature scriptFeature,
                                                                   java.util.List<java.lang.Integer> originalGlyphs)