( ´∀`)文字 Moji
Explanation

Ranking and font families

Why Moji parses filenames and ranks groups before selecting downloads.

Font search results rarely include complete structured metadata. The filename often carries the most useful facts:

ProximaNova-Bold.ttf
SourceSans-SemiBoldItalic.woff2
Futura[wght].ttf

Moji splits camel case, replaces filename separators, records variable-font markers, and recognizes common weight, italic, and foundry-style abbreviations. This produces a canonical family name and tags without changing the original filename.

JSON keeps the underlying format and exposes variable: true. Human output labels the same file as TTF-VAR or OTF-VAR.

Score components

The score combines:

  • format preference: OTF, TTF, DFONT, PFB, WOFF2, WOFF, then PFM;
  • the number of weights found for a family at one source;
  • a trust boost when a provider can establish trust;
  • a requested-weight match;
  • a variable-font bonus; and
  • a penalty for suspiciously small files.

After relevance and these quality scores tie, Moji uses direct-link reliability as a final ordering rule: structured registries, raw GitHub files, GetFonts, then arbitrary web hosts. This heuristic predicts whether a result is likely to remain a usable direct file. It does not change the trusted or license fields and cannot outrank a more relevant or more complete family.

Ranking weights are configurable because a desktop design workflow and a web workflow may value formats differently.

Why family grouping matters

Without grouping, an entire family request could mix unrelated uploads or select ten individually high-scoring bold files.

Moji groups by normalized family and source. Family mode starts from the highest-ranked result, then selects matching family files from that same source. This keeps the set coherent and rewards sources that contain several weights.

The TUI shows these source-bounded bundles as family candidates. A one-file candidate remains a family candidate in the results list instead of changing into an apparent child file. Open a candidate to inspect its individual filenames. Raw source provenance remains available in machine output, while the results grid shows only the provider name.

Opening a multi-file candidate selects one highest-ranked file for each normalized style category. Categories combine weight and posture, such as Regular, Regular Italic, Bold, and Bold Italic; variable fonts form a separate category for each posture. This keeps duplicate paths or alternate formats from entering the default family download without treating Roman and Italic variable fonts as substitutes. The preview still allows selecting every file or toggling individual alternatives.

If a member fails byte validation, the whole staged group is discarded before Moji tries the next family source. A completed family never combines weights from unrelated repositories or hosts.

Ranking is guidance, not proof

A high score means a result matches the query and quality heuristics. It does not prove authorship, integrity beyond the validated file format, or a license grant. Machine output preserves source and license fields for callers that need to evaluate that provenance; the TUI keeps the results grid focused on provider identity and exposes the direct URL when a candidate is opened.

On this page