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

Add new checks for languagesystem DFLT dflt in UFO sources. #4247

Merged

Conversation

bramstein
Copy link
Contributor

@bramstein bramstein commented Aug 31, 2023

Description

This adds a new check that tests for the presence of a languagesystem DFLT dflt statement in UFO feature files. If a feature file contains no languagesystem statements the compiler will automatically insert one, but will not do so if there is another languagesystem statement present (which may or not be the DFLT dflt). Warn in this case as it may lead to unexpected side effects (such as OT features not working for the default language).

Fixes #4011

Checklist

  • update CHANGELOG.md
  • wait for the tests to pass
  • request a review

yield PASS, "Default languagesystem inserted by compiler."
else:
tags = re.findall(
# pylint: disable-next=line-too-long
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried a couple of different variations to keep the line shorter, but they all became harder to read/understand. Happy to change if anyone has suggestions...

@bramstein bramstein force-pushed the bs-ufo-default-languagesystem branch from 34d3a94 to e6729b6 Compare August 31, 2023 09:42
@bramstein bramstein force-pushed the bs-ufo-default-languagesystem branch from e6729b6 to cbe1063 Compare August 31, 2023 09:44
@felipesanches
Copy link
Collaborator

thanks, @bramstein

@felipesanches felipesanches merged commit 6c7e00e into fonttools:main Aug 31, 2023
16 checks passed
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

Successfully merging this pull request may close these issues.

New check: Check that languagesystem DFLT dflt is present in the features.fea file
2 participants