Skip to content

daltonmaag/variable-features-investigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variable Features Investigation

This repository has a collection of test fonts and test documents using those fonts, to check how various applications apply OpenType Feature Variations attached to the features rvrn, rclt, and rlig.

Fonts

The test fonts are located in fonts/ and should be installed on your system before viewing most of the test documents.

Test documents

Test documents are in the folder test files/.

The HTML document, test.htm, is intended to check the behaviour of web browsers. It also serves as the reference of expected visual output, if checked in Chrome, which passes all the tests.

The other documents were created in the respective applications, and checked against that reference.

Scenarios

S1: Basic substitution based on axis value

  1. The glyph for b switches to the glyph for 2 from wght=500 to wght=734.
Processing sequence Input Expected Output
(b → 2) abc a2c

Where (b → 2) is done by either the rvrn, rclt or rlig features.

S2: Basic substitution based on axis value + basic feature substitution

  1. The glyph for b switches to the glyph for 2 from wght=500 to wght=734.
  2. The glyph for b switches to the glyph b.sc when smcp is activated
  3. The glyph for 2 switches to the glyph for ² when sups is activated
Processing sequence Input Expected Output
smcp + (b → 2) abc 123 ABC 123
smcp + sups + (b → 2) abc 123 ABC ¹²³
(b → 2) + smcp abc 123 A2C 123
(b → 2) + smcp + sups abc 123 A²C ¹²³

Where (b → 2) is done by either the rvrn, rclt or rlig features, and capital letters represent small-cap letters in the output.

S3: Contextual substitution based on axis value

  1. The glyph for b, when followed by d, switches to the glyph for 2 from wght=500 to wght=734
Processing sequence Input Expected Output
(bd → 2d) abc abd abc a2d

Where (bd → 2d) is done by either the rvrn, rclt or rlig features.

S4: Contextual substitution based on axis value + basic feature substitution

  1. The glyph for b, when followed by d, switches to the glyph for 2 from wght=500 to wght=734
  2. The glyph for b switches to the glyph b.sc when smcp is activated
  3. The glyph for 2 switches to the glyph for ² when sups is activated
Processing sequence Input Expected Output
smcp + (bd → 2d) abc abd 123 ABC ABD 123
smcp + sups + (bd → 2d) abc abd 123 ABC ABD ¹²³
(bd → 2d) + smcp abc abd 123 ABC A2D 123
(bd → 2d) + smcp + sups abc abd 123 ABC A²D ¹²³

Where (bd → 2d) is done by either the rvrn, rclt or rlig features, and capital letters represent small-cap letters in the output.

S5: Basic substitution based on multiple axes value

  1. The glyph for b switches to the glyph for 2 from wght=500 to wght=734 and wdth=80 to wdth=85.
Processing sequence Input Expected Output
(b → 2) abc a2c

Where (b → 2) is done by either the rvrn, rclt or rlig features.

Results

Scenario and Implementation S1: rvrn S1: rlig S1: rclt S2: rvrn + smcp/sups S2: rlig + smcp/sups S2: rclt + smcp/sups S2: smcp/sups + rlig S2: smcp/sups + rclt S3: rvrn S3: rlig S3: rclt S4: rvrn + smcp/sups S4: rlig + smcp/sups S4: rclt + smcp/sups S4: smcp/sups + rlig S4: smcp/sups + rclt S5: rvrn S5: rlig S5: rclt
Font file name basic-substitution-rvrn.ttf basic-substitution-rlig.ttf basic-substitution-rclt.ttf basic-substitution-plus-feature-rvrn.ttf basic-substitution-plus-feature-rlig-feature-last.ttf basic-substitution-plus-feature-rclt-feature-last.ttf basic-substitution-plus-feature-rlig-feature-first.ttf basic-substitution-plus-feature-rclt-feature-first.ttf contextual-substitution-rvrn.ttf contextual-substitution-rlig.ttf contextual-substitution-rclt.ttf contextual-substitution-plus-feature-rvrn.ttf contextual-substitution-plus-feature-rlig-feature-first.ttf contextual-substitution-plus-feature-rclt-feature-first.ttf contextual-substitution-plus-feature-rlig-feature-last.ttf contextual-substitution-plus-feature-rclt-feature-last.ttf wgwd-rvrn.ttf wgwd-rlig.ttf wgwd-rclt.ttf
Font family name TEST Basic rvrn TEST Basic rlig TEST Basic rclt TEST Basic rvrn plus feature TEST Basic rlig plus feature last TEST Basic rclt plus feature last TEST Basic rlig plus feature first TEST Basic rclt plus feature first TEST Contextual rvrn TEST Contextual rlig TEST Contextual rclt TEST Contextual rvrn plus feature TEST Contextual rlig plus feature first TEST Contextual rclt plus feature first TEST Contextual rlig plus feature last TEST Contextual rclt plus feature last TEST WgWd rvrn TEST WgWd rlig TEST WgWd rclt
Mac Chrome 145.0.7632.110 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Safari26.2 (21623.1.14.11.9) Yes Yes Yes Yes Yes Yes Yes Yes No ② Yes Yes No ② Yes Yes Yes Yes Yes Yes Yes
Figma 126.1.2 Yes Yes Yes Partial ⑤ Partial ⑤ Partial ⑤ Partial ④ Partial ④ Yes Yes Yes Partial ⑤ Partial ⑤ Partial ⑤ Partial ④ Partial ④ Yes Yes Yes
Adobe InDesign
21.2
Adobe composer Yes Yes No ② Yes Yes No ② Yes Yes ⑥ Yes Yes No ② Yes Yes No ② Yes Yes ⑥ Yes Yes No ②
World-Ready Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Adobe Photoshop
27.4.0
Latin and East Asian Layout Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
World-Ready Layout Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Adobe Illustrator
30.2.1
Adobe composer Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Middle Eastern & South Asian Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Windows Chrome
145.0.7632.110
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Figma
126.1.2
Yes Yes Yes Partial ⑤ Partial ⑤ Partial ⑤ Partial ④ Partial ④ Yes Yes Yes Partial ⑤ Partial ⑤ Partial ⑤ Partial ④ Partial ④ Yes Yes Yes
Adobe InDesign
21.2
Adobe composer Yes Yes No ② Yes Yes No ② Yes Yes ⑥ Yes Yes No ② Yes Yes No ② Yes Yes ⑥ Yes Yes No ②
World-Ready Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Adobe Photoshop
27.4.0
Latin and East Asian Layout Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
World-Ready Layout Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Adobe Illustrator
30.2.1
Adobe composer Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Middle Eastern & South Asian Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Linux Chromium
145.0.7632.75
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Issues

① Variable substitution is performed before other features when it should be performed after:

image1

② Variable substitution is not performed:

image2

③ Variable substitution is performed after other features, when it should be performed before:

image5

④ Figma uses faux superscript instead of the OpenType feature substitution:

image6

⑤ Superscript feature undoes the variable substitution (probably related to ④):

image3

⑥ Because the axis substitution is performed at the end, the expected result is the same as not having the feature substitution:

image4

About

Test cases for variable features and how applications handle them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors