Repository navigation
Install with cargo install feanor-cli, or add the library with cargo add feanor.
Added
- Rules about what lookups do, checked on the feature code of every Google
Fonts family and against HarfBuzz where shaping decides:R001unreachable-rule: a contextual rule an earlier rule in the same
lookup always matches first, while doing something elseR002duplicate-substitution: a glyph or ligature substituted twice with
different results (fea-rs keeps the last, fontTools rejects the file)R003duplicate-pair: a glyph pair positioned twice with different values;
the later one is ignored (safe fix: remove it)R004wrong-lookup-type: a positioning lookup called from a substitution,
or the reverseR005lookup-has-no-effect: a lookup called on glyphs it has no rule forR006redundant-rule: a rule that repeats what an earlier one does (hint;
safe fix: remove it)C005mark-class-conflict: mark classes sharing a glyph in one lookupL003empty-block: a feature or lookup with no rulesE002stray-semicolon: a;with no statement (safe fix: remove it)E003languagesystem-after-feature (unsafe fix: move it up)
feanor dev compile: fea-rs's full errors and warnings for a file.
Changed
- Linting one file reports each
includeas aP001hint to lint the whole
project, instead of anE001error. - Glyph name suggestions skip names that differ in a code point (
uFF10,
u1F10), a one-letter part (f_f,f_j) or only digits (ss01,ss02),
which name different glyphs rather than typos. formatlays out long rules differently (below), so code formatted by 0.2
can change once when formatted again: about 1 file in 6 across the Google
Fonts sources. Compiled output is unchanged.format: a glyph class that starts on a new line after[keeps the
author's line breaks, so rows that group glyphs, or that line up with a
parallel class, survive formatting. Only lines that are too long are
wrapped. Classes written on one line are packed to the line width as before.format: when a long rule needs a class split over lines,bystays on the
rule's line if it fits there.format: a contextual rule whose glyph sequence is too long for one line
puts each class on its own line, instead of splitting short classes
across lines; a run of single glyphs fills each line. A class is still
split when it can't fit on a line of its own.
Fixed
- Indent detection no longer picks an unusual unit from uneven nesting (a
file indented 3 spaces, then 8, was formatted with 5); a tab or up to four
spaces wins whenever the file uses one. - A bare
includewith no file in parentheses is reported as an error
instead of crashing (also in 0.1.0). format: rows that line up without needing any padding are formatted as
ordinary statements, not as a table.formatreports# fmt: offregions inuntouched, as documented.Incremental(and the WebAssemblyDocument) report whatlintreports
for a feature body too, instead of syntax errors. A text is tried as a
feature body only when it has syntax errors and no feature block that
parses, since a body can't contain one.