Skip to content

Show full font file path in typst fonts --variants - #7490

Merged
laurmaedje merged 2 commits into
typst:mainfrom
3w36zj6:feature/show-full-font-file-path-in-typst-fonts-variants-command
Jan 9, 2026
Merged

laurmaedje merged 2 commits into
typst:mainfrom
3w36zj6:feature/show-full-font-file-path-in-typst-fonts-variants-command

Conversation

@3w36zj6

@3w36zj6 3w36zj6 commented Nov 30, 2025

Copy link
Copy Markdown
Contributor

close #6943

This pull request adds full font file paths to the detailed information displayed by typst fonts --variants.

If this change is acceptable, we can also consider implementing json output functionality for integration with external tools, as proposed in #6943 (comment).

@3w36zj6
3w36zj6 force-pushed the feature/show-full-font-file-path-in-typst-fonts-variants-command branch from f3774c6 to 2953fa8 Compare November 30, 2025 06:21
@laurmaedje laurmaedje added waiting-on-review This PR is waiting to be reviewed. text Related to the text category, which is all about text handling, shaping, etc. cli About Typst's command line interface. interface PRs that add to or change Typst's user-facing interface as opposed to internals or docs changes. labels Dec 1, 2025
@3w36zj6
3w36zj6 force-pushed the feature/show-full-font-file-path-in-typst-fonts-variants-command branch from 2953fa8 to 0babe68 Compare January 5, 2026 20:21

@laurmaedje laurmaedje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Implementation-wise, instead of mirroring the families API with families_with_slots and extra structs, I'd suggest changing the return type of FontBook::families to impl Iterator<Item = (&str, impl Iterator<Item = usize>)> + '_, returning just the font indices. Then, we can get the font info via book.info(index) and the path via fonts.slots[index].path() and there's no need for new types.

The existing call sites of book.families() would need to be updated to manually access the book.info for the given IDs, but that shouldn't be a big trouble.

The test is a bit lengthy as-is. I think with this change, we could just skip it, since there wouldn't really be new functionality, just the existing one exposed differently.

@laurmaedje laurmaedje added waiting-on-author Pull request waits on author and removed waiting-on-review This PR is waiting to be reviewed. labels Jan 7, 2026
@3w36zj6
3w36zj6 force-pushed the feature/show-full-font-file-path-in-typst-fonts-variants-command branch 3 times, most recently from e27106f to 656ff89 Compare January 9, 2026 06:46
@3w36zj6
3w36zj6 requested a review from laurmaedje January 9, 2026 06:54
@laurmaedje
laurmaedje enabled auto-merge January 9, 2026 09:30
@laurmaedje

Copy link
Copy Markdown
Member

Thanks!

@laurmaedje laurmaedje removed the waiting-on-author Pull request waits on author label Jan 9, 2026
@laurmaedje
laurmaedje added this pull request to the merge queue Jan 9, 2026
Merged via the queue into typst:main with commit 5c5e1cc Jan 9, 2026
ParaN3xus added a commit to ParaN3xus/typst.ts that referenced this pull request Jan 16, 2026
ParaN3xus added a commit to ParaN3xus/tinymist that referenced this pull request Jan 16, 2026
jassielof pushed a commit to jassielof/typst that referenced this pull request Jan 16, 2026
ParaN3xus added a commit to ParaN3xus/tinymist that referenced this pull request May 15, 2026
ParaN3xus added a commit to ParaN3xus/typst.ts that referenced this pull request May 15, 2026
ParaN3xus added a commit to ParaN3xus/tinymist that referenced this pull request May 24, 2026
ParaN3xus added a commit to ParaN3xus/tinymist that referenced this pull request Jun 1, 2026
Myriad-Dreamin pushed a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 13, 2026
Myriad-Dreamin pushed a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 13, 2026
Myriad-Dreamin pushed a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 13, 2026
Myriad-Dreamin added a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 15, 2026
This PR is part of the Typst 0.15 nightly cleanup stack. It sits on top
of the path-model group and keeps this slice focused on analyzer, query,
debug, lint, eval, and typlite API adaptation.

