Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ajuancer opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@ajuancer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant