Skip to content

[fea-rs] store lookup origin for feature code debugging#1933

Open
khaledhosny wants to merge 2 commits intogooglefonts:mainfrom
khaledhosny:debg
Open

[fea-rs] store lookup origin for feature code debugging#1933
khaledhosny wants to merge 2 commits intogooglefonts:mainfrom
khaledhosny:debg

Conversation

@khaledhosny
Copy link
Copy Markdown
Contributor

@khaledhosny khaledhosny commented Mar 25, 2026

Store lookup name and location info in Debg table following the same structure as fontTools.feaLib. But unlike feaLib, we don’t store feature info, because:

  1. it is redundant when debugging with HarfBuzz trace message as we get the script and feature info from there
  2. it is misleading/incomplete as the lookup can be registered under different script/language/feature compos, but feaLib only reports one of them.

@khaledhosny
Copy link
Copy Markdown
Contributor Author

Store lookup name and location info in Debg table following the same structure as fontTools.feaLib. But unlike feaLib, we don’t store feature info, because:

  1. it is redundant when debugging with HarfBuzz trace message as we get the script and feature info from there

  2. it is misleading/incomplete as the lookup can be registered under different script/language/feature compos, but feaLib only reports one of them.

@simoncozens @justvanrossum I used the same key as feaLib, but feature info is omitted and the line numbers seem to be different (I think feaLib reports the location of the first rule in the lookup block, while fea-rs reports the location of the lookup name), would you prefer if I used a different key here? If so, I might also use a list for the location ([filename, line, column] instead of a string "filename:line:column").

Store lookup name and location info in Debg table following the same
structure as fontTools.feaLib. But unlike feaLib, we don’t store feature
info, because:
1) it is redundant when debugging with HarfBuzz trace message as we get
   the script and feature info from there
2) it is misleading/incomplete as the lookup can be registered under
   different script/language/feature compos, but feaLib only reports one
   of them.
FontTools uses an envvar, but an option feels more robust.
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.

[fea-rs] store lookup origin for feature code debugging

1 participant