## Upstream Typst Changes

- [`typst/typst#7542`](typst/typst#7542) changes
function internals. Tinymist updates signature, definition, hover, and
rename paths that inspect function internals.
- [`typst/typst#7543`](typst/typst#7543) moves
call sites toward `to_element`-style element handling. Tinymist updates
field access, completion kind inference, and syntax type checking
accordingly.
- [`typst/typst#7808`](typst/typst#7808) changes
parameter metadata. Tinymist updates signature help, built-in type
metadata, scope completion, and type completion to the new parameter
representation.
- [`typst/typst#8215`](typst/typst#8215)
requests the standard library from `World` once upfront. Tinymist
updates tracked values, upstream helpers, global analysis, DAP request
evaluation, and eval engine construction to use the preloaded library
path.
- [`typst/typst#7865`](typst/typst#7865),
[`typst/typst#8116`](typst/typst#8116), and
`typst/typst@5326cd297` adjust math call, math field, and prime syntax.
Tinymist updates syntax matchers, coverage instrumentation, debugger
instrumentation, lint behavior, expression parsing, and query fixtures.
- [`typst/typst#7490`](typst/typst#7490) and
`typst/typst@cfdd4238b` change font metadata APIs. Tinymist updates
document metrics and symbol glyph handling.
- `typst/typst@0f04fd176` changes diagnostic hints into spanned values.
Tinymist updates diagnostic hint rendering.
- [`typst/typst#7897`](typst/typst#7897)
introduces import item placeholders and related attach/text API changes.
Tinymist updates import completions and math text/attach matching.
- Typst 0.15 makes `typst::ROUTINES` private, adds the library argument
to `typst_eval::eval`, and protects engine introspection. Tinymist
updates `typst-shim` eval for both nightly and default feature builds.

## Tinymist Changes

- Ports analysis and query code to the updated function, element,
parameter, font, and math syntax APIs.
- Updates debug coverage and debugger instrumentation for the new math
call/field syntax shapes.
- Updates lint behavior so function-call and math-call handling stay
aligned.
- Updates DAP and `crityp` to the preloaded engine library path.
- Updates `typst-shim` eval and syntax compatibility modules so both
`nightly` and default feature builds compile against the current Typst
0.15 dependency set.
- Refreshes targeted query and typlite fixtures affected by these API
and syntax behavior changes.

---------

Co-authored-by: paran3xus <[email protected]>
Myriad-Dreamin pushed a commit to Myriad-Dreamin/typst.ts that referenced this pull request Jun 15, 2026
Myriad-Dreamin added a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 15, 2026
This PR is part of the Typst 0.15 nightly cleanup stack. It sits on top
of the path-model group and keeps this slice focused on analyzer, query,
debug, lint, eval, and typlite API adaptation.

- [`typst/typst#7542`](typst/typst#7542) changes
function internals. Tinymist updates signature, definition, hover, and
rename paths that inspect function internals.
- [`typst/typst#7543`](typst/typst#7543) moves
call sites toward `to_element`-style element handling. Tinymist updates
field access, completion kind inference, and syntax type checking
accordingly.
- [`typst/typst#7808`](typst/typst#7808) changes
parameter metadata. Tinymist updates signature help, built-in type
metadata, scope completion, and type completion to the new parameter
representation.
- [`typst/typst#8215`](typst/typst#8215)
requests the standard library from `World` once upfront. Tinymist
updates tracked values, upstream helpers, global analysis, DAP request
evaluation, and eval engine construction to use the preloaded library
path.
- [`typst/typst#7865`](typst/typst#7865),
[`typst/typst#8116`](typst/typst#8116), and
`typst/typst@5326cd297` adjust math call, math field, and prime syntax.
Tinymist updates syntax matchers, coverage instrumentation, debugger
instrumentation, lint behavior, expression parsing, and query fixtures.
- [`typst/typst#7490`](typst/typst#7490) and
`typst/typst@cfdd4238b` change font metadata APIs. Tinymist updates
document metrics and symbol glyph handling.
- `typst/typst@0f04fd176` changes diagnostic hints into spanned values.
Tinymist updates diagnostic hint rendering.
- [`typst/typst#7897`](typst/typst#7897)
introduces import item placeholders and related attach/text API changes.
Tinymist updates import completions and math text/attach matching.
- Typst 0.15 makes `typst::ROUTINES` private, adds the library argument
to `typst_eval::eval`, and protects engine introspection. Tinymist
updates `typst-shim` eval for both nightly and default feature builds.

- Ports analysis and query code to the updated function, element,
parameter, font, and math syntax APIs.
- Updates debug coverage and debugger instrumentation for the new math
call/field syntax shapes.
- Updates lint behavior so function-call and math-call handling stay
aligned.
- Updates DAP and `crityp` to the preloaded engine library path.
- Updates `typst-shim` eval and syntax compatibility modules so both
`nightly` and default feature builds compile against the current Typst
0.15 dependency set.
- Refreshes targeted query and typlite fixtures affected by these API
and syntax behavior changes.

---------

Co-authored-by: paran3xus <[email protected]>
Myriad-Dreamin added a commit to Myriad-Dreamin/tinymist that referenced this pull request Jun 15, 2026
This PR is part of the Typst 0.15 nightly cleanup stack. It sits on top
of the path-model group and keeps this slice focused on analyzer, query,
debug, lint, eval, and typlite API adaptation.

- [`typst/typst#7542`](typst/typst#7542) changes
function internals. Tinymist updates signature, definition, hover, and
rename paths that inspect function internals.
- [`typst/typst#7543`](typst/typst#7543) moves
call sites toward `to_element`-style element handling. Tinymist updates
field access, completion kind inference, and syntax type checking
accordingly.
- [`typst/typst#7808`](typst/typst#7808) changes
parameter metadata. Tinymist updates signature help, built-in type
metadata, scope completion, and type completion to the new parameter
representation.
- [`typst/typst#8215`](typst/typst#8215)
requests the standard library from `World` once upfront. Tinymist
updates tracked values, upstream helpers, global analysis, DAP request
evaluation, and eval engine construction to use the preloaded library
path.
- [`typst/typst#7865`](typst/typst#7865),
[`typst/typst#8116`](typst/typst#8116), and
`typst/typst@5326cd297` adjust math call, math field, and prime syntax.
Tinymist updates syntax matchers, coverage instrumentation, debugger
instrumentation, lint behavior, expression parsing, and query fixtures.
- [`typst/typst#7490`](typst/typst#7490) and
`typst/typst@cfdd4238b` change font metadata APIs. Tinymist updates
document metrics and symbol glyph handling.
- `typst/typst@0f04fd176` changes diagnostic hints into spanned values.
Tinymist updates diagnostic hint rendering.
- [`typst/typst#7897`](typst/typst#7897)
introduces import item placeholders and related attach/text API changes.
Tinymist updates import completions and math text/attach matching.
- Typst 0.15 makes `typst::ROUTINES` private, adds the library argument
to `typst_eval::eval`, and protects engine introspection. Tinymist
updates `typst-shim` eval for both nightly and default feature builds.

- Ports analysis and query code to the updated function, element,
parameter, font, and math syntax APIs.
- Updates debug coverage and debugger instrumentation for the new math
call/field syntax shapes.
- Updates lint behavior so function-call and math-call handling stay
aligned.
- Updates DAP and `crityp` to the preloaded engine library path.
- Updates `typst-shim` eval and syntax compatibility modules so both
`nightly` and default feature builds compile against the current Typst
0.15 dependency set.
- Refreshes targeted query and typlite fixtures affected by these API
and syntax behavior changes.

---------

Co-authored-by: paran3xus <[email protected]>
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli About Typst's command line interface. interface PRs that add to or change Typst's user-facing interface as opposed to internals or docs changes. text Related to the text category, which is all about text handling, shaping, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow fonts subcommand to also display the full filename path

2 participants