Skip to content

Fontmin Library Fails to Consider Customizations via font-feature-settings #118

Open
@ajuancer

Description

Summary

When using the Fontmin library to optimize fonts, the changes specified via CSS font-feature-settings are not taken into account. This leads to incomplete or incorrect font optimizations when custom typographic features are applied.

Steps to reproduce

  1. Install Fontmin and necessary plugins
  2. Create a CSS file with custom font feature settings ie.:
@font-face {
    font-family: 'CustomFont';
    src: url('fonts/CustomFont.ttf') format('truetype');
    font-feature-settings: 'liga' on, 'calt' on;
}

.text {
    font-family: 'CustomFont';
    font-feature-settings: 'liga' on, 'calt' on;
}
  1. Use Fontmin to optimize the font
  2. Observe that the optimized font does not include the features specified by font-feature-settings.

Expected Behavior

Fontmin should consider and preserve the typographic features specified via font-feature-settings in CSS when optimizing fonts.

Actual Behavior

Fontmin optimizes the fonts without taking into account the font-feature-settings CSS properties, leading to loss of intended typographic features.

Possible Solutions:

  • Enhance Fontmin to parse and apply the font-feature-settings from CSS files.
  • Allow Fontmin to accept additional options or configuration for handling custom font features.

Additional Information:

Custom typographic features are increasingly used in web design to improve readability and aesthetics. Ignoring font-feature-settings can significantly alter the intended presentation of the text.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions