Class: Fontisan::Hints::PostScriptHintApplier
- Inherits:
-
Object
- Object
- Fontisan::Hints::PostScriptHintApplier
- Defined in:
- lib/fontisan/hints/postscript_hint_applier.rb
Overview
Applies rendering hints to PostScript/CFF font tables
This applier validates and applies PostScript hint data to CFF fonts by rebuilding the entire CFF table structure with updated Private DICT parameters.
Status: Fully Operational (Phase 10A Complete)
PostScript Hint Parameters (Private DICT):
- blue_values: Alignment zones for overshoot suppression
- other_blues: Additional alignment zones
- std_hw: Standard horizontal stem width
- std_vw: Standard vertical stem width
- stem_snap_h: Horizontal stem snap widths
- stem_snap_v: Vertical stem snap widths
- blue_scale, blue_shift, blue_fuzz: Overshoot parameters
- force_bold: Force bold flag
- language_group: Language group (0=Latin, 1=CJK)
Instance Method Summary collapse
-
#apply(hint_set, tables) ⇒ Hash
Apply PostScript hints to font tables.
Instance Method Details
#apply(hint_set, tables) ⇒ Hash
Apply PostScript hints to font tables
Validates hint data and rebuilds CFF table with updated Private DICT. Supports arbitrary Private DICT size changes through full table reconstruction. Also supports per-glyph hints injected directly into CharStrings.
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fontisan/hints/postscript_hint_applier.rb', line 41 def apply(hint_set, tables) return tables if hint_set.nil? || hint_set.empty? return tables unless hint_set.format == "postscript" if cff2_table?(tables) apply_cff2_hints(hint_set, tables) elsif cff_table?(tables) apply_cff_hints(hint_set, tables) else tables end end |