Skip to content

@pdfa-lab/fontkit / HangulShaper

Class: HangulShaper ​

Defined in: src/open-type/shapers/hangul-shaper.ts:28

This is a shaper for the Hangul script, used by the Korean language. It does the following:

  • decompose if unsupported by the font: <LV> &rarrow; <L,V> <LVT> &rarrow; <L,V,T> <LV,T> &rarrow; <L,V,T>

  • compose if supported by the font: <L,V> &rarrow; <LV> <L,V,T> &rarrow; <LVT> <LV,T> &rarrow; <LVT>

  • reorder tone marks (S is any valid syllable): <S, M> &rarrow; <M, S>

  • apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.

This logic is based on the following documents:

Extends ​

Constructors ​

Constructor ​

new HangulShaper(): HangulShaper

Returns ​

HangulShaper

Inherited from ​

DefaultShaper.constructor

Properties ​

PropertyModifierTypeDefault valueOverridesDefined in
zeroMarkWidthsstaticstring'NONE'DefaultShaper.zeroMarkWidthssrc/open-type/shapers/hangul-shaper.ts:29

Methods ​

assignFeatures() ​

static assignFeatures<T>(plan, glyphs): void

Defined in: src/open-type/shapers/hangul-shaper.ts:34

Type Parameters ​

Type ParameterDefault type
Tnull

Parameters ​

ParameterType
planShapingPlan<T>
glyphsGlyphInfo<T>[]

Returns ​

void

Overrides ​

DefaultShaper.assignFeatures


plan() ​

static plan<T>(plan, glyphs, features): void

Defined in: src/open-type/shapers/default-shaper.ts:33

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
planShapingPlan<T>
glyphsGlyphInfo<T>[]
featuresFeatureFlags

Returns ​

void

Inherited from ​

DefaultShaper.plan


planFeatures() ​

static planFeatures<T>(plan): void

Defined in: src/open-type/shapers/hangul-shaper.ts:30

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
planShapingPlan<T>

Returns ​

void

Overrides ​

DefaultShaper.planFeatures


planPostprocessing() ​

static planPostprocessing<T>(plan, userFeatures): void

Defined in: src/open-type/shapers/default-shaper.ts:65

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
planShapingPlan<T>
userFeaturesFeatureFlags

Returns ​

void

Inherited from ​

DefaultShaper.planPostprocessing


planPreprocessing() ​

static planPreprocessing<T>(plan): void

Defined in: src/open-type/shapers/default-shaper.ts:54

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
planShapingPlan<T>

Returns ​

void

Inherited from ​

DefaultShaper.planPreprocessing