linebender / linebender/parley

fontique query matching algorithm

Open
#379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
736
Forks
120
Avg merge
1d 3h
Merged PRs (30d)
53

Description

A [`fontique::Query`](https://docs.rs/fontique/latest/fontique/struct.Query.html) currently:

1. Filters available fonts by those matching any family in the given list
2. Extends the list of selected fonts using those matching the fallback script and locale, if provided
3. Finds the "best" match (according to given attributes) in each of the above-selected families *and* the default member of the family (if not equal to the best)

Problems:

- #322: members of a family do not necessarily all cover the same unicode range.
- Locale and script have no impact on font preference, only on available fallbacks.
- Similarly, the font's "functional unicode range" has no impact on font preference (see [here](https://github.com/linebender/parley/pull/377#issuecomment-2955406530), considering arrows which do not use a specific script or locale).
- Query caching is internal, supporting only the last query. In contrast, `kas-text` caches *all* queries.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the fontique::Query documentation and the current query behavior described here, then review issue #322 and the discussion in pull request #377. Compare the existing query cache with kas-text's all-query caching; done should address font coverage, locale/script and functional Unicode range preference, and caching behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.